Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-2795

faultTo addressing in soap-addressing quickstart doesn't work

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1.0
    • Component/s: quickstarts
    • Labels:
      None

      Description

      If you follow steps described in Readme.md file and try to deploy it by mvn install -Pdeploy, one test fails:

      SoapAddressingTest.wsAddressingFaultTo:79 ยป FileNotFound /tmp/test.txt (No suc...
      

      Even if I create the file by touch /tmp/test.txt.

      This can be workarounded by skipping of the tests by mvn -Pdeploy install -DskipTests. If you invoke the service with fault-causing message by mvn exec:java -Dexec.args='"Guardian Angel" 10' you will get in the server log:

      10:55:08,424 ERROR [stderr] (default-workqueue-4) Error on line 1 column 69 
      10:55:08,424 ERROR [stderr] (default-workqueue-4)   SXXP0003: Error reported by XML parser: The prefix "SOAP-ENV" for element "SOAP-ENV:Fault"
      10:55:08,424 ERROR [stderr] (default-workqueue-4)   is not bound.
      10:55:08,425 ERROR [stderr] (default-workqueue-4) net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 69; The prefix "SOAP-ENV" for element "SOAP-ENV:Fault" is not bound.
      10:55:08,425 ERROR [stderr] (default-workqueue-4) 	at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:420)
      10:55:08,425 ERROR [stderr] (default-workqueue-4) 	at net.sf.saxon.event.Sender.send(Sender.java:169)
      10:55:08,425 ERROR [stderr] (default-workqueue-4) 	at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:46)
      10:55:08,425 ERROR [stderr] (default-workqueue-4) 	at org.switchyard.quickstarts.soap.addressing.ServiceTransformers.toElement(ServiceTransformers.java:104)
      10:55:08,425 ERROR [stderr] (default-workqueue-4) 	at org.switchyard.quickstarts.soap.addressing.ServiceTransformers.transformFromItemNotAvailable(ServiceTransformers.java:86)
      
      ...
      
      10:55:08,449 ERROR [stderr] (default-workqueue-4) Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 69; The prefix "SOAP-ENV" for element "SOAP-ENV:Fault" is not bound.
      10:55:08,449 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)
      10:55:08,449 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:175)
      10:55:08,449 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
      10:55:08,449 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)
      10:55:08,449 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:281)
      10:55:08,449 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:208)
      10:55:08,450 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:733)
      10:55:	08,450 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1754)
      10:55:08,450 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
      10:55:08,450 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
      10:55:08,450 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
      10:55:08,450 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
      10:55:08,450 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1196)
      10:55:08,451 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:555)
      10:55:08,451 ERROR [stderr] (default-workqueue-4) 	at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:396)
      10:55:08,451 ERROR [stderr] (default-workqueue-4) 	... 79 more
      10:55:08,451 ERROR [stderr] (default-workqueue-4) ---------
      10:55:08,451 ERROR [stderr] (default-workqueue-4) org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 69; The prefix "SOAP-ENV" for element "SOAP-ENV:Fault" is not bound.
      10:55:08,451 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)
      10:55:08,451 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:175)
      10:55:08,451 ERROR [stderr] (default-workqueue-4) 	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
      
      ...
      
      10:55:08,464 WARN  [org.switchyard] (default-workqueue-4) SWITCHYARD010200: Transformer 'org.switchyard.transform.internal.TransformerUtil$1' returned a null transformation result when transforming from type 'java:org.switchyard.quickstarts.soap.addressing.ItemNotAvailable' to type '{urn:switchyard-quickstart:soap-addressing:1.0}ItemNotAvailable'. Check input payload matches requirements of the Transformer implementation.
      

      The client log contains:

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
          <soap:Header>
              <Action xmlns="http://www.w3.org/2005/08/addressing">urn:switchyard-quickstart:soap-addressing:1.0:OrderService:orderResponse</Action>
              <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:2c4fd427-4805-4765-9606-d8e976a5cc2d</MessageID>
              <To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
              <RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:3d3fcbbb-fd43-4118-b40e-62577894f39a</RelatesTo>
          </soap:Header>
          <soap:Body>
              <orderResponse xmlns="urn:switchyard-quickstart:soap-addressing:1.0">
                  <return>Thank you for your order. You should hear back from our WarehouseService shortly!</return>
              </orderResponse>
          </soap:Body>
      </soap:Envelope>
      
      
      [WARNING] 
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.io.FileNotFoundException: /tmp/test.txt (No such file or directory)
      	at java.io.FileInputStream.open0(Native Method)
      	at java.io.FileInputStream.open(FileInputStream.java:195)
      	at java.io.FileInputStream.<init>(FileInputStream.java:138)
      	at java.io.FileReader.<init>(FileReader.java:72)
      	at org.switchyard.quickstarts.soap.addressing.SoapAddressingClient.getFileMessage(SoapAddressingClient.java:83)
      	at org.switchyard.quickstarts.soap.addressing.SoapAddressingClient.main(SoapAddressingClient.java:57)
      	... 6 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  igarashitm tomohisa igarashi
                  Reporter:
                  trohovsky Tomas Rohovsky
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: