Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-3503

Axis2 generates incorrect schema imports in WSDL returned via ?wsdl

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3
    • 1.4
    • kernel
    • None

    Description

      I deploy a web service with a WSDL that contains the following import:

      <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="http://www.w3.org/2006/03/addressing/ws-addr.xsd" />

      the WSDL that is returned from Axis2 via ?wsdl returns the following:

      <xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="CalculatorService?xsd=http://www.w3.org/2006/03/addressing/ws-addr.xsd" />

      When I try to invoke this web service using a JAX-WS client I get the following exception:

      log4j:WARN Please initialize the log4j system properly.
      javax.xml.ws.WebServiceException: The following WSDL exception occurred: WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: WSDLException (at /definitions/types/xsd:schema/xs:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'CalculatorService?xsd=http://www.w3.org/2006/03/addressing/ws-addr.xsd', relative to 'http://localhost:8081/axis2/services/CalculatorService?xsd=CalculatorService_schema1.xsd'.: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8081/axis2/services/CalculatorService?xsd=http://www.w3.org/2006/03/addressing/ws-addr.xsd
      at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:173)
      at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
      at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:753)
      at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:192)
      at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:133)
      at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:130)
      at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:77)
      at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescription(DescriptionFactory.java:75)
      at org.apache.axis2.jaxws.spi.ServiceDelegate.<init>(ServiceDelegate.java:207)
      at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:59)Time: 2688 ms.

      at javax.xml.ws.Service.<init>(Service.java:74)
      at org.apache.axis2.jaxws.calculator.CalculatorService.<init>(CalculatorService.java:38)
      at org.apache.axis2.jaxws.calculator.client.AddSEIClient.main(AddSEIClient.java:29)
      Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=WSDL4JWrapper : : javax.wsdl.WSDLException: WSDLException (at /definitions/types/xsd:schema/xs:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'CalculatorService?xsd=http://www.w3.org/2006/03/addressing/ws-addr.xsd', relative to 'http://localhost:8081/axis2/services/CalculatorService?xsd=CalculatorService_schema1.xsd'.: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8081/axis2/services/CalculatorService?xsd=http://www.w3.org/2006/03/addressing/ws-addr.xsd
      at org.apache.axis2.jaxws.util.WSDL4JWrapper.<init>(WSDL4JWrapper.java:138)
      at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:735)
      ... 10 more

      It seems apparent that if the import begins with 'http' then it should not be re-written.

      Attachments

        Activity

          People

            pradine Brian DePradine
            pradine Brian DePradine
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: