The CreatorCon Call for Content is officially open! Get started here.

Dynamic WSDL error

sourabhdhaygude
Kilo Guru

Hi All,

I am facing an issue when I try to set the endpoint dynamically and override it. If i try to remove the endpoint from the below code and run, it takes the endpoint from the soap message and it runs smooth.

=====================================================================================

            var s = new sn_ws.SOAPMessageV2('Dell Dispatch', 'CreateDispatch');

            s.setEndpoint("https://sandbox.api.dell.com/support/dispatch/v2/service?wsdl");

            s.setStringParameterNoEscape('Dispatch.RequestCompleteCare', 'false');

            s.setStringParameterNoEscape('ShipToAddress.CountryISOCode', '250');

            s.setStringParameterNoEscape('ShipToAddress.City', 'Savannah');

            var response = s.execute();

            var status = response.getStatusCode();

======================================================================================

When I execute the above code, I get the below response:

------------------------------------------------------------------------------------------------

Resource does not exist: /scs/snc_node_disable.html

<?xml version='1.0' ?>

<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>

<env:Body>

<env:Fault>

<faultcode>env:Client</faultcode>

<faultstring>Internal Error</faultstring>

</env:Fault>

</env:Body>

</env:Envelope>

-------------------------------------------------------------------------------------------------

Surely something is wrong at my end but am unable to find it. Please help

Kind regards,

Sourabh D

1 ACCEPTED SOLUTION

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Sourabh,




SOAP Web Service - ServiceNow Wiki


..


For instance, a generated SOAP Endpoint may look like this:


https://instance.service-now.com/incident.do?SOAP



the soap endpoint you have defined actually ends in ?WSDL


..



Should end in ?SOAP



Best Regards



Tony


View solution in original post

4 REPLIES 4

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Sourabh,




SOAP Web Service - ServiceNow Wiki


..


For instance, a generated SOAP Endpoint may look like this:


https://instance.service-now.com/incident.do?SOAP



the soap endpoint you have defined actually ends in ?WSDL


..



Should end in ?SOAP



Best Regards



Tony


sourabhdhaygude
Kilo Guru

Indeed that was the thing I was missing. I was entering the wsdl instead of the endpoint.


Thanks a lot Tony. That made my day.



Kind regards,


Sourabh D


Hi Sourabh.



Excellent! Your update has made my day!



Don't forget to mark the correct answer so others can find it easily in the future.



Best Regards



Tony




sourabhdhaygude
Kilo Guru

Hi Tony,


How should I mark this as a correct answer. I cant see any button anywhere on my screen.



Kind regards,


Sourabh D