Custom form SOAP Action response XML


#1

Hi all,

I’m trying to retrieve data from a SOAP web service and print it in the “thank you” bodycopy of a custom form.
I can return and print a single string but cannot return XML.

This is my request:
<?xml version=“1.0”?>
<root>
<node1>string</node1>
<node2>%response_1234_q1%</node2>
<node3>%response_1234_q2%</node3>
<node4>string</node4>
</root>

This is the response:
<?xml version=“1.0”?>
<wsResponse>
<wsResult>??</wsResult>
</wsResponse>

My available keywords are:
%globals_session_soap_wsResult%

In the response, I am expecting to see the following (as this is the format of the response from my web service):
<?xml version=“1.0” encoding=“utf-8” ?>
<root>
<node1>??</node1>
<node2>??</node2>
</root>

And therefore be able to use the following keywords (or similar):
%globals_session_soap_wsResultnode1%
%globals_session_soap_wsResultnode2%

Can anyone tell me if i’m doing anything wrong (which is very likely!)?

Thanks in advance.
Dave


Return HTML from SOAP action
(Bart Banda) #2

What does this keyword actually print when you use it on the thank you page?

%globals_session_soap_wsResult%


#3

Hi Bart, sorry for the late response.

Currently the response is blank when returning %globals_session_soap_wsResult%.
I have a feeling that this issue is caused by a null xmlns in the root node of my xml response. My web service isn’t creating the xmlns so not sure where this is coming from…?

Related to this, is there anywhere in Squiz that caches the SOAP actions? I’ve noticed that when I update the web service i have to use a different WSDL URL in the SOAP action each time…?


(Bart Banda) #4

Yea might be something incorrect in the web service then. You could always try https://www.soapui.org/open-source.html first and see if it works using hardcoded values there?

Yea you’ve got a few options for deciding how to cache the WSDL URL:


#5

Hi Bart, thanks for the reply.

This has always been set to “never” as the data and URL could change.

Whilst the Squiz request payload doesn’t change when I update the actual web service, you can manually change it to represent the WSDL expected params. Very strange!

I have managed to return a HTML table from the XML response, though I’m not sure what’s changed and I’m still not getting the various XML nodes that return in the response.

The HTML string has given me exactly what I needed so I’ll give up with this for now.

Thanks for the assistance.
Dave