SOAP server error

Hello,
I am not conversant with SOAP protocol and messages.

I installed node-red-contrib-wsdl-soap-server-sim nodes - soap-server, soap-response. It works with the GitHub example referred in the node's Help document.

However, when I reconfigure the node with the wsdl file provided by the device mfg, which is expected to make SOAP requests and I send the SOAP requests as per the device documentation (using cURL), the payload is not extracted. The device documentation has the SOAP requests and responses for various functions.

The xsd file provided by the mfg is in the same folder as the wsdl file. Also, the modified server function for mfg's xsdl is also attached.

Kindly help in making the correct changes to the wsdl and the server function to be able to extract the payload and process further.

wsdl file:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
    targetNamespace="http://www.aglaia-gmbh.de/xml/BaSS_SOAPd/"
    xmlns:tns="http://www.aglaia-gmbh.de/xml/BaSS_SOAPd/"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdp="http://schemas.xmlsoap.org/ws/2006/02/devprof"
    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
    xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing"
    xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsssecurity-utility-1.0.0.xsd"
    xmlns:xsd1="http://www.aglaia-gmbh.de/xml/2013/05/17/BaSS_SOAPd.xsd"
    xmlns:p="http://www.w3.org/2001/XMLSchema">

    <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema">
            <import namespace="http://www.aglaia-gmbh.de/xml/2013/05/17/BaSS_SOAPd.xsd" schemaLocation="../XML-Schema/BaSS_SOAPd.xsd" />             
        </schema>
    </wsdl:types>
    
    <wsdl:message name="NotificationRequest">
        <wsdl:part name="NotificationMessage" element="xsd1:notification_message"></wsdl:part>
    </wsdl:message>

    <wsdl:message name="NotificationResponse">
        <wsdl:part name="AnswerMessage" element="xsd1:answer_message"></wsdl:part>
    </wsdl:message>

    <wsdl:message name="ErrorRequest">
        <wsdl:part name="ErrorMessage" element="xsd1:error_message"></wsdl:part>
    </wsdl:message>

    <wsdl:message name="ErrorResponse">
        <wsdl:part name="TaskMessage" element="xsd1:task_message"></wsdl:part>
    </wsdl:message>

    <wsdl:portType name="SOAPdServiceInterface" wse:EventSource="true">
        <wsdl:operation name="Notification">
            <wsdl:input message="tns:NotificationRequest" wsa:Action="http://www.aglaia-gmbh.de/xml/BaSS_SOAPd/NotificationRequest"/>
            <wsdl:output message="tns:NotificationResponse" wsa:Action="http://www.aglaia-gmbh.de/xml/BaSS_SOAPd/NotificationResponse"/>
        </wsdl:operation>
        <wsdl:operation name="Error">
            <wsdl:input message="tns:ErrorRequest" wsa:Action="http://www.aglaia-gmbh.de/xml/BaSS_SOAPd/ErrorRequest"/>
            <wsdl:output message="tns:ErrorResponse" wsa:Action="http://www.aglaia-gmbh.de/xml/BaSS_SOAPd/ErrorResponse"/>
        </wsdl:operation>
    </wsdl:portType>

	<wsdl:binding name="SOAPdServiceSoap12Binding" type="tns:SOAPdServiceInterface">
		<wsoap12:binding style="document"  transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="Notification">
            <wsoap12:operation soapAction="http://www.aglaia-gmbh.de/xml/BaSS_SOAPd/NotificationRequest" />
            <wsdl:input>
                <wsoap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <wsoap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="Error">
            <wsoap12:operation soapAction="http://www.aglaia-gmbh.de/xml/BaSS_SOAPd/ErrorRequest" />
            <wsdl:input>
                <wsoap12:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <wsoap12:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
	</wsdl:binding>

	<wsdl:service name="SOAPdService">
		<wsdl:port name="SOAPdPort" binding="tns:SOAPdServiceSoap12Binding">
            <wsoap12:address location="http://192.168.200.3:80/SOAPdService/SOAPdService.asmx" />
		</wsdl:port>
	</wsdl:service>

</wsdl:definitions>
the SOAP server function:

var soap = global.get('soap');
var http = global.get('http');

var port = context.get('port');
var wsdl = context.get('wsdl').trim();

console.log(port);

var SOAPdService = {
	SOAPdService: {
		SOAPdPort: {
			startFlow: function(args, soapResponseCallback) {
				var payload = args.payload;
				console.log("Payload", payload);
				node.send({
					"payload": payload,
					"_soapServer_soapResponseCallback": soapResponseCallback
				});
			},
			startFlowOneWay: function(args) {
				console.log("startFlowOneWay");
			}
		}
	}
};

var server = http.createServer(function(request, response){
	response.end("404: Not found: " + request.url);
});

server.listen(port);
server = soap.listen(server, "/soap", SOAPdService, wsdl, function() {
	node.log('server initialized');
});

server.log = function(type, data) {
	node.log(type);
	node.log(data);
};

node.on("close", function(callback) {
	server.close(callback);
});

Thanks in advance.

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