Operations (sample payloads)

Main operations

Describe client

Description of services, ports and methods as a JavaScript object. Invokes the Client.describe() method of the 'soap' npm package. Sample Input

{
    "wsdl": {
        "full_url": "https://api.example.com/services/ExampleService?wsdl"
    }
}

Sample Output

{
    "description": {
        "ExampleService": {
            "ExamplePort": {
                "getCustomerInfo": {
                    "input": {
                        "customerId": "xsd:string"
                    },
                    "output": \{
                        "customerName": "xsd:string",
                        "customerEmail": "xsd:string",
                        "customerPhone": "xsd:string"
                    \}
                },
                "updateCustomerInfo": {
                    "input": \{
                        "customerId": "xsd:string",
                        "customerName": "xsd:string",
                        "customerEmail": "xsd:string",
                        "customerPhone": "xsd:string"
                    \},
                    "output": {
                        "success": "xsd:boolean"
                    }
                }
            }
        }
    }
}

List SOAP methods

List the SOAP methods defined in a WSDL. Sample Input

{
    "wsdl": {
        "full_url": "https://api.example.com/services/soap?wsdl"
    }
}

Sample Output

\{
    "methods": [
        "createCustomer",
        "updateCustomer",
        "deleteCustomer",
        "getCustomerDetails",
        "listCustomers",
        "createOrder",
        "updateOrder",
        "cancelOrder",
        "getOrderStatus",
        "listOrders"
    ]
\}

Send request

Send a request to a SOAP API to execute the selected SOAP web service method. Makes use of the 'soap' npm package. Sample Input

{
    "wsdl": {
        "full_url": "https://api.example.com/WeatherService.wsdl"
    },
    "method": "GetWeatherForecast",
    "authentication": {
        "basic_auth_security_params": \{
            "username": "user123",
            "password": "pass456"
        \}
    },
    "xml_body": "<GetWeatherForecast><City>New York</City><Country>USA</Country></GetWeatherForecast>",
    "headers": "<CustomHeader><ApiKey>abc123def456</ApiKey></CustomHeader>",
    "endpoint": "https://api.example.com/WeatherService",
    "escape_xml": true
}

Sample Output

{
    "result": {
        "GetWeatherForecastResponse": {
            "Forecast": {
                "Date": "2023-05-15",
                "Temperature": \{
                    "High": 25,
                    "Low": 18
                \},
                "Conditions": "Partly Cloudy"
            }
        }
    },
    "responseHeaders": \{
        "content-type": "application/soap+xml; charset=utf-8",
        "content-length": "423",
        "date": "Mon, 15 May 2023 12:34:56 GMT",
        "server": "Apache/2.4.41 (Unix)"
    \},
    "statusCode": 200
}

Was this page helpful?