Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures

Home

Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips

Books

Submit News
Search the site here...
Search...
 
Search the JavaFAQ.nu
1000 Java Tips ebook

1000 Java Tips - Click here for the high resolution copy!1000 Java Tips - Click here for the high resolution copy!

Java Screensaver, take it here

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java programming articles and tips. Please take your copy here.

Take your copy of free "Java Technology Screensaver"!.

Good review: Java XML RPC

JavaFAQ Home » XML Go to all tips in XML


Bookmark and Share

Java XML RPC Overview

Recently one friend of mine asked me about how distributed computers could easily exchange by text based data without thinking about firewalls, which close most of ports between applications.

First I was thinking about was Java RMI - but it does not work through the most of firewalls.

Second one was is exchange by sharing a file on one mounted drive. This file could be a buffer where information is read/written from. But the same problem with firewalls arose, because you need to use NFS for Unix based computers and similar service in Windows, which name I do not remember, since quite rarely use it.

5 minutes to read about XML RPC

Third option came later to my mind - XML RPC ( http://www.xmlrpc.com )! I totally forgot about it, when tried to find "pure Java" solution Smile It could be an excellent choice to send any information over the Internet, since XML RPC technology use HTTP-POST requests.


this image is from www.xmlrpc.com site

 

Here's an example of an XML-RPC request:

Code:

POST /RPC2 HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: www.javafaq.nu
Content-Type: text/xml
Content-length: 186

<?xml version="1.0"?>
<methodCall>
        <methodName>examples.getStateName</methodName>
                <params>
                        <param>       
                                <value>
                                        <int>2006</int>
                                </value>
                        </param>
                </params>
        </methodCall>

With XML RPC you can send:

  • scalar values like integer (four bytes signed integer), boolean, string, date/time, base64 encoded binary, double precision signed floating point number.
  • structures - <struct> which contains members (contains name and values)
  • arrays (can be recursive) which can contain an array, structure or scalar values.

A response xml code for XML RPC looks very similar.

You can find Java simple implementation examples on XMP RPC home site.


 Printer Friendly Page  Printer Friendly Page
 Send to a Friend  Send to a Friend

.. Bookmark and Share

Search here again if you need more info!
Custom Search



Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

RSS feed Java FAQ RSS feed Java FAQ News     

    RSS feed Java Forums RSS feed Java Forums

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

Interactive software released under GNU GPL, Code Credits, Privacy Policy