Just bringing part of the discussion back here - as I don't think that when chunking is turned on in the Axis client that the request is making it to WO in the first place before getting a 411 error code.

Anyone have any ideas on this? e.g., anyone successfully using chunking transfers from a soap client?

Thanks.

On 06/07/2007, at 8:54 AM, Mike Schrag wrote:

Post this on the Wonder list and Anjo can probably tell you more ... Wonder has a replacement for WOHttpIO where Anjo implemented support for chunked data.

/**
* Bugfix class that adds support for chunked content, which a HTTP 1.0 client MUST * support. This is escpecially important for Axis clients > 1.1. <br /> * If this class is going to be used, you need to make sure that it comes before
 * JavaWebObjects in the classpath.
 *
 * @author ak
 */

ms

On Jul 5, 2007, at 6:51 PM, Lachlan Deck wrote:

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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag% 40mdimension.com

This email sent to [EMAIL PROTECTED]


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/lachlan.deck% 40gmail.com

This email sent to [EMAIL PROTECTED]

with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to