D
D
Danil2017-10-11 16:12:32
SOAP
Danil, 2017-10-11 16:12:32

Why returns 500 error in SOAP?

My code:

var soap = require('soap');
var url = 'http://Login:[email protected]/ws/info_card.1cws?wsdl';
var args = {
                    test: 20000001202},
                 }

soap.createClient(url, function(err, client) {
client.setSecurity(new soap.BasicAuthSecurity('Login', 'Password'))
client.ИнформацияПоКарте.ИнформацияПоКартеSoap.ШКвИнфо(args, function(err, result) {
        console.log(err)
        console.log(result);
    });
});

In response:
err -
[Error: Cannot parse response]
....

result -
{ html:
   { head:
      { meta: [Object],
        title: '500 - Internal Server Error
        style: [Object] },
     body: { div: [Object] } } }

Help me to understand.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Anton, 2017-10-11
@Veneomin

500 error indicates an exception on the server side 1s. Here you need to get the text of this error, for example by expanding the full result. If the link with ?wsdl works in the browser, then you need to look at this same wsdl and the names / types of parameters that are passed to the method. Well, "my code" is clearly crooked.

D
Dmitry Eremin, 2017-10-11
@EreminD

remove substring "?wsdl" from url

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question