Forum Discussion

CyberOwl's avatar
CyberOwl
New Contributor
12 years ago

ClientProtocolException since 4.5.1 upgrade.

Exception occuring when calling securised Web Service. Works fine in 4.5.0.


SOAP UI Log
Mon Jul 09 12:50:07 CEST 2012:INFO:nlbnetprd.cid.dom:80 requires authentication with the realm 'UserDataWebService'
Mon Jul 09 12:50:07 CEST 2012:ERROR:Exception in request: org.apache.http.client.ClientProtocolException
Mon Jul 09 12:50:07 CEST 2012:ERROR:An error occured [org.apache.http.client.ClientProtocolException], see error log for details
Mon Jul 09 12:50:07 CEST 2012:INFO:Error getting response for [ServiceSoap.GetXmlUserData:Request 1]; org.apache.http.client.ClientProtocolException

Error log
Mon Jul 09 12:50:07 CEST 2012:ERROR:org.apache.http.client.ClientProtocolException
org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:236)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:345)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:241)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.ProtocolException: Content-Length header already present
at org.apache.http.protocol.RequestContent.process(RequestContent.java:67)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108)
at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.preProcess(HttpClientSupport.java:106)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:452)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
... 11 more

http log
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "POST /UserDataWebService/service.asmx HTTP/1.1[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "SOAPAction: "http://tempuri.org/GetXmlUserData"[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "Content-Length: 286[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "Host: nlbnetprd.cid.dom[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">[\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> " <soapenv:Header/>[\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> " <soapenv:Body>[\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> " <tem:GetXmlUserData>[\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> " <tem:noPolice>123456</tem:noPolice>[\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> " </tem:GetXmlUserData>[\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> " </soapenv:Body>[\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:>> "</soapenv:Envelope>"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "Cache-Control: private[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "Content-Type: text/html[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "X-AspNet-Version: 4.0.30319[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "WWW-Authenticate: Digest realm="UserDataWebService", nonce="Ny85LzIwMTIgMTI6NTE6MDYgUE0", opaque="0000000000000000", stale=false, algorithm=MD5, qop="auth"[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "Date: Mon, 09 Jul 2012 10:50:05 GMT[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "Connection: close[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "Content-Length: 1293[\r][\n]"
Mon Jul 09 12:50:07 CEST 2012:DEBUG:<< "[\r][\n]"

16 Replies

  • CyberOwl's avatar
    CyberOwl
    New Contributor
    We are already in mid April, but I didn't see any comment from development team about a possible modification to re enable authentication the old fashion.

    This problem will simply be ignored?
  • jafari's avatar
    jafari
    Occasional Contributor
    I'm trying to investigate and fix this bug, but I haven't been able to reproduce it neither for SOAP nor for HTTP requests. If anyone has an example project and (public) service that demonstrates the issue, or reliable steps to reproduce it, please share them as they would help greatly.

    --Arian
  • jafari's avatar
    jafari
    Occasional Contributor
    Also, if you haven't already, try running with "Pre-emptive authentication" (Preferences -> HTTP Settings) both checked and unchecked. For those experiencing the issue - are you behind a proxy?
  • jafari's avatar
    jafari
    Occasional Contributor
    One last thing, most important of all - try upgrading to SoapUI 4.5.2. I am able to reproduce the issue in 4.5.1, but not in 4.5.2.
  • Also, if you haven't already, try running with "Pre-emptive authentication" (Preferences -> HTTP Settings) both checked and unchecked. For those experiencing the issue - are you behind a proxy?

    This worked for me. Goto Preferences -- > HTTP Settings -- > check Pre-emptive authentication
  • One of our Project Managers had the same problem when using SoapUI-4.6.4.
    I confirmed his problem using his script with my soapUI-4.6.4 version.
    I then solved his problem by using an older SoapUI-3.6.1 version I happened to have laying around.

    Hope This Helps!