2 Replies Latest reply on May 7, 2014 10:32 AM by Marc H.

    JBossWS: wsdl:import always handled as relative location

    Marc H. Newbie

      Hi everyone,

       

      I have some trouble deploying a web-service implementation using a external WSDL file (I cannot change it).

       

      The wsdl performs an import of another WSDL file using an absolute URL, something like this:

      <wsdl:import namespace="http://foo.bar.com/foo.bar.Service" location="http://foo.bar.com/Service.svc?wsdl=wsdl0"/>

       

      Problem: the location here seems to be always resolved as being relative to the source wsdl location. The resolved URL may then look like:

      http://foo.bar.com/http://foo.bar.com/Service.svc?wsdl=wsdl0

       

      This prevents the WSDL file from being parsed.

       

      This behavior seems to originate from: org.jboss.ws.common.deployment.SOAPAddressWSDLParser, line 211 in v2.3.0.Final and current trunk:

      } else if (match(reader, WSDL_NS, IMPORT)) {

                        final String location = reader.getAttributeValue(null, LOCATION);

                        final String url = wsdlUrl.toString();

                        final String newUrl = url.substring(0, url.lastIndexOf("/") + (location.startsWith("/") ? 0 : 1)) + location;

                        if (!metadata.getImports().containsKey(newUrl)) {

                           metadata.getImports().put(newUrl, false);

        }

      }

       

      Is that normal ? Should I fill a bug report ?

       

      Many thanks,

      Marc