Web Service client's WSDL URL is rewritten to localhost when "modifySOAPAddress" = true in EAP 5
Issue
- We are calling a web service located at this URL (
http://erp-dev.example.com/ERPService.svc
) from the JBoss server using generated Apache CXF Java code. - When the service is called we get a redirect from JBoss as follows:
2013-06-24 10:29:14,611 INFO [com.example.xxx.WebServiceHandler] (http-127.0.0.1-8080-1) *** end point http://erp-dev.example.com/ERPService.svc?wsdl
2013-06-24 10:29:14,627 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (http-127.0.0.1-8080-1) Creating Service {http://example.com/}ERPService from WSDL: http://erp-dev.example.com/ERPService.svc?wsdl
2013-06-24 10:29:14,643 INFO [org.jboss.wsf.stack.cxf.AddressRewritingEndpointInfo] (http-127.0.0.1-8080-1) Setting new service endpoint address in wsdl: http://127.0.0.1:8080/ERPService.svc
2013-06-24 10:29:14,689 INFO [org.jboss.wsf.stack.cxf.AddressRewritingEndpointInfo] (http-127.0.0.1-8080-1) Setting new service endpoint address in wsdl: http://127.0.0.1:8080/ERPService.svc
2013-06-24 10:29:15,735 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-127.0.0.1-8080-1) Interceptor for {http://example.com/}ERPService#{http://example.com}GetItem has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
- This ultimately ends up as an HTTP 404 error because the web service can’t be found now.
- It’s similar to the issue described here: https://issues.jboss.org/browse/JBWS-3260
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 5
- JBoss WS CXF stack
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.