Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3088

jax-ws-catalog.xml not being used with @WebServiceRef() annotation in JBoss AS 7.1.0.Beta1 "Tesla"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.CR1
    • 7.1.0.Beta1b
    • Web Services
    • None

    Description

      @WebServiceRef(wsdlLocation = "http://my.nowhereland.com/HelloWSWorld/Hello/Hello?wsdl") always try to resolve the host (my.nowhereland.com) even if there is a jax-ws-catalog.xml file that maps the location url to a path in the WAR.

      Here is thread detailing the issue: http://community.jboss.org/message/637964

      The 2 packages detail are the parts to reproduce the problem (source code in jar/war).

      HelloWSWorld.jar: Exceedingly simple SLSB jar with a WS
      WebHello.war: JSF Web App that is simple client to the above WS ejb jar.

      Deployed to 'standalone' and just used the web console to deploy the modules.

      The same 2 products can be deployed to Glassfish 3.1.1. GF resolves the @WebServiceAnnotation() annotation and seems happy with using the mappings in the jax-ws-catalog.xml. The @PostConstruct() method can then re-assign ENDPOINT_ADDRESS_PROPERTY for WS invocation. In JBOSS as 7.1.0beta1 the following (bottom part of the stack trace) is tossed while the annotation is being processed:

      javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://my.nowhereland.com/HelloWSWorld/Hello/Hello?wsdl'.: java.net.UnknownHostException: my.nowhereland.com
      at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
      at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
      at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:239)
      at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
      at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
      ... 76 more
      Caused by: java.net.UnknownHostException: my.nowhereland.com

      Of course the @PostContruct never gets the opportunity to execute and change the ENDPOINT_ADDRESS_PROPERTY.

      I have found that an annotation like:

      @WebServiceRef(wsdlLocation = "/WEB-INF/wsdl/Hello.wsdl")

      seems to make JBoss happy and the @PostContruct fires and things are OK. However, I don't know if this will work in GF.

      My objectives are:
      *to have our WAR work on both GF and JBOSS (and maybe others)
      *war code refers to our services via canonical service location
      *provide jax-ws-catalog mappings for local/in-war wsdl access
      *allow WAR code to override the canonical locations when they are in 'DEV-Mode' or detect some other run-time discriminator used to change the service location.

      Attachments

        1. HelloWSWorld.jar
          2 kB
        2. WebHello.war
          2.81 MB

        Activity

          People

            rhn-engineering-ema Jim Ma
            fred.welland@gmail.com Fred Welland (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: