I have a NodeJS server that also has a SOAP service running in the app.js directory.
The service works fine when I test it with PostMan (when I perform a POST request against the endpoint) but it throws an error when a client tries to access it with a PHP client.
Error:
Parsing WSDL: Couldn't load from 'https://{URL}/soap/wsdl.
As I understand the problem is that the endpoint works fine, but there is no WSDL description attached?
If this is the case, how do I "attach" the WSDL description to this enpoint?
app.js content:
import "babel-polyfill";
import app from './config/express';
import config from './config/config';
import bodyParser from 'body-parser'
import soap from 'soap'
let xml = require('fs').readFileSync('./REDE.wsdl', 'utf8');
let myService = {
RealEstateDataExchange: {
RealEstateDataExchangePort: {
getObjectIdsByStatus: function(args, callback) {
// do something and get result
// call callback with result like so:
// callback( result );
}
}
}
};
app.use(bodyParser.raw({type: function(){return true;}, limit: '5mb'}));
app.listen(config.port, () => {
console.info(`Server started on port ${config.port}`);
soap.listen(app,'/soap/wsdl',myService,xml);
});
export default app;
from How to fix Node SOAP service when it thorws Parsing WSDL error
No comments:
Post a Comment