AnsweredAssumed Answered

Custom code fails at HTTPS responder step

Question asked by DevTestUser on Mar 16, 2016
Latest reply on Mar 17, 2016 by DevTestUser

Hi,

 

I am manipulating the VS response in VSM using script.

 

What I am doing is after 'VS Image Response Selection' I am adding scripted step and finding some values from the response and replacing with the hard coded values which I need and then sending back to 'HTTPs Responder'

 

List list = testExec.getStateValue("lisa.vse.response");

TransientResponse rsp = list.get(0);

String responseBody = rsp.getBodyText();

responseBody = responseBody.replaceAll("oldvalue","newvalue");

testExec.setStateValue("lisa.vse.response",responseBody);

 

My script execute properly and invokes the 'HTTPS Responder' but https responder fails with below error

 

 

 

 

============================================================================

| com.thoughtworks.xstream.mapper.CannotResolveClassException: soapenv:Envelope

============================================================================

| Step:        Virtual HTTPS Responder

----------------------------------------------------------------------------

| Message:     soapenv:Envelope

----------------------------------------------------------------------------

| Trapped Exception: soapenv:Envelope

| Trapped Message:   com.thoughtworks.xstream.mapper.CannotResolveClassException: soapenv:Envelope

----------------------------------------------------------------------------

STACK TRACE

com.thoughtworks.xstream.mapper.CannotResolveClassException: soapenv:Envelope

  at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:56)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

  at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:45)

  at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)

  at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:133)

  at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)

  at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1052)

  at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1036)

  at com.thoughtworks.xstream.XStream.fromXML(XStream.java:912)

  at com.thoughtworks.xstream.XStream.fromXML(XStream.java:903)

  at com.itko.lisa.vse.stateful.model.Streamer.fromXML(Streamer.java:92)

  at com.itko.lisa.vse.stateful.BaseRespondStep.getResponse(BaseRespondStep.java:312)

  at com.itko.lisa.vse.stateful.BaseRespondStep.getResponse(BaseRespondStep.java:296)

  at com.itko.lisa.vse.stateful.protocol.http.HttpRespondStep.respond(HttpRespondStep.java:111)

  at com.itko.lisa.vse.stateful.BaseRespondStep.execute(BaseRespondStep.java:231)

  at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)

  at com.itko.lisa.test.TestCase.execute(TestCase.java:1280)

  at com.itko.lisa.test.TestCase.execute(TestCase.java:1195)

  at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1180)

  at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1048)

  at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:68)

  at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:961)

  at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)

  at java.lang.Thread.run(Unknown Source)

============================================================================

Outcomes