# SOAP Request Not Working - WSDL Config Error

**URL:** <https://discourse.nodered.org/t/soap-request-not-working-wsdl-config-error/16482>\
**Category:** General\
**Created:** [8 October 2019 20:29 UTC](https://discourse.nodered.org/t/soap-request-not-working-wsdl-config-error/16482 "2019-10-08T20:29:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joneda1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joneda1/32/12925_2.png) [@joneda1](https://discourse.nodered.org/u/joneda1)\
**Post date:** [8 October 2019 20:29 UTC](https://discourse.nodered.org/t/soap-request-not-working-wsdl-config-error/16482/1 "2019-10-08T20:29:51Z")

</div>

I have been trying to get a SOAP request working using the node-red-contrib-soap-httpcode node. I have put the WSDL [http://www.opensolardb.org/wssolardata?wsdl](http://www.opensolardb.org/wssolardata?wsdl) into the WSDL field of the configuration but whenever I run the flow I get an error message:  
WSDL Config Error: Error: ENOENT: no such file or directory, open '[http://www.opensolardb.org/wssolardata?wsdl](http://www.opensolardb.org/wssolardata?wsdl)'  
If I use this URL in Chrome I get the correct XML data displayed but from Node-Red it doesn't seem to work.  
I have tried some other WSDL's and they seem to have the same behaviour.

I should note that this is NODE RED running on a Raspberry Pi. I haven't yet had a chance to port to a PC and test.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [9 October 2019 06:50 UTC](https://discourse.nodered.org/t/soap-request-not-working-wsdl-config-error/16482/2 "2019-10-09T06:50:27Z")

</div>

Have you tried importing the example flow?

Does that work?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 October 2019 10:00 UTC](https://discourse.nodered.org/t/soap-request-not-working-wsdl-config-error/16482/3 "2019-10-09T10:00:29Z")

</div>

FYI

> [@joneda1](#):
>
> node-red-contrib-soap-httpcode

The example code does not work. It returns a 404. And there doesn't seem to be a way to add an issue in GitHub.

Node-red-contrib-soap-httpcode is a fork of a fork of the original node-red-contrib-soap

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [9 October 2019 10:30 UTC](https://discourse.nodered.org/t/soap-request-not-working-wsdl-config-error/16482/4 "2019-10-09T10:30:39Z")

</div>

> [@zenofmud](#):
>
> Node-red-contrib-soap-httpcode

As @zenofmud says the example doesn’t work, you could either track down the author of the fork you are using and ask them, or switch to a different node.

You can also rate the node on [flows.nodered.org](http://flows.nodered.org) if you have logged in

---

<div class="post-metadata">

**Author:** ![joneda1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joneda1/32/12925_2.png) [@joneda1](https://discourse.nodered.org/u/joneda1)\
**Post date:** [11 October 2019 22:58 UTC](https://discourse.nodered.org/t/soap-request-not-working-wsdl-config-error/16482/5 "2019-10-11T22:58:45Z")

</div>

I explored a little further and found that the following works, based on the example code using a function to pass in the WSDL and parameters:

- WSDL is [http://www.opensolardb.org/wssolardata?wsdl](http://www.opensolardb.org/wssolardata?wsdl) for this test but it is passed to the SOAP node without the ?wsdl part, I think this is added in the function (later tested and it works with or without ?wsdl).

- Tested using the method getPlacesInCountry and passed the parameter "AU" for the countryId:

```auto
var newmsg={
  server:"http://www.opensolardb.org/wssolardata?wsdl",
  options:{},
  headers:{},
  payload:{
      countryId:"AU"
  }
  
};
return newmsg;

```

- The function returns a list of places in Australia as it should do.

The issue seems to be now that I get an error as follows if I try any method which does not accept parameters (eg. getAllCountries):

AssertionError [ERR\_ASSERTION]: invalid message definition for rpc style binding  
at....

I found this reference:

> <https://stackoverflow.com/questions/22021944/node-js-soap-invalid-message-definition-for-rpc-style-binding>

So I changed the javascript in the function to pass a null for the payload as follows:

```auto
var newmsg={
  server:"http://www.opensolardb.org/wssolardata?wsdl",
  options:{},
  headers:{},
  payload:null
  
};
return newmsg;

```

And it actually works now. I won't be assigning myself guru status any time soon but it feels good to have beaten the problem!
