Forum Discussion
JHoreczky
13 years agoContributor
if( context.httpResponse.responseContent == null ) {
log.info "returning on null"
return
}
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def classpathHacker = new com.eviware.soapui.support.ClasspathHacker ()
def path = groovyUtils.getProjectPath()
def myfile = new java.io.File(path + "/LoopQualification-1.0.6.jar")
classpathHacker.addFile( myfile )
import com.aaa.togw.services.loopqual.clientsharedobjects.TogwLoopQualTierRespDto;
// bytes starting at magic number make up the object in rawResponseData
def magicNumber = 171
def len = context.httpResponse.rawResponseData.size()
def byte[] ba = context.httpResponse.rawResponseData[magicNumber..(len-1)]
def ByteArrayInputStream bis = new ByteArrayInputStream(ba);
def ObjectInputStream ois = new ObjectInputStream(bis)
/// the following line is causing the class cast exception
def TogwLoopQualTierRespDto dtoObj = (TogwLoopQualTierRespDto)ois.readObject();
log.info "returning on null"
return
}
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def classpathHacker = new com.eviware.soapui.support.ClasspathHacker ()
def path = groovyUtils.getProjectPath()
def myfile = new java.io.File(path + "/LoopQualification-1.0.6.jar")
classpathHacker.addFile( myfile )
import com.aaa.togw.services.loopqual.clientsharedobjects.TogwLoopQualTierRespDto;
// bytes starting at magic number make up the object in rawResponseData
def magicNumber = 171
def len = context.httpResponse.rawResponseData.size()
def byte[] ba = context.httpResponse.rawResponseData[magicNumber..(len-1)]
def ByteArrayInputStream bis = new ByteArrayInputStream(ba);
def ObjectInputStream ois = new ObjectInputStream(bis)
/// the following line is causing the class cast exception
def TogwLoopQualTierRespDto dtoObj = (TogwLoopQualTierRespDto)ois.readObject();
Related Content
- 5 years ago
- 5 years ago
- 14 years ago
- 2 years ago
Recent Discussions
- 5 hours ago
- 6 hours ago