Function: Add a SOAP Host

by Simon Sparks · 1 May 2025

To use this function add it to the class library file named OrchestratorService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: OrchestratorService.ts

Description: Orchestrator Function to create a new SOAP Host

Function SOAPHostCreate

public SOAPHostCreate(strSOAPHostName: string, strWsdlUri: string, strUsername: string, strPassword: string): SOAPHost {
    let arrAuthenticationParams: string[] = ["Shared Session", strUsername, strPassword, "", ""];

    let objSOAPAuthentication: SOAPAuthentication = SOAPAuthenticationManager.createAuthentication("Basic", arrAuthenticationParams);

    //@ts-ignore
    let objSOAPHost: SOAPHost = new SOAPHost();
    objSOAPHost.name = strSOAPHostName;
    objSOAPHost.wsdlLocal = false;
    objSOAPHost.wsdlUri = strWsdlUri;
    objSOAPHost.connectionTimeout = 30;
    objSOAPHost.requestTimeout = 60;
    objSOAPHost.authentication = objSOAPAuthentication;

    let objSOAPHostReturn: SOAPHost = SOAPHostManager.addHost(objSOAPHost);

    return objSOAPHostReturn;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like