1 Reply Latest reply on Oct 5, 2009 10:29 PM by Martin Letis

    how to use catalog files in jbossws?

    Martin Letis Newbie

      Hi,

      I have a WSDL that imports an external schema using a URL:

      ...
      <wsdl:types>
       <xsd:schema targetNamespace="http://www.foobar.com/SimpleService/">
       <xsd:import namespace="http://www.foobar.com/SimpleService/Schema"
       schemaLocation="http://127.0.0.1:9090/SimpleService/Schema"></xsd:import>
       </xsd:schema>
      </wsdl:types>
      ...
      


      The URL (127.0.0.1:9090) is not available while consuming the WSDL (wsconsume/wsimport), nor at runtime.

      I would like to avoid editing the WSDL, so I have created a catalog file (see below) and I am able to run wsconsume/wsimport correctly using the 'catalog' ant attribute; however, I cannot understand how to provide the catalog file in the runtime environment (deployed WAR/EAR).

      I have tried putting the catalog file in META-INF and WEB-INF, but it does not seem to be picked.

      I am running JBoss 4.2.3 with JBossWS jbossws-3.0.1-native-2.0.4.GA

      Catalog file (jax-ws-catalog.xml):

      <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
       prefer="system">
       <system
       systemId="http://127.0.0.1:9090/SimpleService/Schema"
       uri="../wsdl/SimpleService.xsd" />
      </catalog>
      


      thanks in advance for any help

        • 1. Re: how to use catalog files in jbossws?
          Martin Letis Newbie

          The stacktrace I am getting while creating the service client (SimpleServiceService.getSimpleServiceBinding()) is:


          java.lang.IllegalArgumentException: Cannot resolve imported resource: http://127.0.0.1:9090/SimpleService/Schema
           org.jboss.ws.tools.wsdl.WSDLLocatorImpl.getImportInputSource(WSDLLocatorImpl.java:141)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseSchema(JBossWSDLReaderImpl.java:779)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseSchema(JBossWSDLReaderImpl.java:659)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseTypes(JBossWSDLReaderImpl.java:620)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseDefinitions(JBossWSDLReaderImpl.java:332)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2293)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2257)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2310)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2331)
           org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2363)
           org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:127)
           org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:295)
           org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:86)
           org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:140)
           org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:64)
           javax.xml.ws.Service.<init>(Service.java:81)