GET https://apis.wso2.com/api/am/publisher/v0.13/apis/{apiId}/wsdl
This operation can be used to retrieve the WSDL definition of an API.
apim:api_view
i
GET https://localhost:9443/api/am/publisher/v0.13/apis/7f82f6b0-2667-441e-af23-c0fc44cf3a17/wsdl
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "admin--hello1.0.0.wsdl",
"wsdlDefinition": "<definitions xmlns=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tns=\"http://www.examples.com/wsdl/HelloService.wsdl\" name=\"HelloService\" targetNamespace=\"http://www.examples.com/wsdl/HelloService.wsdl\">\n <message name=\"SayHelloResponse\">\n <part name=\"greeting\" type=\"xsd:string\">\n <\/part>\n <\/message>\n <message name=\"SayHelloRequest\">\n <part name=\"firstName\" type=\"xsd:string\">\n <\/part>\n <\/message>\n <portType name=\"Hello_PortType\">\n <operation name=\"sayHello\">\n <input message=\"tns:SayHelloRequest\">\n <\/input>\n <output message=\"tns:SayHelloResponse\">\n <\/output>\n <\/operation>\n <\/portType>\n <binding name=\"Hello_Binding\" type=\"tns:Hello_PortType\">\n <soap:binding style=\"rpc\" transport=\"http://schemas.xmlsoap.org/soap/http\"/>\n <operation name=\"sayHello\">\n <soap:operation soapAction=\"sayHello\"/>\n <input>\n <soap:body use=\"encoded\" encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:examples:helloservice\"/>\n <\/input>\n <output>\n <soap:body use=\"encoded\" encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:examples:helloservice\"/>\n <\/output>\n <\/operation>\n <\/binding>\n <service name=\"Hello_Service\">\n<documentation>WSDL File for HelloService<\/documentation>\n <port name=\"Hello_Port\" binding=\"tns:Hello_Binding\">\n <soap:address location=\"http://localhost:8280/hellp/1.0.0\"/>\n <\/port>\n <\/service>\n<\/definitions>"
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" "https://localhost:9443/api/am/publisher/v0.13/apis/7f82f6b0-2667-441e-af23-c0fc44cf3a17/wsdl"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource (Will be supported in future). |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Requested WSDL DTO object belongs to the API |
Wsdl |
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
404 |
Not Found. Requested API does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |
POST https://apis.wso2.com/api/am/publisher/v0.13/apis/{apiId}/wsdl
This operation can be used to add a WSDL definition to an existing API.
apim:api_create
i
POST https://localhost:9443/api/am/publisher/v0.13/apis/af3f96da-9ccf-463f-8cee-13ec8530a9cd/wsdl
Content-Type: application/json
Authorization: Bearer 7d237cab-7011-3f81-b384-24d03e750873
{
"name": "admin--PizzaShackAPI1.0.0.wsdl",
"wsdlDefinition": "<definitions xmlns=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tns=\"http://www.examples.com/wsdl/HelloService.wsdl\" name=\"HelloService\" targetNamespace=\"http://www.examples.com/wsdl/HelloService.wsdl\">\n <message name=\"SayHelloResponse\">\n <part name=\"greeting\" type=\"xsd:string\">\n <\/part>\n <\/message>\n <message name=\"SayHelloRequest\">\n <part name=\"firstName\" type=\"xsd:string\">\n <\/part>\n <\/message>\n <portType name=\"Hello_PortType\">\n <operation name=\"sayHello\">\n <input message=\"tns:SayHelloRequest\">\n <\/input>\n <output message=\"tns:SayHelloResponse\">\n <\/output>\n <\/operation>\n <\/portType>\n <binding name=\"Hello_Binding\" type=\"tns:Hello_PortType\">\n <soap:binding style=\"rpc\" transport=\"http://schemas.xmlsoap.org/soap/http\"/>\n <operation name=\"sayHello\">\n <soap:operation soapAction=\"sayHello\"/>\n <input>\n <soap:body use=\"encoded\" encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:examples:helloservice\"/>\n <\/input>\n <output>\n <soap:body use=\"encoded\" encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:examples:helloservice\"/>\n <\/output>\n <\/operation>\n <\/binding>\n <service name=\"Hello_Service\">\n<documentation>WSDL File for HelloService<\/documentation>\n <port name=\"Hello_Port\" binding=\"tns:Hello_Binding\">\n <soap:address location=\"http://localhost:8280/hellp/1.0.0\"/>\n <\/port>\n <\/service>\n<\/definitions>"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "admin--PizzaShackAPI1.0.0.wsdl",
"wsdlDefinition": "<definitions xmlns=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tns=\"http://www.examples.com/wsdl/HelloService.wsdl\" name=\"HelloService\" targetNamespace=\"http://www.examples.com/wsdl/HelloService.wsdl\">\n <message name=\"SayHelloResponse\">\n <part name=\"greeting\" type=\"xsd:string\">\n <\/part>\n <\/message>\n <message name=\"SayHelloRequest\">\n <part name=\"firstName\" type=\"xsd:string\">\n <\/part>\n <\/message>\n <portType name=\"Hello_PortType\">\n <operation name=\"sayHello\">\n <input message=\"tns:SayHelloRequest\">\n <\/input>\n <output message=\"tns:SayHelloResponse\">\n <\/output>\n <\/operation>\n <\/portType>\n <binding name=\"Hello_Binding\" type=\"tns:Hello_PortType\">\n <soap:binding style=\"rpc\" transport=\"http://schemas.xmlsoap.org/soap/http\"/>\n <operation name=\"sayHello\">\n <soap:operation soapAction=\"sayHello\"/>\n <input>\n <soap:body use=\"encoded\" encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:examples:helloservice\"/>\n <\/input>\n <output>\n <soap:body use=\"encoded\" encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:examples:helloservice\"/>\n <\/output>\n <\/operation>\n <\/binding>\n <service name=\"Hello_Service\">\n<documentation>WSDL File for HelloService<\/documentation>\n <port name=\"Hello_Port\" binding=\"tns:Hello_Binding\">\n <soap:address location=\"http://localhost:8280/hellp/1.0.0\"/>\n <\/port>\n <\/service>\n<\/definitions>"
}
curl -k -H "Authorization:Bearer 5311eca3-8ac8-354e-ab36-7e2fdd6a4013" -H "Content-Type: application/json" -X POST -d @data.json "https://localhost:9443/api/am/publisher/v0.13/apis/af3f96da-9ccf-463f-8cee-13ec8530a9cd/wsdl"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Body |
body required |
JSON payload including WSDL definition that needs to be added |
Wsdl (Wsdl) | |
Header |
Content-Type required |
Media type of the entity in the body. Default is application/json. |
String |
application/json |
Header |
If-Match optional |
Validator for conditional requests; based on ETag (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Successful response with updated wsdl definition |
|
400 |
Bad Request. Invalid request or validation error |
Error |
403 |
Forbidden. The request must be conditional but no condition has been specified. |
Error |
404 |
Not Found. The resource to be updated does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |