Practical Usage


XML-RPC depends on the types in the client call and the server call matching exactly. You need to use the tables from earlier in the chapter to check that all the types match. Otherwise you’ll get exceptions saying that methods could not be found. This is particularly difficult on the client side because there is no checking on the Vector of parameters that’s passed to the execute method. If you leave out an argument or reverse the order, it can be a frustrating experience to debug.

You can debug these sorts of problems by using an HTTP monitoring program such as the tcpmon utility included with Axis. This program sits between you and the HTTP server and displays the contents of the HTTP request and response as they’re generated. The only trick is that you need to change the port in either your client or server program so you can interpose the monitor program. An alternate solution is to use an Ethernet packet sniffer like Ethereal (www.ethereal.com) to look at the network packets as they go by. If you’re on a switched network, you may not be able to use Ethereal.

If you’re on a network with a firewall, the firewall may interfere with your ability to use XML-RPC, particularly if you specify an unusual port number. You can check to see if this is happening by using the telnet command. By typing

telnet <host> <port>

you can determine whether you can make a network connection to the particular port on the host. The host can be a domain name or an IP address. If telnet can’t connect and you know the server is up and running on that host and port, then there may be a firewall between you.




Professional XML Development with Apache Tools. Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Professional XML Development with Apache Tools: Xerces, Xalan, FOP, Cocoon, Axis, Xindice (Wrox Professional Guides)
ISBN: 0764543555
EAN: 2147483647
Year: 2003
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net