A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Web Services
Author
SOAPBodyElement in Axis
Dominic Steng�rd
Ranch Hand
Joined: Feb 05, 2001
Posts: 186
posted
Jan 23, 2008 06:32:00
0
Hey Javacoders!
When running call.invoke() in my current Axis client the following SOAP body is generated and sent:
<soapenv:Body> <Export_s soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <arg0 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">username</arg0> <arg1 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">password</arg1> <arg2 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">string</arg2> </Export_s> </soapenv:Body>
What the Web Service expects is:
<soap:Body> <Export_s xmlns="https://service.javaranch.com/"> <username>username</username> <password>password</password> <xmlDocument>string</xmlDocument> </Export_s> </soap:Body>
As you can tell the xml elements <username>, <password> and <xmlDocument> are not included in the Axis generated
SOAPBody
but are called <argx>.
How can I use call.invoke() and set the
SOAPBody
elements to specific names, not the default <argx> names?
Kind regards
Dominic Steng�rd<br />Sun Certified Java 2 Programmer
Arthur Ford
Greenhorn
Joined: Sep 06, 2006
Posts: 22
posted
Jan 23, 2008 15:57:00
0
Change your client to generate document/literal encoding of the SOAP message. Looks like your client now is doing a rpc/encoded style.
I agree. Here's the link:
http://zeroturnaround.com/jrebel/download
subject: SOAPBodyElement in Axis
Similar Threads
Apache axis arraylist problem
Exception: java.lang.illegal Argument Exception
WS-I monitor?
problem with perl web services and java client
axis, xsd:int and multiRef
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter