AnsweredAssumed Answered

WSDL and schemas

Question asked by YangChen Employee on Feb 24, 2017
Latest reply on Mar 22, 2017 by YangChen



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?