atom feed6 messages in org.apache.ws.axis-user[axis2] Disable Chunk-Transfer-Encoding?
FromSent OnAttachments
Igor ArenzAug 1, 2006 4:53 am 
Eran ChinthakaAug 1, 2006 10:09 am 
Igor ArenzAug 2, 2006 7:25 am 
Kinichiro InoguchiAug 2, 2006 8:51 am 
Morgante ThomasAug 2, 2006 8:54 am 
Saminda AbeyruwanAug 3, 2006 1:20 am 
Subject:[axis2] Disable Chunk-Transfer-Encoding?
From:Igor Arenz (are@digital-security.com)
Date:Aug 1, 2006 4:53:58 am
List:org.apache.ws.axis-user

Hello List :-)

I need a little help. I want to connect to a extenal webService, i'm using axis2 as client. The first problem that occured was the apache-server on server-site (owned by a other company) that gave me a HTTP 411 Error.

The Apache-Log shows this errormessage: [error] [client x.x.x.x] chunked Transfer-Encoding forbidden:

So i used google to get a solution for this problem. I tried to disable this chunked transfer encoding. I tried

<javaCode> (for complet soucecode see below [1]) options.setProperty( MessageContextConstants.CHUNKED, Constants.VALUE_FALSE); </javaCode>

Now, axis throws me a exception: org.apache.axiom.om.OMException: Unsupported Operation at ..OMTextImpl.getText(OMTextImpl.java:254) at ..OMTextImpl.writeOutput(OMTextImpl.java:219) (for complet exception, see below [2])

This exception is thrown directly after the Log-message DEBUG:spool_8: org.apache.commons.httpclient.Wire (Wire.java:69) => >> "POST path?wsdl HTTP/1.1[\r][\n]"

As next, as test, I have set the client to http 1.0 with this option:

<javaCode> options.setProperty( MessageContextConstants.HTTP_PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_10); </javaCode>

The exception doesn't change, but the Point where it is thrown differs from HTTP 1.1. Now the exception is thrown after the complet logging og the http-header.

Can anybody say me, how to disable the transfer-encoding: chunked?

Thank you for your help!

Igor :-)

PS: sorry, but my english-teacher in school was not the best ;-)

[1]: complet client Sourcecode try { HttpTransportProperties.BasicAuthentication basicAuth = new HttpTransportProperties().new BasicAuthentication(); basicAuth.setUsername(username); basicAuth.setPassword(password);

Options options = new Options(); options.setTo(new EndpointReference(endpoint)); options.setProperty(HTTPConstants.BASIC_AUTHENTICATION, basicAuth);

// Timeout.... options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(180*1000)); options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,new Integer(180*1000));

// HTTP 1.0 /* options.setProperty( MessageContextConstants.HTTP_PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_10); */

options.setProperty( MessageContextConstants.CHUNKED, Constants.VALUE_FALSE);

ServiceClient serviceClient = new ServiceClient(); serviceClient.setOptions(options); serviceClient.sendReceive(generateRequest(job)); } catch (AxisFault axisFault) { LOG.error(axisFault.getMessage()); ... }

[2]: complet thrown exception DEBUG:spool_8: org.apache.commons.httpclient.Wire (Wire.java:69) => >> "POST path?wsdl HTTP/1.1[\r][\n]" java.lang.Error: org.apache.axiom.om.OMException: Caused by: org.apache.axiom.om.OMException: org.apache.axiom.om.OMException: Unsupported Operation at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:254) at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:219) at
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:405) at
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:398) at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:780) at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:809) at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:780) at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:809) at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:780) at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:809) at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:780) at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:171) at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:809) at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:381) at org.apache.axis2.transport.http.SOAPOverHTTPSender $AxisSOAPRequestEntity.writeBytes(SOAPOverHTTPSender.java:180) at org.apache.axis2.transport.http.SOAPOverHTTPSender $AxisSOAPRequestEntity.getContentLength(SOAPOverHTTPSender.java:232) at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.getRequestContentLength(EntityEnclosingMethod.java:332) at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.addContentLengthRequestHeader(EntityEnclosingMethod.java:402) at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.addRequestHeaders(EntityEnclosingMethod.java:370) at
org.apache.commons.httpclient.HttpMethodBase.writeRequestHeaders(HttpMethodBase.java:2036) at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1919) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993) at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:393) at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659) at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:109) at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:301) at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:651) at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:344) at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:280) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:538) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:472) at de.xxxxxxxxxxxx.SOAPNotifyBase.service(SOAPNotifyBase.java:78) at de.dominic.server.core.Job.run(Job.java:1400) ... 2 more