I'm not sure what the problem is, after your description. "rpc" is a binding
style, comparable to "document" or "message" - the parameter styles are
wrapped, literal, or encoded. XFire doesn't support "encoded" parameters, I
don't believe ... but, if your XFire service isn't advertising as such, the
Axis client shouldn't send it as such (I don't think that's what's happening
here, in any case). XFire does support "rpc", "document", and "message"
binding styles.

Our XFire service uses XFire's 'default' binding/parameter style
(document/literal, I think) and we've successfully used XFire's client
stubs, XFire's client API, Axis 1.0 stubs on Websphere, Websphere stubs, and
Axis 2.0 stubs.

I think it would be worthwhile to dig further into the problem to figure out
what the problem is - could you provide more information on your service,
how its exposed, what marshalling you're using (JAXB, XMLBeans, Aegis,
etc.), and anything else you can provide.

Cheers,
Brice

On 1/18/07, Sorin Postelnicu <[EMAIL PROTECTED]> wrote:

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<http://schemas.xmlsoap.org/soap/envelope/%7DServer>
 faultSubcode:
 faultString: Index: 1, Size: 1
 faultActor:
 faultNode:
 faultDetail:
    
{http://xml.apache.org/axis/}stackTrace:Index<http://xml.apache.org/axis/%7DstackTrace: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 :)


------------------------------
Expecting? Get great news right away with email 
Auto-Check.<http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html>
Try the Yahoo! Mail 
Beta.<http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html>




--
Brice Ruth
Software Engineer, Madison WI

Reply via email to