How to specify jax-ws endpoint address in webservices client in JBoss EAP
Issue
-
I am following this Development Guide to write a JAX-WS client, I'm able to generate the client code using
wsconsume.sh
/wsconsume.bat
, but when I use the generated client to make remote call, it always tries to calllocalhost
, since there is no service running locally, I get error below:22:07:36,150 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jax-ws-client].[ClientServlet]] (http-10.10.10.10:8080-2) JBWEB000236: Servlet.service() for servlet ClientServlet threw exception: javax.xml.ws.WebServiceException: Could not send Message. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:147) ...... Caused by: java.net.ConnectException: ConnectException invoking http://localhost:8080/jax-ws-server/TestService/Test: Connection refused (Connection refused) ...... Caused by: java.net.ConnectException: Connection refused (Connection refused) ......
-
How do I use
javax.xml.ws.BindingProvider
to specify the remote target SOAP webservices address in IP address and port number ?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4
- 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.