You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by Da...@kp.org on 2003/02/18 02:32:56 UTC

[wsif] Content length error

I've written two WSIF clients, one dynamic and the other a stub version, 
that call the same existing web service on my Intranet. The service is 
implemented using Apache SOAP. Both clients are using a soap provider. The 
stub client returns this error:

org.apache.wsif.WSIFException: org.apache.wsif.soap.fault.object:Content 
length
must be specified.
        at org.apache.wsif.base.WSIFClientProxy.invoke(Unknown Source)
        at $Proxy0.getMembershipDetails(Unknown Source)
        at client.RunStubSOAP.main(Unknown Source)

The dynamic client returns a similar error of "content length must be 
specified". Using other, non-WSIF clients show the web service is running 
fine, without errors.

I'm monitoring  what's traveling over the wire. I see that 
"content-length" is set in the HTTP header, in both directions. (I'm 
assuming this is what content length is referring to.) The body of the 
response looks like this:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Protocol</faultcode>
<faultstring>Content length must be specified.</faultstring>
<faultactor>/MemberWebService/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>

</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Thinking that Axis running client-side and SOAP running server-side could 
be a problem, I set WSIFPluggableProviders.overrideDefaultProvider(...), 
but this didn't seem to make any difference. As a matter of fact, it seems 
to be having no affect at all, because the "User-Agent" header still says 
"Axis/1.0" in the request header. Is there another way to force the 
default provider to Apache SOAP?

In the request body I see a "multiref" element and I'm wondering if that's 
the "content length" problem. Does Apache SOAP understand multirefs? 

Any help/hints would be greatly appreciated.

Thanks,
David