View Outgoing SOAP message from Service-now

jonbebb
Kilo Contributor

Is I possible to view the Outgoing SOAP message when using webservices

I have to send data back to a webmethods system and have to use 2 variables in the workflow

being Webmethods I cannot download WSDL

Manually copied WSDL into Outbound SOAP message
Using SOAP generator generated the Function
Added the parameters and set the variable in the function envelope

When I send the receiving client does not receive the variables but does receive hard coded data.
I would like to view the outgoing message to validate if I am sending this but cannot see the variable or name to use with a gs.log statement

Any one any ideas

Many thanks
Jon

3 REPLIES 3

jason_petty
Tera Expert

When you use the SOAP Message object to run the test, there is a tab that shows you your tests that you ran and you can see the outgoing soap message and response there. The variables should be in this format in the SOAP Envelope code:

${variable_name}

then you create a parameter with the same variable_name and click the Test Related Link.


Jacob_Andersen
ServiceNow Employee
ServiceNow Employee

Jonbebb,

A neat trick to test this out is to force the web service to use the ecc queue. Doing this, you can see exactly what is being sent out as XML. You're probably using code like this to sent the SOAP message:



var s = new SOAPMessage('TemperatureConvert', 'TempConvertSoap.FahrenheitToCelsius');
s.setParameter('temperatureF', '100');
s.post();

Instead, change the last line to this (notice the TRUE parameter):


s.post(true);


After you do this, look in the ecc queue for an outbound record and you'll see your XML in the payload field.

Good luck!


jonbebb
Kilo Contributor

Thanks folks the one word true was great as you can see output via workflow.
Much appreciated