Skip to content

$Services

Provides dynamically generated proxies for SOAP services configured on the process. Each configured service, endpoint, and operation becomes a property under this object at runtime.

1
const $Services: object;

Remarks

Parameter names and result shapes are defined by the selected service operation's WSDL, so they cannot be expressed statically in this declaration. Service proxy creation lazily compiles the discovery XML schema and resolves configured credentials on first use. Use the generated autocomplete members for the configured service.

Calling a SOAP service with JSON content

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
try {
    result = $Services.webServiceName.endPointName.methodName({
        param1: {
            param1_b: "2019-01-01",
            param1_a: "someText",
            param1_c: 50
        },
        param2: "someOtherText",
        param3: "119-229334"
    });
}
catch (e) {
    console.warn(JSON.stringify(e));
}