Joomla XML-RPC JAVA - Joomla! Forum - community, help and support
hi,
i googling howto around xml-rpc joomla, , searching , other forums didn't hit answer.
a java application (not applet) must request joomla component remotely, extracts data database , pass it. well, thing that, fields text, in 1 place, xml-response may contain file name, in case next request of file jpg image. don't know, how such thing can coded, , have no idea how search in forums, google , on. provide idea here java , php got forum, , please if possible, guide me how express in joomla? how return image file response request xml-rpc, or other technology may simpler , better serve solution.
and php handles response:
thank you,
a_a
i googling howto around xml-rpc joomla, , searching , other forums didn't hit answer.
a java application (not applet) must request joomla component remotely, extracts data database , pass it. well, thing that, fields text, in 1 place, xml-response may contain file name, in case next request of file jpg image. don't know, how such thing can coded, , have no idea how search in forums, google , on. provide idea here java , php got forum, , please if possible, guide me how express in joomla? how return image file response request xml-rpc, or other technology may simpler , better serve solution.
code: select all
1. public class urltest2 {
2.
3. public static void main( string[] args ) {
4.
5. try {
6.
7. string data1 = urlencoder.encode("first", "utf-8") + "=" + urlencoder.encode("fred", "utf-8");
8. string data2 = urlencoder.encode("last", "utf-8") + "=" + urlencoder.encode("hamilton", "utf-8");
9. string data = data1 +"&" +data2;
10.
11. string inline;
12.
13. url u1 = new url("http://192.168.0.10/test1/test2.php");
14. urlconnection uc1 = u1.openconnection();
15.
16. uc1.setdooutput(true);
17. outputstreamwriter out = new outputstreamwriter(uc1.getoutputstream());
18. out.write(data);
19. out.flush();
20.
21. bufferedreader in = new bufferedreader( new inputstreamreader( uc1.getinputstream() ) );
22.
23. while ((inline = in.readline()) != null) {
24. system.out.println(inline);
25. }
26.
27. in.close();
28. }
29. catch( exception e ) {
30. e.printstacktrace();
31. }
32. }
33. }
and php handles response:
code: select all
1. <?php
2.
3. $first = $_post["first"];
4. $last = $_post["last"];
5.
6. echo 'welcome guy ';
7. echo $first;
8. echo $last;
9.
10. ?>
thank you,
a_a
Comments
Post a Comment