SOAP
SOAP allows you to invoke web services and receive responses independent of language and platforms.
Official Websitehttps://github.com/vpulim/node-soap
Tagssoapxml
- JavaScript
- Python
Documentationhttps://github.com/vpulim/node-soap
NodeJS packagehttps://www.npmjs.com/package/soap
Version0.45.0
Source Codehttps://github.com/vpulim/node-soap
Documentationhttps://docs.python-zeep.org/en/master/
Pypi packagehttps://pypi.org/project/zeep/
Version4.2.1
Source Codehttps://github.com/mvantellingen/python-zeep
Network Connection needs
This integration needs network access to the server where the service is running.
See the Network access page for details about how to achieve that.
Credential configuration
To configure this credential, you just need to fill the url
field to connect the SOAP service.
Optionally, you can set any of the extra config parameters you can see here.
Here is an example of a filled credential configuration form in YepCode:
SOAP Snippets available in Editor
note
The title is the triggering text for YepCode to autocomplete the script.
- JavaScript
- Python
Integration
New integration from credential
const soapClient = await yepcode.integration.soap("credential-slug");
New integration from plain data
const soap = require('soap');
const soapClient = await soap.createClientAsync("http://example.com/wsdl?wsdl", {});
Security and Credentials
If your server includes some security protocol, you may find information here to set your credentials with an already initialized client, for example:
New integration from credential with authentication data (username and password)
const soapClient = await yepcode.integration.soap("credential-slug");
soapClient.setSecurity(new soap.BasicAuthSecurity("username", "password"));
Calling Methods
Call a method on the SOAP service
soapClient.MyFunctionNameAsync({ name: 'value' }).then((result) => {
// result is a javascript array containing result, rawResponse, soapheader, and rawRequest
// result is a javascript object
// rawResponse is the raw xml response string
// soapHeader is the response soap header as a javascript object
// rawRequest is the raw xml request string
})
Call a method using a specific service and port
soapClient.MyService.MyPort.MyFunctionName({name: 'value'}, function(err, result) {
// result is a javascript object
})
Integration
New integration from credential
soap_client = yepcode.integration.soap("credential-slug");
New integration from plain data
import zeep
soap_client = zeep.Client(wsdl='http://example.com/wsdl?wsdl')
Security and Credentials
Using basic authentication with a webservice
from requests import Session
from requests.auth import HTTPBasicAuth
import zeep
from zeep.transports import Transport
session = Session()
session.auth = HTTPBasicAuth('username', 'password')
transport_with_basic_auth = Transport(session=session)
soap_client = zeep.Client(wsdl='http://example.com/wsdl?wsdl', transport=transport_with_basic_auth)
Calling Methods
Call a method on the SOAP service
response = soap_client.my_function_name('value')
Call a method using a specific service and port
from requests import Session
from requests.auth import HTTPBasicAuth
import zeep
from zeep.transports import Transport
session = Session()
session.auth = HTTPBasicAuth('username', 'password')
transport_with_basic_auth = Transport(session=session)
soap_client = zeep.Client(
wsdl='http://example.com/wsdl?wsdl',
transport=transport_with_basic_auth,
service_name='my_service',
port_name='my_port'
)
response = soap_client.my_function_name('value')