Migrate to GraphQL Mesh v1
SOAP

This handler allows you to consume SOAP WSDL files and generate a remote
executable schema for those services.
To get started, install the handler library:
npm i @graphql-mesh/soapNow, you can use it directly in your Mesh config file:
sources:
  - name: CountryInfo
    handler:
      soap:
        source: http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDLHeaders
If you want to add SOAP headers to the request body like below;
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:header="http://foo.com/">
   <soap:Header>
      <header:MyHeader>
         <header:UserName>user</header:UserName>
         <header:Password>password</header:Password>
      </header:MyHeader>
   </soap:Header>You can add the headers to the configuration like below;
sources:
  - name: CountryInfo
    handler:
      soap:
        source: ...
        soapHeaders:
          namespace: http://foo.com
          headers:
            MyHeader:
              UserName: user
              Password: passwordBody Alias
You can now choose the name of the alias you want to use for SOAP body;
sources:
  - name: CountryInfo
    handler:
      soap:
        source: ...
        bodyAlias: my-bodyThen it will generate a body like below by using the alias;
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:my-body="http://foo.com/">
   <soap:Body>
      <my-body:Foo>
          <my-body:Bar>baz</my-body:Bar>
      </my-body:Foo>
   </soap:Body>
</soap:Envelope>Custom SOAP namespace
By default, Mesh detects the namespace from the WSDL file. If you want to use a custom namespace based on SOAP version.
For SOAP 1.1, it is set to http://schemas.xmlsoap.org/soap/envelope/ and for SOAP 1.2, it is set
to http://www.w3.org/2003/05/soap-envelope.
If you want to use a custom namespace, you can set it like below;
sources:
  - name: CountryInfo
    handler:
      soap:
        source: ...
        soapNamespace: http://foo.com/schemas/soap/envelopeCodeSandBox Example
You can check out our example that uses SOAP Handler.
Config API Reference
source(type:String, required) - A url to your WSDL or generated SDL with annotationsschemaHeaders(type:Any) - JSON object representing the Headers to add to the runtime of the API calls only for schema introspection You can also provide.jsor.tsfile path that exports schemaHeaders as an objectoperationHeaders(type:JSON) - JSON object representing the Headers to add to the runtime of the API calls only for operation during runtimebodyAlias(type:String) - The name of the alias to be used in the envelope for body components
default: body
soapHeaders(type:Object) - SOAP Headers to be added to the request:alias(type:String) - The name of the alias to be used in the envelope
default: header
namespace(type:String, required) - The namespace of the SOAP Header For example:http://www.example.com/namespaceheaders(type:JSON, required) - The content of the SOAP Header For example: { “key”: “value” } then the content will be<key>value</key>soapNamespace(type:String) - The namespace of the SOAP envelope By default, SOAP handler detects the SOAP version and if SOAP version is 1.1, it useshttp://schemas.xmlsoap.org/soap/envelope/namespace If SOAP version is 1.2, it useshttp://www.w3.org/2003/05/soap-envelopenamespace