How to specify jax-ws endpoint address in webservices client in JBoss EAP

Solution Verified - Updated -

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 call localhost, 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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content