API Gateway 10.11 | Using API Gateway | APIs | Activating an API | WSDLs in API Gateway
 
WSDLs in API Gateway
When you activate a SOAP API in API-Gateway, the API exposes a link to the WSDL describing the API Gateway usage. The format of the link is as follows:
http://apigw-host:apigw-port/ws/<service-name>/1?wsdl
For example: http://myhost:5555/ws/Hello_Service/1?wsdl
If the WSDL imports more files, for example, sub WSDLs or XML schemas, then these files can be accessed through:
http://<apigw-host>:<apigw-port>/ws/<service-name>/1/<id>?xsd=<name>
For example: http://myhost:5555/ws/Hello_Service/1/53fe951a-2c04-4283-8b2d-8ee2957531b1?xsd=A
During this action, unlike all other parts of the WSDL, the <service> section is completely regenerated. For each activated HTTP or HTTPS port, depending on the API's transport policy, one or more endpoint entries are generated into the WSDL. By default, the following entries are present:
*Usual entry with service name and version number
*Mediator-compatible entry with service name and original port name
*One entry for each custom endpoint
Port names
The port names are numbered through the different entries to ensure uniqueness. Moreover, when the original port name has a http or https specifier at its end, then this specifier is taken over to the generated port name.
Examples
Example 1: With a single active HTTP port
<service name="Hello_Service">
<port name="Hello_Port2" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/ws/Hello_Service/1"/>
</port>
<port name="Hello_Port" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/ws/Hello_Service.Hello_Port/1"/>
</port>
</service>
You can add custom endpoints to the API, for example, per UI. The customized values (prefix, servicename, version) appear in the <service> section.
Example 2: With an additional custom endpoint
<service name="Hello_Service">
<port name="Hello_Port3" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/ws/Hello_Service/1"/>
</port>
<port name="Hello_Port2" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/myprefix/myservice/5"/>
</port>
<port name="Hello_Port" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/ws/Hello_Service.Hello_Port/1"/>
</port>
</service>
Example 3: With an additional HTTPS port that gets enabled and switched on in the API's transport policy
<service name="Hello_Service">
<port name="Hello_Port" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/ws/Hello_Service.Hello_Port/1"/>
</port>
<port name="Hello_Port3" binding="tns:Hello_Binding">
<soap:address location="https://myhost:5559/ws/Hello_Service.Hello_Port/1"/>
</port>
<port name="Hello_Port2" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/ws/Hello_Service/1"/>
</port>
<port name="Hello_Port4" binding="tns:Hello_Binding">
<soap:address location="https://myhost:5559/ws/Hello_Service/1"/>
</port>
<port name="Hello_Port5" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/myprefix/myservice/5"/>
</port>
<port name="Hello_Port6" binding="tns:Hello_Binding">
<soap:address location="https://myhost:5559/myprefix/myservice/5"/>
</port>
</service>
Parameters for refining the exposed port entries
Use the parameter wsdlPortLayout in Administration > Extended settings section to refine the exposed port entries. The parameter can have the following values:
*service-port
All the port entries are exposed. This is the default value and the results as explained in the examples above apply.
*service-only
Only one port (with servicename or version) is exposed. When this value is set, only the simple endpoint with the service name is generated. Example 3 would now look as follows:
<service name="Hello_Service">
<port name="Hello_Port" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/ws/Hello_Service/1"/>
</port>
<port name="Hello_Port2" binding="tns:Hello_Binding">
<soap:address location="https://myhost:5559/ws/Hello_Service/1"/>
</port>
<port name="Hello_Port3" binding="tns:Hello_Binding">
<soap:address location="http://myhost:5555/myprefix/myservice/5"/>
</port>
<port name="Hello_Port4" binding="tns:Hello_Binding">
<soap:address location="https://myhost:5559/myprefix/myservice/5"/>
</port>
</service>
*mediator-comp
When this value is set, the entries generated are in mediator compatibility mode. Note that custom endpoints do not appear in this case. The entries look as follows:
<service name="Hello_Service">
<port name="Hello_Portsoaphttp" binding="tns:Hello_Binding">
<soap:address
location="http://myhost:5555/ws/Hello_Service.Hello_Portsoaphttp/1"/>
</port>
<port name="Hello_Portsoaphttps" binding="tns:Hello_Binding">
<soap:address
location="https://myhost:5559/ws/Hello_Service.Hello_Portsoaphttps/1"/>
</port>
</service>