#636 ClassCastException when invoking Webservice by https

open
nobody
general (369)
7
2014-12-10
2012-08-30
JW
No

ClassCastException is thrown when trying to hit webservice by ssl. My setup is Windows XP + Proxy + SoapUI 4.5.0/4.5.1.

This bug was introduced in 4.5.0 and still exists in 4.5.1. There are many complaints about it in public forums, for many people it makes SoapUI useless.

Stacktrace:
Tue Aug 28 13:00:30 CEST 2012:ERROR:java.lang.ClassCastException: org.apache.http.message.BasicHttpRequest cannot be cast to org.apache.http.impl.client.RequestWrapper
java.lang.ClassCastException: org.apache.http.message.BasicHttpRequest cannot be cast to org.apache.http.impl.client.RequestWrapper
at com.eviware.soapui.impl.wsdl.support.http.HeadderRequestInterceptor.process(HeadderRequestInterceptor.java:42)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:108)
at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:174)

Discussion

  • JW
    JW
    2012-08-30

    • priority: 5 --> 7
     
  • Hi,
    I experienced the ClassCastException problem.
    It was resoved by removing the proxy settings in soapUI: File > Preferences > Proxy Settings.

    Davo

     
  • JW
    JW
    2012-08-31

    Hi David,

    thats the point - we cannot remove proxy settings because we must use corporate proxy.

    Regards,
    Jakub

     
  • robert
    robert
    2012-08-31

    Hello,

    Fix for this bug is available in nightly build. Please get it and try.

    robert

     
  • JW
    JW
    2012-08-31

    Just checked nightly build and ClassCastException is gone. Thanks Robert. :)

    Unfortunately situation does not get much better. There is a request and a response in logs (step ahead!) but we cannot authenticate to proxy. We use BASIC authentication, but I can see in logs:
    "Fri Aug 31 10:48:44 CEST 2012:INFO:www-ad-proxy.sabre.com:80 requires Windows authentication"
    which is so untrue. We should have "Proxy-Authorization: Basic xxxxxx" header sent in the proxy request,but its gone, I don't have domain name as part of username or in any other place. Why its presuming that we need NTLM authentication?

    This works in 4.0.1.

    On the end we have this NPE:

    Fri Aug 31 10:48:44 CEST 2012:ERROR:Exception in request: java.lang.NullPointerException
    Fri Aug 31 10:48:44 CEST 2012:ERROR:An error occured [java.lang.NullPointerException], see error log for details
    Fri Aug 31 10:48:44 CEST 2012:INFO:Error getting response for [SPMbind.HotelAvail:availabilityRQ]; java.lang.NullPointerException
    Fri Aug 31 10:48:44 CEST 2012:ERROR:java.lang.NullPointerException
    java.lang.NullPointerException
    at org.apache.http.impl.auth.NTLMEngineImpl.stripDotSuffix(NTLMEngineImpl.java:175)
    at org.apache.http.impl.auth.NTLMEngineImpl.convertDomain(NTLMEngineImpl.java:188)
    at org.apache.http.impl.auth.NTLMEngineImpl.access$500(NTLMEngineImpl.java:45)
    at org.apache.http.impl.auth.NTLMEngineImpl$Type1Message.<init>(NTLMEngineImpl.java:766)
    at org.apache.http.impl.auth.NTLMEngineImpl.getType1Message(NTLMEngineImpl.java:128)
    at org.apache.http.impl.auth.NTLMEngineImpl.generateType1Msg(NTLMEngineImpl.java:1298)
    at org.apache.http.impl.auth.NTLMScheme.authenticate(NTLMScheme.java:125)
    at org.apache.http.impl.auth.AuthSchemeBase.authenticate(AuthSchemeBase.java:124)
    at org.apache.http.client.protocol.RequestProxyAuthentication.process(RequestProxyAuthentication.java:113)
    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.createTunnelToTarget(DefaultRequestDirector.java:830)
    at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:739)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:565)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    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:242)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

    Do you want me to create new issue for this?