Set up SOAP client using @vtex/api ExternalClient

Hi, trying to set up an External Client to post to a SOAP endpoint but I keep getting a 400 Error Invalid WSDL URL. It’s a public url so requires no authentication and the endpoint is active.

I have a feeling this error is from the npm package I’m using but would like to sanity check that I’ve set the basics of my Client up correctly:

constructor(cxt: IOContext, options?: InstanceOptions) {
    let instanceHeaders = options ? options.headers : {}
    super(url, cxt, {
      retries: 2,
      baseURL: url,
      headers: {
        'X-VTEX-Use-Https': 'true',
        'Proxy-Authorization': cxt.authToken,
        'X-Vtex-Proxy-To': url

  public async initClient() {
    let soapOptions = {
      wsdl_options: {
        forever: true,
        rejectUnauthorized: false,
        strictSSL: false,
        disableCache: true
      wsdl_headers: {
        'Content-Type': 'application/json; charset=utf-8',
        'Content-Length': 'length'

    let countryArgument = {
      sCountryName: 'Ireland'
    createClientAsync(wsdlUrl, soapOptions)
    .then((client) => {
      return client.CountryISOCode(countryArgument)
    .then((resp) => {
      return resp
    .catch((err) => {
      return err

I believe I need to add the url after the wsdlUrl on this line createClientAsync(wsdlUrl, soapOptions) but I get an error `Argument of type ‘“http://yourUrl”’ is not assignable to parameter of type ‘IOptions | undefined’

Any advice or direction would be appreciated!