• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
HTTP/1.1 and Chunked transfers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTTP/1.1 and Chunked transfers


  • Subject: HTTP/1.1 and Chunked transfers
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 6 Jul 2007 08:51:56 +1000

Hi there,

does anyone have any experience with receiving chunked data (or perhaps sending chunked requests specifying the content-length with Axis)?

I getting a 411 Length Required response in the client... so I'm trying to ascertain whether there's some commons-httpclient setting to have that generated when creating the requests (on the client side) or if something else's afoot.

Any ideas?

i.e., in the client application there's something like this:
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);
}
}
}


And the stack trace below when calling one of the webservice methods.

with regards,
--

Lachlan Deck


[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] &lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0// EN&quot;&gt;
[java] &lt;HTML&gt;&lt;HEAD&gt;
[java] &lt;TITLE&gt;411 Length Required&lt;/TITLE&gt;
[java] &lt;/HEAD&gt;&lt;BODY&gt;
[java] &lt;H1&gt;Length Required&lt;/H1&gt;
[java] A request of the requested method POST requires a valid Content-length.&lt;P&gt;
[java] chunked Transfer-Encoding forbidden: /cgi-bin/WebObjects/ WillowServices.woa/-55443/ws/MainService&lt;P&gt;
[java] &lt;HR&gt;
[java] &lt;ADDRESS&gt;Apache/1.3.33 Server at lds-mac.local Port 80&lt;/ADDRESS&gt;
[java] &lt;/BODY&gt;&lt;/HTML&gt;
[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] <..>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: HTTP/1.1 and Chunked transfers
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: WOBuilder Replacement
  • Next by Date: Re: HTTP/1.1 and Chunked transfers
  • Previous by thread: Re: checking webobject's version
  • Next by thread: Re: HTTP/1.1 and Chunked transfers
  • Index(es):
    • Date
    • Thread