views:

304

answers:

2
+1  Q: 

XML-RPC PHP Java

Hi, I'm having a problem with the XML-RPC communication. I have a XML-RPC Client made in Java with Apache XmlRpc and a XML-RPC Server made in PHP with PEAR's XML_RPC. The problem is that i get a "HTTP server returned unexpected status: Not Found" error. I tested the server with a PEAR XML-RPC Client and it works. I don't know what is the problem because i can't print the response of the server (i don't know how), but it seems that the authentication works, because if i don't input the correct username and passoword i get an authentication error. Please help!

Thanks in advance. Cristian

A: 

Make sure you are taking into account the package name with writing the interface stub in java, because by default it will tack that onto the from of the method it is trying to reference.

pfranza
+1  A: 

Start debugging, here some information from the PEAR XML_RPC documention:

setDebug()

$client->setDebug ( $debugOn )

$debugOn is either 0 or 1 depending on whether you require the client to print debugging information to the browser. The default is not to output this information.

The debugging information includes the raw data returned from the XML-RPC server it was querying, and the PHP value the client attempts to create to represent the value returned by the server. This option can be very useful when debugging servers as it allows you to see exactly what the server returns.

Source: http://pear.php.net/manual/en/package.webservices.xml-rpc.api.php

Marien