# soap

## authBasic

Sets Basic Authentication details to be used for connections with the service.

**Parameters:**

| Name   | Type     | Description |
| ------ | -------- | ----------- |
| `user` | `String` | Username.   |
| `pass` | `String` | Password.   |

## authBearer

Sets Bearer Token Authentication details to be used for connections with the service.

**Parameters:**

| Name    | Type     | Description |
| ------- | -------- | ----------- |
| `token` | `String` | Token.      |

## authClientSSL

Sets Client SSL Authentication details to be used for connections with the service.

**Parameters:**

| Name      | Type                        | Description                                              |
| --------- | --------------------------- | -------------------------------------------------------- |
| `key`     | `Buffer`\|`String`          | Private key path or a Buffer containing the key.         |
| `cert`    | `Buffer`\|`String`          | Certificate path or a Buffer containing the certificate. |
| `ca`      | `Buffer`\|`String`\|`Array` | CA path or a Buffer.                                     |
| `options` | `Object`                    | `optional` Options.                                      |

## authClientSSLPFX

Sets Client SSL (PFX) Authentication details to be used for connections with the service.

**Parameters:**

| Name         | Type               | Description                                     |
| ------------ | ------------------ | ----------------------------------------------- |
| `pfx`        | `Buffer`\|`String` | PFX path or a Buffer containing the PFX bundle. |
| `passphrase` | `Buffer`\|`String` | `optional` Passphrase for the PFX.              |
| `options`    | `Object`           | `optional` Options.                             |

## authNTLM

Sets NTLM Authentication details to be used for connections with the service.

**Parameters:**

| Name          | Type     | Description  |
| ------------- | -------- | ------------ |
| `user`        | `String` | Username.    |
| `pass`        | `String` | Password.    |
| `domain`      | `String` | Domain.      |
| `workstation` | `String` | Workstation. |

## describe

Returns SOAP service description.

**Parameters:**

| Name          | Type     | Description                                                 |
| ------------- | -------- | ----------------------------------------------------------- |
| `wsdlUrl`     | `String` | URL pointing to the WSDL XML.                               |
| `wsdlHeaders` | `Object` | `optional` custom HTTP headers to be sent on WSDL requests. |

**Returns:**

`Object` - Service description.

## get

Initiates a SOAP request and returns the response.

\*\* Usage example:\*\*

```javascript
// get SOAP service description, so we can understand what methods it provides,
// what input parameters it expects, and what is the output structure.
var serviceUrl = 'http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL';
var serviceDescription = soap.describe(serviceUrl);
log.info(serviceDescription);

// NumberToWords method in this service converts number to words.
var result = soap.get(serviceUrl, 'NumberToWords', { 'ubiNum': 2019 });
log.info(result.NumberToWordsResult);
```

**Parameters:**

| Name          | Type     | Description                                                 |
| ------------- | -------- | ----------------------------------------------------------- |
| `wsdlUrl`     | `String` | URL pointing to the WSDL XML.                               |
| `method`      | `String` | Method name (case sensitive).                               |
| `args`        | `Object` | `optional` Object containing the arguments.                 |
| `wsdlHeaders` | `Object` | `optional` custom HTTP headers to be sent on WSDL requests. |

**Returns:**

`Object` - The response object.

## getLastResponseHeaders

Returns last response headers.

**Returns:**

`Object` - IncomingHttpHeaders (<https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node\\_modules\\_\\_types\\_node\\_http2\\_d_._http2_.incominghttpheaders.html>).

## setProxy

Sets proxy url to be used for connections with the service.

**Parameters:**

| Name  | Type     | Description                                                                 |
| ----- | -------- | --------------------------------------------------------------------------- |
| `url` | `String` | Proxy url. Invocation without arguments will remove any previously set url. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oxygenhq.org/download-installation-start/modules/module-soap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
