JBossWS Service caching fails if Web Service is unavilable

Solution In Progress - Updated -

Issue

We try to cache Service instance in our Web Service client as discussed here

When the Service is instantiated if remote server is available there are no problems. But if remote server is not reachable, the Service is well instantiated, but not correctly initialized. This means our code does not know the Service is not initialized and every subsequent call to the endpoint fails.

2014-07-30 10:16:20,486 WARN  [org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl] (http-0.0.0.0-8080-1) Cannot access wsdlURL: http://someHostName:8080/ws/services/MyWS?wsdl
2014-07-30 10:16:20,490 WARN  [org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl] (http-0.0.0.0-8080-1) Cannot get port meta data for: {http://org.jboss.support.examples/}MyWSPort

In JBoss EAP 6 or JBoss EAP 5 with CXF if the remote server is not reachable when Service was instantiated we got an exception like this

2014-07-30 10:16:20,654 ERROR [org.jboss.ws.core.CommonClient] (http-0.0.0.0-8080-1) Exception caught while (preparing for) performing the invocation: 
org.jboss.ws.WSException: Target endpoint address not set
    at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:350)
    at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:232)
    at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:171)
    at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:157)
    at com.sun.proxy.$Proxy166.areYouThere(Unknown Source)

How can we detect an incorrectly initialized Service instance in EAP 5 with JBossWS Native or force an exception to be thrown instead of WARN in server log?

Environment

  • Red Hat JBoss Enterprise Application Platform 5.x
  • JBossWS Native

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.