Forum Discussion

cbyndr's avatar
cbyndr
Contributor
15 years ago

soapui unable to parse responses with XML embedded as strings

We're using SOAPUI to exercise webmethods and validate integration points between our applications and a Siebel system.

This sometimes requires embedding XML requests as strings in some other xml structure, e.g.,


   

   
     
         <br /><getVirtualTN><br />&nbsp; <Account><br />&nbsp; &nbsp; <AccountNumber>30005</AccountNumber><br />&nbsp; </Account><br /></getVirtualTN><br />

   


When we send up requests like this from SOAPUI, the response looks scrambled:

ÑS›oÇ0 ˇW æa≈œEQ£∆m&äFùÛµ¬ …jÀh—˘flØ≠
Kˆv˜˚hÔÆWg¯s"∆ b 2⁄7ÌjÕ4Äzà i–7?∂Ø÷ã9 8õÂheM›]wJœ@X Ü¥QfiÕæy "Í"ƒΩ#ú0ØJö3 UY Hç»L≠?<ºª.óKı“–‚z≠f£˝bæ— Y! S róˇøÀ|(xøοâ#Ø˚é©O@ä÷¿#Fy÷ɉ˙ʉ

And we get this in the logs:

org.apache.xmlbeans.XmlException: error: Illegal XML character: 0x10
org.apache.xmlbeans.impl.piccolo.io.IllegalCharException: Illegal XML character: 0x10
at org.apache.xmlbeans.impl.piccolo.xml.XMLReaderReader.read(XMLReaderReader.java:169)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yy_refill(PiccoloLexer.java:3474)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:3958)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:712)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:696)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:683)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208)
at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:633)
at com.eviware.soapui.support.editor.views.xml.overview.AbstractXmlOverviewEditorView.setXml(SourceFile:98)
at com.eviware.soapui.support.editor.views.AbstractXmlEditorView.update(AbstractXmlEditorView.java:75)
at com.eviware.soapui.support.editor.views.AbstractXmlEditorView.activate(AbstractXmlEditorView.java:66)
at com.eviware.soapui.support.editor.Editor$InputTabsChangeListener.stateChanged(Editor.java:220)
at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:290)
at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:222)
at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116)
at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50)
at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:478)
at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:464)
at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(BasicTabbedPaneUI.java:3238)
at java.awt.Component.processMouseEvent(Component.java:5599)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3129)
at java.awt.Component.processEvent(Component.java:5367)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:712)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:696)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:683)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208)
at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:633)
at com.eviware.soapui.support.editor.views.xml.overview.AbstractXmlOverviewEditorView.setXml(SourceFile:98)
at com.eviware.soapui.support.editor.views.AbstractXmlEditorView.update(AbstractXmlEditorView.java:75)
at com.eviware.soapui.support.editor.views.AbstractXmlEditorView.activate(AbstractXmlEditorView.java:66)
at com.eviware.soapui.support.editor.Editor$InputTabsChangeListener.stateChanged(Editor.java:220)
at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:290)
at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:222)
at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116)
at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50)
at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:478)
at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:464)
at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(BasicTabbedPaneUI.java:3238)
at java.awt.Component.processMouseEvent(Component.java:5599)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3129)
at java.awt.Component.processEvent(Component.java:5367)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: org.apache.xmlbeans.impl.piccolo.io.IllegalCharException: Illegal XML character: 0x10
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:717)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
... 35 more
Caused by: org.apache.xmlbeans.impl.piccolo.io.IllegalCharException: Illegal XML character: 0x10
at org.apache.xmlbeans.impl.piccolo.xml.XMLReaderReader.read(XMLReaderReader.java:169)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yy_refill(PiccoloLexer.java:3474)
at org.apache.xmlbeans.impl.piccolo.xml.PiccoloLexer.yylex(PiccoloLexer.java:3958)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yylex(Piccolo.java:1290)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.yyparse(Piccolo.java:1400)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:714)
... 36 more

Is there a way for SOAPUI to get past the parsing error and display the response, so that its contents are verifiable?

