Forum Discussion

BA_Service_Haus's avatar
BA_Service_Haus
Regular Contributor
11 years ago

[Resolved] Errors in testrunner.bat only

Hi,

when trying to run a certain testcase with soapUI Pro 4.6.4 using testrunner.bat it fails because of two errors:
First:
12:47:08,504 ERROR [SoapUI] An error occurred [error: Unexpected element: CDATA], see error log for details
org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
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.xml.XmlUtils.stripWhitespaces(XmlUtils.java:1092)
at com.eviware.soapui.impl.wsdl.support.wss.entries.ManualSAMLEntry.process(ManualSAMLEntry.java:110)
at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:192)
at com.eviware.soapui.impl.wsdl.submit.filters.WssRequestFilter.filterWsdlRequest(WssRequestFilter.java:58)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterAbstractHttpRequest(AbstractRequestFilter.java:37)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterRequest(AbstractRequestFilter.java:31)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:180)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:76)
at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:238)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:417)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:235)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:77)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:640)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:598)
at com.eviware.soapui.SoapUIProTestCaseRunner.runTestCase(SourceFile:198)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:395)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:158)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:89)
at com.eviware.soapui.SoapUIProTestCaseRunner.main(SourceFile:58)
Caused by: org.xml.sax.SAXParseException; systemId: file:; lineNumber: 1; columnNumber: 1; Unexpected element: CDATA
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
... 29 more
[Fatal Error] :1:1: Content is not allowed in prolog.

Second:
12:47:08,527 ERROR [SoapUI] An error occurred [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.], see
error log for details
java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.eviware.soapui.support.xml.XmlUtils.parse(XmlUtils.java:136)
at com.eviware.soapui.support.xml.XmlUtils.parseXml(XmlUtils.java:539)
at com.eviware.soapui.impl.wsdl.support.wss.entries.ManualSAMLEntry.process(ManualSAMLEntry.java:110)
at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:192)
at com.eviware.soapui.impl.wsdl.submit.filters.WssRequestFilter.filterWsdlRequest(WssRequestFilter.java:58)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterAbstractHttpRequest(AbstractRequestFilter.java:37)
at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterRequest(AbstractRequestFilter.java:31)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:180)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:76)
at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:238)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:417)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:235)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:43)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:77)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:640)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:598)
at com.eviware.soapui.SoapUIProTestCaseRunner.runTestCase(SourceFile:198)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:395)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:158)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:89)
at com.eviware.soapui.SoapUIProTestCaseRunner.main(SourceFile:58)


The same testcase runs error free using soapUI Pro 4.0.1.
It also runs error free, when using the soapUI Pro 4.6.4 GUI for exectution.

Do you have any clue, what the problem might be?

Best regards

9 Replies

  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi,

    I think I found the error by myself.

    The problem was an invalid wss.
    The outgoingWSS "Test" was set for the executed testcase.
    "Test" was declared as SAML(XML) but only holds "abcd" (so no valid xml).


    When I removed the outgoingWSS or inserted valid XML, everything works as expected.
    I just wonder, why this behaviour changed during the last soapUI versions.

    Best regards
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    If you're working with SoapUI Pro 4.6.4 that would explain the difference as more stringent processing of XML has been introduced.

    Regards,

    Giscard
    SmartBear Support
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Thanks for your reply.
    But why is testrunner.bat logging an error, while the GUI doens't?
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    The errors look to be coming from your RequestFilter.filterRequest event. This event is not triggered while you are using the TestRunner. That is a bug that we have logged (SOAP-1226). It is up to the Product Owner now to prioritize it for a fix.
    As a workaround for when you are using the TestRunner, you can move your event script to a TestRunListener.beforeRun event and adjust it there as needed.

    Regards,

    Giscard
    SmartBear Support
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Thank you for highlighting this issue. Is it possible for you to share the project file you are using to trigger this behavior? It would help us investigate further.

    Regards,
    Arian
    SmartBear Sweden
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi Arian,

    I will try to prepare a project and send it to you by opening a support ticket.
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi Arian,

    I just tried to create an example by using the soapUI-pro-sample-projekt.
    But then I recognized, that the error is also logged at the "SoapUI log" tab.

    I think I just didn't looked there, when trying it earlier.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    Glad you able to find the errors in the GUI also. Is this forum thread now resolved? As far as defect SOAP-1226 Giscard pointed out this may be now resolved in the latest SoapUI Pro release (4.6.4).



    Regards,
    Marcus
    SmartBear Support
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi Marcus,

    from my point of view there is no error.
    It's just a "more stringent processing of XML" as Giscard wrote.

    Thanks for your help.