CA DevTest support for ibm-37 character set support in Workstation

Document ID : KB000091830
Last Modified Date : 02/05/2018
Show Technical Document Details
Issue:
I am testing SOAP based web service test case in CA DevTest v10.2 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 
Cause:
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.  We need to write a script to convert from IBM-37 into UTF-8

 
Resolution:
Currently not supported. We do not convert IBM-37 response into UTF-8 format. 

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;