Calling an API that uses a WCF channel

Hello

I am using Node-RED 4.1.1, Node.js v24.00.0, and Windows 10 Enterprise 2016 LTSB version 1607.

I am working to connect a device that can only be accessed through a remoteAPI via a WCF channel. The way we are doing it is to produce an external piece of code that can make it function as a basic REST API, then we connect it to Node-RED:

Is there anything that can handle this using only Node-RED?

Welcome to the forums @Chrisoutdoor,
Not many Windows developers here :grin:

Do you have access to the WSDL endpoint?
I ask as there is a soap package for Node JS : https://www.npmjs.com/package/soap

Quick example from AI (so may not be correct)

const soap = require('soap');
const url = 'http://example.com/Service.svc?wsdl';

soap.createClient(url, function(err, client) {
  if (err) return console.error('SOAP client error:', err);

  client.MyOperation({ param1: 'value' }, function(err, result) {
    if (err) return console.error('Service call error:', err);
    console.log('Result:', result);
  });
});

it should work for the HTTP Bindings, but not sure about Socket Bindings

I used (developed) WCF API's a lot many years ago in work, but we have since moved our API's over to more traditional technologies.

You may be able to use this Node JS module in a function node, or build a complete custom Node RED Node around it.

EDIT


There is also this Node (unverified - but uses that Same Module I mentioned): node-red-contrib-webservices (node) - Node-RED

Search : Library - Node-RED

If nothing else, there is a Node.js package called wcf.js that enables working with WCF services by providing a WCF-compatible SOAP client. It supports various WCF bindings such as BasicHttpBinding , WSHttpBinding , and CustomBinding , and includes features like MTOM encoding, WS-Addressing, transport and message security, and username or certificate-based authentication. https://www.npmjs.com/package/wcf

You may be able to use that with a function node?

1 Like

I think it’s

https://www.npmjs.com/package/wcf.js :slightly_smiling_face:

/wcf is for webpack - for a minute I thought I was going mad :zany_face:

1 Like