• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java and Perl using xml-rpc

 
Mithila Ananth
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to connect a java client with a perl server using xml-rpc, the code for which i found at this link - http://www.javaworld.com/javaworld/jw-10-2004/jw-1011-xmlrpc.html?page=1

My client is working properly and the request message looks as it should. But the response I'm getting back from the server, looks like this -



Does anybody know why this is or how to fix it? I've looked just about everywhere and still nada. ANY help would be MUCH appreciated, thanks!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to hazard a guess.

Although your message "looks" right, I bet there is a leading character that is NOT the start of a tag. This could be just a space or a line feed but XML parsers are notoriously picky about the start character and the line 1 column 0 certainly points at the start of the document.

Bill
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mithila,
Clearly, your request message is badly formatted. I had a quick look at your fault message and noticed the problem ocurring on the client side. Is it possible for you to post request message?
 
Mithila Ananth
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick reply Bill and Naren

This is the request message being sent -

POST /otrs/server.pl HTTP/1.1
Content-Length: 118
Content-Type: text/xml
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.6.0_10
Host: localhost:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

<?xml version="1.0"?><methodCall><methodName>PerlSystemFacade.say_hello_psf</methodName><params></params></methodCall>


Can you spot anything amiss here?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!