5 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    hmm... could it be that the response is compressed in some way? Can you send/show the contents of the Raw response view for this response?

    regards!

    /Ole
    eviware.com
  • Could be, but now I am unable to reproduce. I will post raw response if it recurs.

    Perhaps sending one of the successfully parsed responses I am now seeing could also shed some light?






     
        1-111111
        33333
        c 2 a
        target
       
         
            5555554545
            Virtual Line
         

       

       
          999999
       

     




  • OK! The issue is back. As you thought, the response is compressed. Below is the stack trace.

    [Note: screen shot of the raw response view is attached.]

    08:48:55,678 INFO  [AbstractHttpRequestDesktopPanel] Got response for [XMLHandler_Binding.HandleXML:cd-content-1] in 698ms (522 bytes)
    java.io.IOException: Decompression of response failed
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpMethodSupport.getResponseBody(HttpMethodSupport.java:152)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod.getResponseBody(ExtendedPostMethod.java:130)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.BaseHttpResponse.(BaseHttpResponse.java:75)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.SinglePartHttpResponse.(SinglePartHttpResponse.java:42)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.WsdlSinglePartHttpResponse.(WsdlSinglePartHttpResponse.java:36)
    at com.eviware.soapui.impl.wsdl.submit.filters.HttpPackagingResponseFilter.wsdlRequest(HttpPackagingResponseFilter.java:64)
    at com.eviware.soapui.impl.wsdl.submit.filters.HttpPackagingResponseFilter.afterAbstractHttpResponse(HttpPackagingResponseFilter.java:42)
    at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.afterRequest(AbstractRequestFilter.java:64)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:187)
    at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:122)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
    at java.util.concurrent.FutureTask.run(FutureTask.java:123)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
    at java.lang.Thread.run(Thread.java:613)
    Caused by: java.util.zip.ZipException: unknown compression method
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:140)
    at com.eviware.soapui.support.Tools.readAndWrite(Tools.java:246)
    at com.eviware.soapui.support.Tools.readAll(Tools.java:227)
    at com.eviware.soapui.impl.wsdl.support.CompressionSupport.DeflaterDecompress(CompressionSupport.java:138)
    at com.eviware.soapui.impl.wsdl.support.CompressionSupport.decompress(CompressionSupport.java:77)
    at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpMethodSupport.getResponseBody(HttpMethodSupport.java:148)
    ... 15 more
    09:49:11,389 INFO  [AbstractHttpRequestDesktopPanel] Got response for [XMLHandler_Binding.HandleXML:cd-content-1] in 521679ms (316 bytes)
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    ok.. hmm.. how have you set the compression related settings in the global http preferences? Can you show both the request and response for this from the http log (at the bottom)?

    regards!

    /Ole
    eviware.com
  • OK, so the option 'Accept compressed responses from hosts' had been true.

    By setting that option to false, soapui parse the compressed response, no problem.

    Here is what gets logged when that option is set to true:

    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "POST /EAI_enu/start.swe?SWEExtSource=SecureWebService&SWEExtCmd=Execute&UserName=weblogic&Password=w1ogi3 HTTP/1.1[\r][\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "SOAPAction: "rpc/CbeyondSiebel:HandleXML"[\r][\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "Host: siebel7test.dal0.cbeyond.net[\r][\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "Content-Length: 476[\r][\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "[\r][\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "[\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> " 
    [\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "  [\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "      [\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "        [\n]"<br />Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "<getVirtualTN>[\n]"<br />Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "&nbsp; <Account>[\n]"<br />Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "&nbsp; &nbsp; <AccountNumber>42405</AccountNumber>[\n]"<br />Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "&nbsp; </Account>[\n]"<br />Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "</getVirtualTN>[\n]"<br />Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "[\n]"<br />Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "[\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "     
    [\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "  [\n]"
    Tue Feb 16 11:14:19 EST 2010:DEBUG:>> "
    "
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "Date: Tue, 16 Feb 2010 16:14:23 GMT[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "Server: Microsoft-IIS/6.0[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "MicrosoftOfficeWebServer: 5.0_Pub[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "_charset: UTF-8[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "cache-control: no-cache, must-revalidate, max-age=0[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "pragma: no-cache[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "content-encoding: deflate[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "content-type: text/xml;charset=UTF-8[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "content-length: 412[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "Connection: close[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "[\r][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "[0x84]S[0xdd]o[0x82]0[0x10][0xff]W[0x8][0xf][0xbe]a[0xc5][0x8f][0xb9](j[0xd4][0xb8][0xcd]D[0xd1][0xa8]s[0xbe]V[0xb8] Ym[0x19]-~[0xfc][0xf7]k[0xb][0x8a][0xc2][0x92][0xbd][0xdd][0xfd]>[0xda][0xbb][0xeb][0xd5][0x19]\[0x8e][0xc4]8A[0xcc]CF{[0xa6]][0xad][0x99][0x6]P[0x8f][0xf9]![\r]z[0xe6][0xe7][0xe6][0xcd]z5[0x7]}g[0xbd][0x18].[0xad][0x89][0xbb][0xed]L[0xe8][0x9][0x8][0x8b][0xc0][0x90]6[0xca];7[0xbc]g[0x1e][0x84][0x88]:[0x8]q[0xef][0x0]G[0xcc][0xab][0x92][0xe6][0xc]GU[0x16][0x7]H[0x5][0x8]2#23[0xeb][0x85][0x87]w[0xd7][0xf9]|[0xae][0x9e][0x1b]Z\[0xaf][0xd5]l[0xb4][0x9b][0xcf][0xd6][0xfa] +[0xa4]\`[0xea]A[0xee][0xf2][0xff]w[0x99][0xf][0x5][0x8f][0x98] [0xed];q[0xe4]u>0[0xf5][0x9]H[0xd1][\n]"
    Tue Feb 16 11:14:22 EST 2010:DEBUG:<< "x[0xc4]([0xbf][0xf5] [0xb9][0x9e]9[0xde][0xc3][0x95]Q [0x1d][0xc2][0x1e][0x88][0xf4]KMBD[0xbf]BD[0xf7]iB[0x95][0x9f][0x84][0x89][0xae][0x1c]S[0x1a][0xe4][0xb3]Js=[0xb0]4[0x1c]T[0x2][0xd1]U[0xfe][0x0][0xc4]6[0x8c]E[0x82][0xc9][0xc6][0xbd]aC[0xcf]c[0x9][0x15][0x85]t[0xea]+[0xc0][0xb6][0xec][0xf9][0xfb][0xd7]b[0xa4][0x8][0xf4][0xc4]