Testing SOAP based web service test case which sends a request and gets a response that is in unreadable format. The response header has the character set ibm-37.
Do we need to update any of the properties files to support ibm-37 character set? So that the response will be in readable format.
sample response header:
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=ibm-37
All supported DevTest releases.
WS Step does not decode the response payload according to the charset.
Since the response is arriving in charset=IBM-37 and the Workstation renders content in charset=UTF-8.
Currently not supported. DevTest does not convert IBM-37 response into UTF-8 format. So would need to write a script to convert from IBM-37 into UTF-8
Workaround/Sample code(non-Working):
***********************************************
Add a JS Step to do the conversion.
This is just a sample and not a working code:
// The WebService step creates a response object of the type XMLResultsCache.
// In this example, I'm assuming the response is saved in the LASTRESPONSE property.
// Another option is to use the property "lisa.{name of the step}.rsp" to get the response
// (the ITR will reveal this property name).
com.itko.lisa.gui.XMLResultsCache result = testExec.getStateObject("LASTRESPONSE");
// Get the body of the SOAP response and convert it into the
// correct charset, IBM-37, but as bytes.
byte[] data = result.getBody().getBytes("ibm-37")'
// Convert the bytes, which are in IBM-37 charset, to the UTF-8 charset
String s2 = new String ( data, "UTF-8" );
// And now you have a readable response
return s2;