If you're using DII to invoke the service directly, you need to specify the namespace yourself (using the setOperationName() method of the Call object that takes a QName, I think - I haven't used this in a while). You'd also configure the encoding on the Call object to avoid the extraneous encodingStyle attribute on the response, using the setOperationUse("literal") call, I think, and setOperationStyle("document") would hopefully eliminate the xsi:type information.
- Dennis
Thomas Bolioli wrote:
Thanks but I have no idea how to add the namespace declaration using the axis api (no obvious answer in the Call API) so any help there would be greatly appreciated. Is this a bug that needs to be fixed??? If so I can look into it if someone can point me to the correct class to start editing. I have limited knowledge on the Axis API so a pointer to start would be helpful.
Thanks,
Tom
Dennis Sosnoski wrote:
Probably the more important issue here is that Axis is generating the testpostdata element (and child element) without a namespace, while judging from the VB client request these need to be in the http://ar.masstech-pts.org/ namespace. If the element's in the wrong (or no) namespace, it's garbage.
- Dennis
Dennis M. Sosnoski Enterprise Java, XML, and Web Services Support http://www.sosnoski.com Redmond, WA 425.885.7197
Jim Murphy wrote:
Looks like the .NET service is doc/lit and the axis client is sending an rpc/encoded request. Notice the encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" attribute on the Body child element.
Thomas Bolioli wrote:
I am writing an Axis client to interface with a VB.NET soap service and I am having an issue with the axis client (vb client apparently works) where the soap service is not getting the string being passed through the only function and argument the service takes. Below are the two envelopes. What could be causing this? Since it is authenticating, I am pretty sure the problem is in the body of the envelope and not the header. I am at a loss since the differences (see testpostdata and xmldata elements) between these two are minimal and seem to be more semantic than anything of substance.
Thanks in advance,
Tom
VB.Net Client envelope
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<cAuthentication xmlns="http://ar.masstech-pts.org/">
<UserName>username</UserName>
<Password>******</Password>
</cAuthentication>
</soap:Header>
<soap:Body>
<testpostdata xmlns="http://ar.masstech-pts.org/">
<xmldata>String Here...
</xmldata>
</testpostdata></soap:Body></soap:Envelope>
Axis client envelope
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:cAuthentication soapenv:mustUnderstand="0" xmlns:ns1="http://ar.masstech-pts.org/">
<ns1:UserName>username</ns1:UserName>
<ns1:Password>*******</ns1:Password>
</ns1:cAuthentication>
</soapenv:Header>
<soapenv:Body>
<testpostdata soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<xmldata xsi:type="xsd:string">String Here...
</xmldata>
</testpostdata>
</soapenv:Body>
