[jboss-user] [JBoss Web Services] - Bizzare host re-write in JAX-WS client on JB7.0.2

Eric B do-not-reply at jboss.com
Thu Jun 7 10:30:06 EDT 2012


Eric B [https://community.jboss.org/people/benze] created the discussion

"Bizzare host re-write in JAX-WS client on JB7.0.2"

To view the discussion, visit: https://community.jboss.org/message/740458#740458

--------------------------------------------------------------
Hi,

I've run into a strange issue with JB7.0.2.FINAL with a JAX-WS client that is getting its destination address rewritten.  The issue is not unsimilar to  https://community.jboss.org/thread/164507?tstart=0 https://community.jboss.org/thread/164507?tstart=0 or  https://issues.jboss.org/browse/JBWS-3260 https://issues.jboss.org/browse/JBWS-3260.  I don't know if this is a bug or rather if it is a configuration problem on my side.

I have created a JAX-WS WebService which encompases a client to communicate with another webservice.  When my WS first calls the client, I see the following in my log file and the client connects without problems.


14:44:11,500 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (http--0.0.0.0-8080-1) Creating Service {http://www.mydom.ca/AgmtProdOpers/LoanAgreementMgmt/V1}LoanAgreementMgmtHttpService from WSDL: http://server1.npr.local/tu/LoanAgreementMgmt/V1?wsdl
14:44:15,377 INFO  [org.jboss.wsf.stack.cxf.transport.AddressRewritingEndpointInfo] (http--0.0.0.0-8080-1) Setting new service endpoint address in wsdl: http://10.68.30.25:80/tu/LoanAgreementMgmt/V1
14:44:16,186 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (http--0.0.0.0-8080-1) Creating Service {http://www.mydom.ca/AgmtProdOpers/LoanAgreementMgmt/V1}LoanAgreementMgmtHttpService from WSDL: http://server1.npr.local/tu/LoanAgreementMgmt/V1?wsdl
14:44:16,195 INFO  [org.jboss.wsf.stack.cxf.transport.AddressRewritingEndpointInfo] (http--0.0.0.0-8080-1) Setting new service endpoint address in wsdl: http://10.68.30.25:80/tu/LoanAgreementMgmt/V1
14:44:16,252 INFO  [org.jboss.wsf.stack.cxf.transport.AddressRewritingEndpointInfo] (http--0.0.0.0-8080-1) Setting new service endpoint address in wsdl: http://localhost:8080/tu/LoanAgreementMgmt/V1




However, the second (and subsequent) times I call the same client, I get the following in my logs and the client fails to connect:


14:44:26,893 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (http--0.0.0.0-8080-1) Creating Service {http://www.mydom.ca/AgmtProdOpers/LoanAgreementMgmt/V1}LoanAgreementMgmtHttpService from WSDL: http://server1.npr.local/tu/LoanAgreementMgmt/V1?wsdl
14:44:26,903 INFO  [org.jboss.wsf.stack.cxf.transport.AddressRewritingEndpointInfo] (http--0.0.0.0-8080-1) Setting new service endpoint address in wsdl: http://localhost:8080/tu/LoanAgreementMgmt/V1
14:44:27,570 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (http--0.0.0.0-8080-1) Creating Service {http://www.mydom.ca/AgmtProdOpers/LoanAgreementMgmt/V1}LoanAgreementMgmtHttpService from WSDL: http://server1.npr.local/tu/LoanAgreementMgmt/V1?wsdl
14:44:27,579 INFO  [org.jboss.wsf.stack.cxf.transport.AddressRewritingEndpointInfo] (http--0.0.0.0-8080-1) Setting new service endpoint address in wsdl: http://localhost:8080/tu/LoanAgreementMgmt/V1
14:44:27,625 INFO  [org.jboss.wsf.stack.cxf.transport.AddressRewritingEndpointInfo] (http--0.0.0.0-8080-1) Setting new service endpoint address in wsdl: http://localhost:8080/tu/LoanAgreementMgmt/V1
...
...
...
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when communicating with http://localhost:8080/tu/LoanAgreementMgmt/V1
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1554)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1493)
          at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1401)
          at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
          at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:648)




This time around, the client tries to connect to localhost:8080 which is obviously not the correct address/port for the destination service.

If I edit the standalone-preview.xml file and change the default setting


        <subsystem xmlns="urn:jboss:domain:webservices:1.0" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:jaxwsconfig="urn:jboss:jbossws-jaxws-config:4.0">
            <wsdl-host>
                localhost
            </wsdl-host>
            <modify-wsdl-address>
                true
            </modify-wsdl-address>
...
...



to

        <subsystem xmlns="urn:jboss:domain:webservices:1.0" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:jaxwsconfig="urn:jboss:jbossws-jaxws-config:4.0">            <wsdl-host>                localhost            </wsdl-host>            <modify-wsdl-address>                false            </modify-wsdl-address>......


then everything works as expected.


15:39:45,129 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (http-0.0.0.0-0.0.0.0-8080-1) Creating Service {http://www.mydom.ca/AgmtProdOpers/LoanAgreementMgmt/V1}LoanAgreementMgmtHttpService from WSDL: http://server1.npr.local/tu/LoanAgreementMgmt/V1?wsdl
15:39:45,139 INFO  [org.jboss.wsf.stack.cxf.transport.AddressRewritingEndpointInfo] (http-0.0.0.0-0.0.0.0-8080-1) Setting new service endpoint address in wsdl: http://10.68.30.25:80/tu/LoanAgreementMgmt/V1
15:39:45,627 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (http-0.0.0.0-0.0.0.0-8080-1) Creating Service {http://www.mydom.ca/AgmtProdOpers/LoanAgreementMgmt/V1}LoanAgreementMgmtHttpService from WSDL: http://server1.npr.local/tu/LoanAgreementMgmt/V1?wsdl
15:39:45,637 INFO  [org.jboss.wsf.stack.cxf.transport.AddressRewritingEndpointInfo] (http-0.0.0.0-0.0.0.0-8080-1) Setting new service endpoint address in wsdl: http://10.68.30.25:80/tu/LoanAgreementMgmt/V1





Is this a configuration issue on my side, or is this still a trailing bug from the CXF stack (see above jira link)?

Thanks,

Eric
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/740458#740458]

Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120607/b85ae6f9/attachment.html 


More information about the jboss-user mailing list