Hi there,
I'm currently using Axis 1.4 (Java) and am attempting to utilise
chunked transfers (in the hope that this would simplify sending some
binary data)... anyway, when I enable chunked I get a (411)Length
Required exception (as seen below).
Any suggestions on the proper way to do this would be greatly
appreciated.
Thanks.
//
// Here's how I'm instantiating my stub.
//
public MainServiceSoapBindingStub mainStub() {
if ( _stub == null ) {
MainService_ServiceLocator serviceLocator;
serviceLocator = new MainService_ServiceLocator();
this._stub = (MainServiceSoapBindingStub)
serviceLocator.getMainService();
<...>
if ( < enable compression condition > ) {
Map httpSettings;
// Set property to compress requests
this._stub._setProperty(HTTPConstants.MC_GZIP_REQUEST,
Boolean.TRUE);
// Tell the server it can compress responses
this._stub._setProperty(HTTPConstants.MC_ACCEPT_GZIP,
Boolean.TRUE);
// enable chunking and http 1.1
httpSettings = new Hashtable();
httpSettings.put(MessageContext.HTTP_TRANSPORT_VERSION,
HTTPConstants.HEADER_PROTOCOL_V11);
httpSettings.put(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED,
Boolean.TRUE);
this._stub._setProperty(HTTPConstants.REQUEST_HEADERS,
httpSettings);
}
}
}
//
// exception when attempting to contact web service...
// Note: the webservice is not even hit as it's not
// even running yet, but certainly Apache is up).
//
[java] AxisFault
[java] faultCode: {http://xml.apache.org/axis/}HTTP
[java] faultSubcode:
[java] faultString: (411)Length Required
[java] faultActor:
[java] faultNode:
[java] faultDetail:
[java] {}:return code: 411
[java] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//
EN">
[java] <HTML><HEAD>
[java] <TITLE>411 Length Required</TITLE>
[java] </HEAD><BODY>
[java] <H1>Length Required</H1>
[java] A request of the requested method POST requires a valid
Content-length.<P>
[java] chunked Transfer-Encoding forbidden: /cgi-bin/WebObjects/
Test.woa/-51233/ws/MainService<P>
[java] <HR>
[java] <ADDRESS>Apache/1.3.33 Server at d-mac.local Port
80</ADDRESS>
[java] </BODY></HTML>
[java]
[java] {http://xml.apache.org/axis/}HttpErrorCode:411
[java]
[java] (411)Length Required
[java] at
org.apache.axis.transport.http.CommonsHTTPSender.invoke
(CommonsHTTPSender.java:218)
[java] at
org.apache.axis.strategies.InvocationStrategy.visit
(InvocationStrategy.java:32)
[java] at org.apache.axis.SimpleChain.doVisiting
(SimpleChain.java:118)
[java] at org.apache.axis.SimpleChain.invoke
(SimpleChain.java:83)
[java] at org.apache.axis.client.AxisClient.invoke
(AxisClient.java:165)
[java] at org.apache.axis.client.Call.invokeEngine
(Call.java:2784)
[java] at org.apache.axis.client.Call.invoke(Call.java:2767)
[java] at org.apache.axis.client.Call.invoke(Call.java:2443)
[java] at org.apache.axis.client.Call.invoke(Call.java:2366)
[java] at org.apache.axis.client.Call.invoke(Call.java:1812)
[java] at
my.client.app.ws.stubs.MainServiceSoapBindingStub.blahBlah
(MainServiceSoapBindingStub.java:874)
[java] <..>
with regards,
--
Lachlan Deck
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]