Hi guys,
I encountered a problem when trying to call an XFire SOAP service using a SOAP
client generated with Axis,
and after finding the "solution" I decided to share it with you so you won't
have to repeat my steps.
I'll be short:
When trying to call an XFire SOAP service using a SOAP client generated with
Axis, I get the following (very cryptic) fault:
<code>
Index: 1, Size: 1
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: Index: 1, Size: 1
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Index: 1, Size: 1
</code>
This is generated by an internal IndexArrayOutOfBoundsException (which I
couldn't determine only after step-by-step debugging through the XFire
sources), at line 191 in org.codehaus.xfire.service.binding.AbstractBinding
(xfire-distribution-1.2.4-sources.jar):
<code>
p = (MessagePartInfo)
opInfo.getInputMessage().getMessageParts().get(param);
</code>
Basically, the parser is trying to get the next xml element in the request,
which doesn't exist.
When examining the SOAP message, I found this:
<code>
<soapenv:Body>
xmlns:ns1="urn:MyNamespace">
<in0 href="#id0"/>
</ns1:myMethod>
........
</code>
The problem is caused by the <multiRef> stuff.
So it seems that the request is using RPC encoding, and unfortunately XFire
doesn't support RPC encoding.
So the "solution" is: do not use RPC encoding in your SOAP request. And
preferably use an XFire client when accessing an XFire service :)
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news