Soap Server on Node-Red

Hi, i'd like to build a soap server based on node-red. While there are existing contrib nodes, they all target opening an additional port for soap server. I'm looking for a way to create a soap server and having it in the same port as node-red like mounting it into the express somehow. Interested in using node-soap library for this. Do you think it's possible?

Best regards,

So SOAP doesn't specify a port requirement, people generally implement it over their standard web ports (443) but it doesn't really care.

I've not looked at any of the existing nodes however the first node.js module I found certainly supports the use of an existing ExpressJS app server so it seems eminently possible to achieve.

Unfortunately, you will either have to persuade one of the authors of those nodes to code a change, write your own wrapper for a node.js module or try to use the module in a function node.


A bonus for those who don't know what SOAP is:

https://www.soapui.org/learn/api/soap-vs-rest-api/

Thanks for the information. I noticed soap npm module supports this. I’d rather want to do this in a function node, i have exposed node-red module and soap over global context and trying to get it to work but i’m not sure how to do that. Any idea how to get the existing express in node red and mount a soap server in a sub route using function node?

Hmm, I hadn't thought about that. I don't think you can. It isn't that hard to write a custom node - though from a standing start it is a fairly steep learning curve. If you do go down that route. I have a jktesting repo on Github that contains a jktest2 node with what I think is a more comprehensible layout for a nodes .js file. Also my uibuilder node contains extensive examples of using Node-RED's ExpressJS app server though I'm sure there are many other nodes with simpler examples.

For anyone else interested, if you expose node-red through function global context you can achieve it like this through a function node :

nodered.server = soap.listen(nodered.server, options, myService, wsdl, function() {
node.warn('service initialized');
});

within the options you define path to mount your server

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.