Layer7 API Management

Expand all | Collapse all

WSDL and schemas

Jump to Best Answer
  • 1.  WSDL and schemas

    Broadcom Employee
    Posted 02-24-2017 04:09 AM



    I have wsdl file with related schema files. Now I need to call REST API https://<myhostname>:8443/restman/1.0/services to create SOAP service with the wsdl file and schema files. In the POST request body, I construct the <L7:Service> xml with policy, wsdl and schemas, following the same response structure with when I run GET method. The service can be created and the operations are correct when I view from Policy Manager. But when I load the wsdl from SOAPUI, there is no any field in the request part.

    If I publish service with wsdl from Policy Manager, all the fields can be shown in request in SOAPUI. 

    For both ways(created by REST API or published with wsdl), the wsdl part from https://<hostname>:8443/restman/1.0/services?name=serviceName are the same with original wsdl, the schema part like:


    <wsdl:definitions name="insight" targetNamespace="">
          <xsd:import namespace="" schemaLocation="schemas/customer_insights_v1.xsd"/>
          <xsd:import namespace="" schemaLocation="common-schemas/service_common.xsd"/>


    But the schema_location are different from https://<hostname>:8443/serviceName?wsdl.  

    If the service is created by REST API, the schema location is the same as above, which is a static value so the schema can't be loaded. If the service is published by wsdl, the schema location is updated with URL likes below. I think that's why I can see request fields in this case.




    So how can I call REST API to create service to make sure all the fields can be loaded and displayed in SOAPUI?




  • 2.  Re: WSDL and schemas
    Best Answer

    Broadcom Employee
    Posted 02-26-2017 06:41 PM

    I am not quite sure, but it seems you have multiple xsd files, make sure they are available. (if my memory is right, you need to import them into Manage Global Resources, and the schemaLocation needs to be correct -- try only the xsd file name after you import them to Manage Global Resources)

  • 3.  Re: WSDL and schemas

    Broadcom Employee
    Posted 03-21-2017 10:50 PM

    Hi Zhijun,


    Thanks. I finally make it work by adding all required schema to the request xml. The root cause of my early issue is some schema location URLs are wrong in the request xml. The URL has to be absolute path and can't be relative path. No need to import schema to Global Resources.