Mario-Leander Reimer
2012-06-18 11:32:31 UTC
Hi Mule users,
I am having troubles getting a <cxf:jaxws-client> to work properly when the
outbound endpoint needs to connect via a NTLM protected proxy server. The
first call to the backend service will usually fail, a second subsequent
call does usually work (probably due to keep-alive). The root exception is:
Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered
entity enclosing request can not be repeated.
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
I guess this might be related to the NTLM authentication challenge send by
the proxy server. But why is the first call not working properly? Any ideas
how this can be fixed without putting a retry logic in the calling client
applications (which is a workaround for now, but not a solution)??
Thanks for your help!
Leander
------------------ Stacktrace
------------------------------------------------------------------------------------
Caused by: org.mule.api.transport.DispatchException: Failed to route event
via endpoint: DefaultOutboundEndpoint{endpointUri=http
:// /PortalDataService/PortalDataService.asmx, connector=HttpConnector
{
name=httpConnector
lifecycle=start
this=66ec16c
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[http]
serviceOverrides=
dispatcher.factory=com.bmw.iap.osp.server.mule.HttpAutoProxyMessageDispatcherFactory
}
, name='endpoint.http ...PortalDataService.PortalDataService.asmx',
mep=REQUEST_RESPONSE, properties={}, transac
tionConfig=Transaction{factory=null, action=NEVER, timeout=0},
deleteUnacceptedMessages=false, initialState=started, responseTime
out=60000, endpointEncoding=UTF-8, disableTransportTransformer=false}.
Message payload is of type: PostMethod
at
org.mule.transport.http.HttpClientMessageDispatcher.execute(HttpClientMessageDispatcher.java:154)
at
org.mule.transport.http.HttpClientMessageDispatcher.doSend(HttpClientMessageDispatcher.java:271)
at
org.mule.transport.AbstractMessageDispatcher.process(AbstractMessageDispatcher.java:83)
at
org.mule.transport.AbstractConnector$DispatcherMessageProcessor.process(AbstractConnector.java:2515)
at
org.mule.module.cxf.CxfOutboundMessageProcessor.processNext(CxfOutboundMessageProcessor.java:151)
at
org.mule.module.cxf.transport.MuleUniversalConduit.processNext(MuleUniversalConduit.java:353)
at
org.mule.module.cxf.transport.MuleUniversalConduit.dispatchMuleMessage(MuleUniversalConduit.java:250)
... 98 more
Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered
entity enclosing request can not be repeated.
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
I am having troubles getting a <cxf:jaxws-client> to work properly when the
outbound endpoint needs to connect via a NTLM protected proxy server. The
first call to the backend service will usually fail, a second subsequent
call does usually work (probably due to keep-alive). The root exception is:
Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered
entity enclosing request can not be repeated.
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
I guess this might be related to the NTLM authentication challenge send by
the proxy server. But why is the first call not working properly? Any ideas
how this can be fixed without putting a retry logic in the calling client
applications (which is a workaround for now, but not a solution)??
Thanks for your help!
Leander
------------------ Stacktrace
------------------------------------------------------------------------------------
Caused by: org.mule.api.transport.DispatchException: Failed to route event
via endpoint: DefaultOutboundEndpoint{endpointUri=http
:// /PortalDataService/PortalDataService.asmx, connector=HttpConnector
{
name=httpConnector
lifecycle=start
this=66ec16c
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[http]
serviceOverrides=
dispatcher.factory=com.bmw.iap.osp.server.mule.HttpAutoProxyMessageDispatcherFactory
}
, name='endpoint.http ...PortalDataService.PortalDataService.asmx',
mep=REQUEST_RESPONSE, properties={}, transac
tionConfig=Transaction{factory=null, action=NEVER, timeout=0},
deleteUnacceptedMessages=false, initialState=started, responseTime
out=60000, endpointEncoding=UTF-8, disableTransportTransformer=false}.
Message payload is of type: PostMethod
at
org.mule.transport.http.HttpClientMessageDispatcher.execute(HttpClientMessageDispatcher.java:154)
at
org.mule.transport.http.HttpClientMessageDispatcher.doSend(HttpClientMessageDispatcher.java:271)
at
org.mule.transport.AbstractMessageDispatcher.process(AbstractMessageDispatcher.java:83)
at
org.mule.transport.AbstractConnector$DispatcherMessageProcessor.process(AbstractConnector.java:2515)
at
org.mule.module.cxf.CxfOutboundMessageProcessor.processNext(CxfOutboundMessageProcessor.java:151)
at
org.mule.module.cxf.transport.MuleUniversalConduit.processNext(MuleUniversalConduit.java:353)
at
org.mule.module.cxf.transport.MuleUniversalConduit.dispatchMuleMessage(MuleUniversalConduit.java:250)
... 98 more
Caused by: org.apache.commons.httpclient.ProtocolException: Unbuffered
entity enclosing request can not be repeated.
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:487)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)