This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
hi, I am trying to run a web service. The Java client runs without any problem. But I have tried 2 clients: one in PHP, the other one with VBS, and both give me the error "Cannot find child element: arg0"
Here is the code Echo.java
If i specify the name of the parameter with the @WebParam, then i get the same error message : "Cannot find child element: MyParam".
So i am using the RPC/LITERAL style, and I get the error "Cannot find child element: arg0" If I use the DOCUMENT/LITERAL style, I get a different error. Anyways, I am stuck here. Does anyone have an idea ? I know it is not PHP related, since I get the exact same error with a completely different client (VBS).
Originally posted by William Brogden: As I understand it, your echo is expected to send back a copy of the body of the request. But your request does not have a body! It is a simple GET with no parameters and no body.
Where exactly do you see that, and what do you suggest i should or could do to fix it ? Thanks
Joined: Aug 19, 2005
I suspect that you have used tcpmon between the browser and the PHP server. You need to use tcpmon between the PHP SOAP consumer and the Java SOAP provider. However I would suggest that you capture the request/response pairs between the working Java SOAP consumer and Java SOAP provider first to give you a baseline for what a valid request/response pair looks like.
Then capture the requests from (and responses, if any, for) the PHP and VBScript SOAP consumers and see how they need to be tweaked. In the worst case you may have to adjust the Java SOAP provider so that your PHP and VBScript consumers can access it (though it would probably be better to offer them an alternate endpoint that uses their protocol conventions).
The request/response pairs should look more like the ones shown in this post.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Where exactly do you see that
Tcpmon has captured your entire request and response - interpreting the lines we see that:
1. GET /SOAP-DOCUMENT_Echo.php HTTP/1.1 says this is a HTTP GET request - which typically have no body If a body had been sent, there would be a blank line after the headers, followed by the body text.
2. There is no Content-Length giving the length of a body or any other header related to content.
Follow Peer's suggestion and use TCPMON to look at typical valid SOAP request and response contents. [ January 21, 2008: Message edited by: William Brogden ]