Layer7 API Management

  • 1.  SOAP Services and XSD Imports

    Posted May 07, 2015 02:51 PM

    Hello,

     

    Can anyone help me understand how to handle a WSDL that imports schema?  I have quite a few WSDLs that do the following:

     

    <wsdl....>

    <types...>

    <schema elementFormDefault="qualified">

    <xs:import namespace="http://foo.bar.com/soap/SOAPService" schemaLocation="SOAPServiceSchemaA?xsd=mySchemaA.xsd"/>

    <xs:import namespace="http://foo.bar.com/soap/SOAPService" schemaLocation="SOAPServiceSchemaB?xsd=mySchemaB.xsd"/>

    ...

    </schema>

    </types>

    </wsdl>

     

    This very much displeases the gateway.  Are there recommendations other that inlining the imports?

     

    My backend services (running AXIS2) are able to resolve this and do the right thing.

     

    Thanks,

     

    Alejandro



  • 2.  Re: SOAP Services and XSD Imports
    Best Answer

    Broadcom Employee
    Posted May 08, 2015 07:27 PM

    _Validate XML Schema Assertion - CA API Gateway - 8.3 - CA Wiki

     

    You have an error in that schema import. You can't have two schemas for the same namespace, and you do in your sample. They EACH must have unique namespaces.

     

    This has very specific tooling for imported schemas, but it doesn't process relative links either.

     

    You need to change them to unique namespaces with absolute links. Otherwise, especially if you load that schema for a file, how will it know where to find the xsd file?

     

    Alternately, you can import all of the imports FIRST using manage global resources, then it should use them directly, but solve the ambiguity first, or change them into includes, not imports.



  • 3.  Re: SOAP Services and XSD Imports

    Posted May 11, 2015 12:26 PM

    Hi Jay,

     

    My example was in error.  My real WSDL has distinct namespaces.  The issue looks like its related to the relative pathing, as you point out.  I'll try to use absolute links or the global resources approach.

     

    Thanks!

     

    Alejandro