clients/soap/utils
@prismatic-io/spectral › "clients/soap/utils"
#
Index#
Functions- debugRequest
- describeWSDL
- generateHeader
- getSOAPAuth
- getSOAPClient
- getWSDL
- overrideClientDefaults
- soapRequest
#
FunctionsConst
debugRequest#
▸ debugRequest(client
: Client): void
Defined in packages/spectral/src/clients/soap/utils.ts:28
Optionally log out SOAP requests and responses for debugging purposes
Parameters:
Name | Type | Description |
---|---|---|
client | Client | A SOAP client that generates requests and responses |
Returns: void
Const
describeWSDL#
▸ describeWSDL(wsdlParam
: unknown): Promise‹string›
Defined in packages/spectral/src/clients/soap/utils.ts:39
This function takes either the URL of a WSDL or the XML defining a WSDL, and returns an object describing the methods and attributes defined in the WSDL.
Parameters:
Name | Type | Description |
---|---|---|
wsdlParam | unknown | Either the URL where a WSDL is stored, or the XML defining a WSDL. |
Returns: Promise‹string›
An object containing the methods and attributes defined in a WSDL
Const
generateHeader#
▸ generateHeader(wsdlParam
: string | SOAPConnection, headerPayload
: HeaderPayload, headerOptions
: undefined | object): Promise‹string›
Defined in packages/spectral/src/clients/soap/utils.ts:175
Create a SOAP header
Parameters:
Name | Type | Description |
---|---|---|
wsdlParam | string | SOAPConnection | A SOAPConnection or XML definition of a WSDL |
headerPayload | HeaderPayload | The contents of a header XML node |
headerOptions | undefined | object | Attributes for a header XML node, like namespace or xmlns |
Returns: Promise‹string›
Const
getSOAPAuth#
▸ getSOAPAuth(connection
: Connection, wsdlDefinition?
: undefined | string): Promise‹[any, any, any, any, undefined | IMTOMAttachments]›
Defined in packages/spectral/src/clients/soap/utils.ts:198
Fetch authentication information for a SOAPConnection
Parameters:
Name | Type | Description |
---|---|---|
connection | Connection | The SOAPConnection |
wsdlDefinition? | undefined | string | The XML WSDL definition |
Returns: Promise‹[any, any, any, any, undefined | IMTOMAttachments]›
Const
getSOAPClient#
▸ getSOAPClient‹T›(wsdlParam
: T): Promise‹Client›
Defined in packages/spectral/src/clients/soap/utils.ts:73
Create a SOAP client given a WSDL or SOAPConnection
Type parameters:
▪ T: string | SOAPConnection
Parameters:
Name | Type | Description |
---|---|---|
wsdlParam | T | a SOAPConnection or XML defining a WSDL |
Returns: Promise‹Client›
An HTTP client configured to query a SOAP-based API
Const
getWSDL#
▸ getWSDL(wsdlDefinitionURL
: string): Promise‹string›
Defined in packages/spectral/src/clients/soap/utils.ts:59
Fetch a WSDL from a URL
Parameters:
Name | Type | Description |
---|---|---|
wsdlDefinitionURL | string | The URL where the WSDL is stored |
Returns: Promise‹string›
The WSDL's raw XML
Const
overrideClientDefaults#
▸ overrideClientDefaults(client
: Client, overrides
: ClientOverrides): void
Defined in packages/spectral/src/clients/soap/utils.ts:113
Override some HTTP client defaults
Parameters:
Name | Type | Description |
---|---|---|
client | Client | The client to override |
overrides | ClientOverrides | An endpoint URL or SOAP headers to override |
Returns: void
Const
soapRequest#
▸ soapRequest(__namedParameters
: object, methodParams?
: unknown): Promise‹[any, any, any, any, undefined | IMTOMAttachments]›
Defined in packages/spectral/src/clients/soap/utils.ts:134
Make a request to a SOAP-based API
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
debug | undefined | false | true |
method | string |
overrides | undefined | ClientOverrides |
wsdlParam | string | SOAPConnection |
▪Optional
methodParams: unknown
Parameters to pass to the specified SOAP method
Returns: Promise‹[any, any, any, any, undefined | IMTOMAttachments]›
The results from the SOAP request, including the full XML of the request and response