Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4835

cxf.xml spring configuation not getting picked up by default under CXF 2.7.3

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.6.6, 2.7.3
    • None
    • Configuration
    • None
    • Windows XP SP3
      Java 7u11

    • Unknown

    Description

      When upgrading from CXF 2.1.5 to CXF 2.7.3 it appears the HTTP conduits proxy server defined in cxf.xml are no longer used in certain scenarios.

      I went through all the migration guides and found no mention of this change. The cxf.xml is below:

      cxf.xml
      <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
             xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
                 http://cxf.apache.org/schemas/configuration/http-conf.xsd
                 http://www.springframework.org/schema/beans
                 http://www.springframework.org/schema/beans/spring-beans.xsd">
      
      	<http-conf:conduit name="*.http-conduit">
              <http-conf:client AllowChunking="false" ProxyServer="localhost" ProxyServerPort="8888" />
          </http-conf:conduit>
      </beans>
      

      Client is configured using:

      <jaxws:client id="pxWebService" serviceClass="XXX.services.dps.PaymentExpressWSSoap" address="${paymentExpress.ws.url}" />
      

      NOTE: I have no proxy server running on that port. Whatever I put in there makes no difference. This webservice uses SSL. From the stack trace below I can see it is making no attempt even try loading a proxy server (which it did under 2.1.5).

      This is a publiclly accessable WSDL file available at:
      https://qa4.paymentexpress.com/WS/PXWS.asmx?wsdl

      Exception:

      13:20:08 WARN  org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {http://PaymentExpress.com}PaymentExpressWSSoapService#{http://PaymentExpress.com}Check3dsEnrollment has thrown exception, u
      nwinding now
      org.apache.cxf.interceptor.Fault: Could not send Message.
              at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
              at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
              at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
              at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
              at $Proxy118.check3DsEnrollment(Unknown Source)
              at XXX.sales.manager.dps.DPSManagerImpl.get3DSecureURL(DPSManagerImpl.java:134)
              at XXX.online.controller.QuoteController.ccInstalmentPost(QuoteController.java:535)
              at XXX.online.controller.QuoteController$$FastClassByCGLIB$$3e7e4abc.invoke(<generated>)
              at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
              at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:627)
              at XXX.online.controller.QuoteController$$EnhancerByCGLIB$$8c5341af.ccInstalmentPost(<generated>)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:601)
              at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
              at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
              at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:746)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:687)
              at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
              at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
              at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
              at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
              at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
              at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
              at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
              at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
              at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              at org.mortbay.jetty.Server.handle(Server.java:326)
              at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
              at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
              at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
              at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
              at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
              at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
              at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      Caused by: java.net.UnknownHostException: UnknownHostException invoking https://qa4.paymentexpress.com/WS/PXWS.asmx: qa4.paymentexpress.com
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1338)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1322)
              at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
              at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
              at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
              ... 48 more
      Caused by: java.net.UnknownHostException: qa4.paymentexpress.com
              at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
              at java.net.Socket.connect(Socket.java:579)
              at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
              at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
              at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:270)
              at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:327)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
              at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
              at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1090)
              at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
              at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:170)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1282)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1233)
              at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:183)
              at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47)
              at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1295)
              ... 51 more
      13:20:08 ERROR XXX.online.controller.QuoteController - 3DS Enrollment Check Failed
      javax.xml.ws.WebServiceException: Could not send Message.
              at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:144)
              at $Proxy118.check3DsEnrollment(Unknown Source)
              at XXX.sales.manager.dps.DPSManagerImpl.get3DSecureURL(DPSManagerImpl.java:134)
              at XXX.online.controller.QuoteController.ccInstalmentPost(QuoteController.java:535)
              at XXX.online.controller.QuoteController$$FastClassByCGLIB$$3e7e4abc.invoke(<generated>)
              at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
              at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:627)
              at XXX.online.controller.QuoteController$$EnhancerByCGLIB$$8c5341af.ccInstalmentPost(<generated>)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:601)
              at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
              at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
              at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:746)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:687)
              at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)
              at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:822)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
              at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
              at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
              at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
              at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
              at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
              at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
              at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              at org.mortbay.jetty.Server.handle(Server.java:326)
              at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
              at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
              at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
              at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
              at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
              at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
              at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      Caused by: java.net.UnknownHostException: UnknownHostException invoking https://qa4.paymentexpress.com/WS/PXWS.asmx: qa4.paymentexpress.com
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1338)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1322)
              at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
              at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
              at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
              at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
              at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
              at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
              ... 41 more
      Caused by: java.net.UnknownHostException: qa4.paymentexpress.com
              at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
              at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
              at java.net.Socket.connect(Socket.java:579)
              at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
              at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
              at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:270)
              at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:327)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
              at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
              at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1090)
              at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
              at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:170)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1282)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1233)
              at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:183)
              at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47)
              at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
              at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1295)
              ... 51 more
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            brucejonesnz Bruce Jones
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: