Service Virtualization

  • 1.  Message: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)

    Posted Sep 28, 2017 04:36 PM

    Greetings Team,

     

    I have created a JMS based VSM using the 'More Flexible' option as I have to substitude variable in JMS payload by following the below thread

     

    https://communities.ca.com/message/241993107-re-variable-substitution-in-binary-jms-payload?commentID=241993107#comment-…   

     

    I have also added Execute Script step with the proved script, however on deploying the VSM, below error message is thrown.

     

    Could you please help?

     

    Thanks in advance.

     

    ============================================================================
    | com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)
    ============================================================================
    | Step: VS Image Response Selection
    ----------------------------------------------------------------------------
    | Message: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)
    ----------------------------------------------------------------------------
    | Trapped Exception: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)
    | Trapped Message: com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)
    ----------------------------------------------------------------------------
    STACK TRACE
    com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)
    at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:63)
    at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)
    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1052)
    at com.itko.lisa.vse.stateful.model.Streamer.fromXML(Streamer.java:92)
    at com.itko.lisa.vse.stateful.ConversationalStep.execute(ConversationalStep.java:453)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1283)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1050)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:70)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:963)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)
    at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
    at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
    at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
    ... 19 more
    ============================================================================



  • 2.  Re: Message: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)

    Broadcom Employee
    Posted Sep 28, 2017 05:15 PM

    Rather than deploying your model - can you run the same in ITR mode in the workstation & send a request which will trigger the virtual service execution?

     

    In the ITR view, we can check the response you get in the prepare response step (before respond step is called) - or if there is any error in the model logic.



  • 3.  Re: Message: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)

    Posted Sep 28, 2017 05:59 PM

    Greetings Prem,

     

    Thanks for the quick response.

     

    I did try in the ITR mode, however only 3 steps are executed.

     

    1. Listen

    2. Prepare Request

    3. VS Image Response Selection

     

    In the last step below error is thrown

     

    In The Request Side I have used

    a) Scriptable DPH - To convert non printable characters into something printable

    b) Delimited Text DPH

     

    In the Response Side

    a) Scriptable  DPH- To convert non printable characters into something printable

    ============================================================================ | com.thoughtworks.xstream.io.StreamException:  : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)  ============================================================================ | Step:        VS Image Response Selection ---------------------------------------------------------------------------- | Message:      : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)  ---------------------------------------------------------------------------- | Trapped Exception:  : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)  | Trapped Message:   com.thoughtworks.xstream.io.StreamException:  : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)  ---------------------------------------------------------------------------- STACK TRACE com.thoughtworks.xstream.io.StreamException:  : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)       at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)      at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)      at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)      at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)      at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)      at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:63)      at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)      at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)      at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1052)      at com.itko.lisa.vse.stateful.model.Streamer.fromXML(Streamer.java:92)      at com.itko.lisa.vse.stateful.ConversationalStep.execute(ConversationalStep.java:453)      at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)      at com.itko.lisa.test.TestCase.execute(TestCase.java:1283)      at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)      at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)      at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1127)      at com.itko.lisa.coordinator.Instance.run(Instance.java:204) Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)       at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)      at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)      at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)      at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)      ... 16 more ============================================================================


  • 4.  Re: Message: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)

    Posted Oct 02, 2017 06:37 AM

    Greetings Prem,

     

    Any guidance or help would be highly appreciated.

     

    Thanks in advance.



  • 5.  Re: Message: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)
    Best Answer

    Broadcom Employee
    Posted Oct 02, 2017 11:12 AM

    The exception in the VS Image response selection step suggests that the model is unable to parse the matched response from VSI.

     

    Can you paste the response from the matched transaction which throws the above error?

    Another thing to try would be to replace the non printable chars with spaces in your request dph & see if that eliminates this error. If that doesn't help - you would need to get with CA support to help you further.



  • 6.  Re: Message: : only whitespace content allowed before start tag and not R (position: START_DOCUMENT seen R... @1:1)

    Posted Oct 03, 2017 11:17 PM

    Thanks Prem