ClientProtocolException since 4.5.1 upgrade.

Report your bugs here, Thank you!

ClientProtocolException since 4.5.1 upgrade.

Postby CyberOwl » 09 Jul 2012 11:59

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]"
CyberOwl
User
 
Posts: 3
Joined: 09 Jul 2012 11:50

Re: ClientProtocolException since 4.5.1 upgrade.

Postby jackos » 12 Jul 2012 11:30

I would echo this.

When I make a call to a password protected web service using any username and password (correct combination or incorrect) in the request properties I get a ClientProtocolException. There is a http 401 page in the http log (this appears whether I use the correct username/password or not) but this is not displayed in the request window.

If I don't enter any credentials in the request properties the 401 page displays correctly in the request window.
jackos
User
 
Posts: 1
Joined: 12 Jul 2012 11:22

Re: ClientProtocolException since 4.5.1 upgrade.

Postby honda1 » 12 Jul 2012 15:04

I have a similar problem.

I created a test in SoapUI 4.5.0, which is working fine. The test makes a https request that needs to pass along basic authetication credentials. It all works fine in SoapUI.

But when I try to use the same test in LoadUI 2.1.0 using soapUI runner, it fails with the following exception.

Any suggestions?

2012-07-12 09:50:35,212 ERROR [errorlog] 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 com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:76)
at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:238)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:417)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:238)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:147)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:42)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:730)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:575)
at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:507)
at com.eviware.loadui.impl.component.categories.RunnerBase.access$700(RunnerBase.java:68)
at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:774)
at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:198)
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)
... 20 more
honda1
User
 
Posts: 2
Joined: 12 Jul 2012 14:58

Re: ClientProtocolException since 4.5.1 upgrade.

Postby honda1 » 12 Jul 2012 15:17

Just to add to my post above. I installed soapUI 4.5.1 and I got the same problem in soapUI as well.

But I am able to resolve this by changing the 'Authorisation Type' to 'Preemptive' in 'Aut' tab of my soap request.

But now, when I use the same test in loadUI as soapRunner, the test fails without any error message either in soapui-errors.log or soapui.log. How should I be troubleshooting this when the test fails with no error messages?
honda1
User
 
Posts: 2
Joined: 12 Jul 2012 14:58

Re: ClientProtocolException since 4.5.1 upgrade.

Postby pgoovaerts » 21 Jul 2012 13:34

Same here, webservice with basic authentication works fine in 4.5.0 but now fails in 4.5.1
I upgraded because of Keystore secured webservices bug with version 4.5.0 which is now working correctly.

So, now i'm foced to use 2 versions:
- 4.5.0 for the Basic Authenticed webservices
- 4.5.1 for the Keystore secured webservices

Please guy's, can you check this please?
pgoovaerts
User
 
Posts: 2
Joined: 17 Feb 2011 13:01

Re: ClientProtocolException since 4.5.1 upgrade.

Postby mkoron » 16 Aug 2012 14:41

it's not a bug, it's a feature ;)

go into preferences->http settings and check the 'Authenticate Preemptively' box.
(btw. i think it should be checked by default...)
mkoron
User
 
Posts: 4
Joined: 19 Apr 2012 17:44

Re: ClientProtocolException since 4.5.1 upgrade.

Postby lbreuss » 27 Aug 2012 17:08

pgoovaerts observation is correct. Until it's fixed, you have to use soapUI 4.5.0 for Basic Auth and soapUI 4.5.1 for Keystore Auth. (This should have been caught by a regression test before releasing, shouldn't it?)

@mkoron: Your suggestion for 4.5.1 does not work. My Testcases each already have Preemptive Authentication configured, and setting it in the preferences did not help either.
I use Wireshark to see the traffic. Here are the relevant chunks from the request and response.

Code: Select all
Authorization: Basic dXNlcjE6aW52YWxpZHB3
  Credentials: user1:invalidpw
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Response from JBoss EJB web service: (401 is correct and intended)
Code: Select all
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="EJBWebServiceEndpointServlet Realm"

The realm in the response is not empty.

Assertions on the HTTP status code don't work in soapUI 4.5.1 when an exception org.apache.http.client.ClientProtocolException occurs. This should succeed, but keeps failing:
Code: Select all
assert messageExchange.responseStatusCode == 401


Testing with soapUI 4.5.0 the test case succeeds (responseStatusCode == 401 is successfully asserted, no Exception occurs).
lbreuss
User
 
Posts: 2
Joined: 27 Aug 2012 16:35

Re: ClientProtocolException since 4.5.1 upgrade.

Postby CyberOwl » 26 Sep 2012 07:20

'Authenticate Preemptively' doesn't work for me neither. Will keep using 4.5.0 sigh... :'(
CyberOwl
User
 
Posts: 3
Joined: 09 Jul 2012 11:50

Re: ClientProtocolException since 4.5.1 upgrade.

Postby Pat » 10 Oct 2012 18:39

For a temporary workaround in 4.5.1 you can set the headers in the request before sending it. That seems to have solved it for me.
Pat
soapui pro users
soapui pro users
 
Posts: 11
Joined: 28 Sep 2009 18:34

Nice

Postby steward15 » 12 Oct 2012 07:39

Mit den aktuellen Windows Updates gibt es keine Probleme mehr mit Internet Explorer 9 und SmartStore.biz 5.
steward15
User
 
Posts: 1
Joined: 12 Oct 2012 07:32

Re: ClientProtocolException since 4.5.1 upgrade.

Postby revzz » 27 Nov 2012 16:34

I am using my tests in continus integration mode with soapui plugin and I get the same problem with authentification.

I confirm problems with HttpSettings@authenticate-preemptively=true on 4.5.1.

Usualy,I overrite this value in my POM.XML to authenticate.
I notice this property HttpSettings@authenticate-preemptively is working using soapui-settings.xml, but not with spécific overloading in POM.

So, editing soapui-settings.xml could be a good work around for you.

There is a few documentation about setting values like HttpSettings@authenticate-preemptively, so I cannot be totally sure of this solution.
revzz
User
 
Posts: 1
Joined: 27 Nov 2012 16:25

Re: ClientProtocolException since 4.5.1 upgrade.

Postby suneethanr » 19 Dec 2012 11:01

revzz wrote:I am using my tests in continus integration mode with soapui plugin and I get the same problem with authentification.

I confirm problems with HttpSettings@authenticate-preemptively=true on 4.5.1.

Usualy,I overrite this value in my POM.XML to authenticate.
I notice this property HttpSettings@authenticate-preemptively is working using soapui-settings.xml, but not with spécific overloading in POM.

So, editing soapui-settings.xml could be a good work around for you.

There is a few documentation about setting values like HttpSettings@authenticate-preemptively, so I cannot be totally sure of this solution.


Hi Everyone,

Even i also faced the same problem when i upgrade it to 4.5.1 so as per one of the above replies, i made a change in File->Preferences->HTTP Settings and checked the Authenticate Preemptively and it worked for the SOAP requests but not for HTTP request

So kindly let me know, is there any way to solve this?
suneethanr
User
 
Posts: 1
Joined: 17 Dec 2012 07:28

Re: ClientProtocolException since 4.5.1 upgrade.

Postby CyberOwl » 22 Apr 2013 08:22

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?
CyberOwl
User
 
Posts: 3
Joined: 09 Jul 2012 11:50


Return to soapUI Bugs