XML text file to response Object


For one of my soap Request I get a response with special characters for < and > signs.
Because the response has these special characters, I could not run command like WS.getElementPropertyValue and get the correct value.
So I googled and found a way to change special chars to < > signs and also changed the file in pretty format. My question is now how do I go back from this
xml text file to response Object so I can run the command WS.getElementPropertyValue?

Thanks in advance

SOAP messages carry XML documents. A XML document contains a lot of < and > characters. In XML, < and > are nothing special.

I do not understand what you wrote. Please show us more info: your XML data, your test script, error log, etc.

1 Like

Hi again,

Thank you for a quick response.

If the response didn’t have any special characters, I will do the following to get the value of Success Tag.

def locator1 = “GetUploadFeedbackResponse.Return.Transaction_Summary.Success”
response = findTestObject(‘ABC/GetTransactions’)))
String strMessageResponse = WS.getElementPropertyValue(response, locator1)

Here’s a response after I replace the special characters with <>. However this is in a text file test.xml now.
How do I get the <Success? tag value from the text file. 0

  <?xml version="1.0" encoding="UTF-8"?><soap:Envelope 
     <dex420c:GetUploadFeedbackResponse xmlns:dex420c="http://metadata.dod.mil/mdr/ns/NECC-AP/FPJ-JDS/"> 
          <Return> <DEX_Feedback>

@mqamar I can’t speak to your existing code but I can tell you I find dealing with XML much easier using GPathResult.

More info here:


Web search:


Still I do not understand your problem.

Please show us the raw response BEFORE you do any character replacement.