I'm trying to send a simple HTTP request using Orbeon command line interface and display the output in terminal.
I execute in tomcat webapps/orbeon/WEB-INF directory:
java -jar orbeon-cli.jar -o "response=system:out" submit.xplThe content of submit.xpl is as follows (target URL is replaced): <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xforms="http://www.w3.org/2002/xforms"> <p:param name="submission" type="input"/> <p:param name="request" type="input"/> <p:param name="response" type="output"/> <p:processor name="oxf:xforms-submission"> <p:input name="submission"> <xforms:submission method="get" resource="http://VALID_XML_RESOURCE_URL" /> </p:input> <p:input name="request"> <parameters> <first>12</first> <size>100</size> </parameters> </p:input> <p:output name="response" ref="response"/> </p:processor> </p:config>If I run tcpdump at the same time, it looks like no request is actually sent so I guess the response is irrelavant. Orbeon version is Orbeon Forms 4.4.0.201311042001 CE. Btw, running orbeon-cli example XSL transformation works. The resulting error (for running oxf:xforms-submission pipeline in CLI): Initializing Resource Manager with: {oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManagerFactory, oxf.resources.priority.1=org.orbeon.oxf.resources.FilesystemResourceManagerFactory, oxf.resources.priority.2=org.orbeon.oxf.resources.ClassLoaderResourceManagerFactory} 2015-02-11 11:09:37,512 ERROR org.orbeon.oxf.main.OPS - +----------------------------------------------------------------------------------------------------------------------+ |An Error has Occurred | |----------------------------------------------------------------------------------------------------------------------| |org.orbeon.oxf.common.ValidationException: line 76, column 57 of oxf:/ops/xforms/xforms-submission.xpl (reading proces| |sor output: element='<p:output name="document" id="binary-document"/>', name='document', id='binary-document'): null | |----------------------------------------------------------------------------------------------------------------------| |Application Call Stack | |----------------------------------------------------------------------------------------------------------------------| |oxf:/var/lib/tomcat6/webapps/orbeon/WEB-INF/submit.xpl |reading processor output | 19| |Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·| |element=<p:output name="response" ref="response"/> | |name =response | |ref =response | |----------------------------------------------------------------------------------------------------------------------| |oxf:/ops/xforms/xforms-submission.xpl |reading processor output | 76| |Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·Ā·| |element=<p:output name="document" id="binary-document"/> | |name =document | |id =binary-document | |----------------------------------------------------------------------------------------------------------------------| |----------------------------------------------------------------------------------------------------------------------| |Exception: java.lang.NullPointerException | |----------------------------------------------------------------------------------------------------------------------| |rbeon.oxf.xforms.processor.PipelineResponse$$anon$1|<init> |PipelineResponse.scala | 42| |org.orbeon.oxf.xforms.processor.PipelineResponse$ |getResponse |PipelineResponse.scala | 36| |org.orbeon.oxf.xforms.processor.PipelineResponse |getResponse |PipelineResponse.scala | | |org.orbeon.oxf.xforms.processor.XFormsToSomething$3|read |XFormsToSomething.java | 157| |org.orbeon.oxf.xforms.processor.XFormsToSomething$3|read |XFormsToSomething.java | 138| |org.orbeon.oxf.processor.ProcessorImpl |readCacheInputAsObject |ProcessorImpl.java | 363| |org.orbeon.oxf.xforms.processor.XFormsToSomething |doIt |XFormsToSomething.java | 137| |org.orbeon.oxf.xforms.processor.XFormsToSomething |access$000 |XFormsToSomething.java | 46| |org.orbeon.oxf.xforms.processor.XFormsToSomething$1|readImpl |XFormsToSomething.java | 64| |essor.impl.ProcessorOutputImpl$TopLevelOutputFilter|read |ProcessorOutputImpl.java | 258| |org.orbeon.oxf.processor.impl.ProcessorOutputImpl |read |ProcessorOutputImpl.java | 404| |----------------------------------------------------------------------------------------------------------------------| |Exception: org.orbeon.oxf.common.ValidationException | |----------------------------------------------------------------------------------------------------------------------| |org.orbeon.oxf.common.OrbeonLocationException$ |wrapException |OrbeonLocationException.scala | 60| |org.orbeon.oxf.common.OrbeonLocationException |wrapException |OrbeonLocationException.scala | | |org.orbeon.oxf.processor.impl.ProcessorOutputImpl |read |ProcessorOutputImpl.java | 407| |org.orbeon.oxf.processor.ProcessorImpl |readInputAsSAX |ProcessorImpl.java | 262| |cessor.pipeline.TeeProcessor$TeeProcessorOutputImpl|readImpl |TeeProcessor.java | 88| |essor.impl.ProcessorOutputImpl$TopLevelOutputFilter|read |ProcessorOutputImpl.java | 258| |org.orbeon.oxf.processor.impl.ProcessorOutputImpl |read |ProcessorOutputImpl.java | 404| |org.orbeon.oxf.processor.ProcessorImpl |readInputAsSAX |ProcessorImpl.java | 262| |org.orbeon.oxf.processor.ProcessorImpl |readInputAsTinyTree |ProcessorImpl.java | 288| |org.orbeon.oxf.processor.ProcessorImpl$3 |read |ProcessorImpl.java | 317| |org.orbeon.oxf.processor.ProcessorImpl$3 |read |ProcessorImpl.java | 315| |org.orbeon.oxf.processor.ProcessorImpl |readCacheInputAsObject |ProcessorImpl.java | 363| |org.orbeon.oxf.processor.ProcessorImpl |readCacheInputAsTinyTree |ProcessorImpl.java | 315| |f.processor.pipeline.choose.ConcreteChooseProcessor|start |ConcreteChooseProcessor.java | 176| |processor.pipeline.choose.ConcreteChooseProcessor$1|readImpl |ConcreteChooseProcessor.java | 123| |essor.impl.ProcessorOutputImpl$TopLevelOutputFilter|read |ProcessorOutputImpl.java | 258| |org.orbeon.oxf.processor.impl.ProcessorOutputImpl |read |ProcessorOutputImpl.java | 404| |org.orbeon.oxf.processor.ProcessorImpl |readInputAsSAX |ProcessorImpl.java | 262| |orbeon.oxf.processor.pipeline.PipelineProcessor$1$1|run |PipelineProcessor.java | 93| |org.orbeon.oxf.processor.pipeline.PipelineProcessor|executeChildren |PipelineProcessor.java | 680| |org.orbeon.oxf.processor.pipeline.PipelineProcessor|access$000 |PipelineProcessor.java | 60| |g.orbeon.oxf.processor.pipeline.PipelineProcessor$1|readImpl |PipelineProcessor.java | 91| |essor.impl.ProcessorOutputImpl$TopLevelOutputFilter|read |ProcessorOutputImpl.java | 258| |org.orbeon.oxf.processor.impl.ProcessorOutputImpl |read |ProcessorOutputImpl.java | 404| |org.orbeon.oxf.processor.ProcessorImpl |readInputAsSAX |ProcessorImpl.java | 262| |orbeon.oxf.processor.pipeline.PipelineProcessor$1$1|run |PipelineProcessor.java | 93| |org.orbeon.oxf.processor.pipeline.PipelineProcessor|executeChildren |PipelineProcessor.java | 680| |org.orbeon.oxf.processor.pipeline.PipelineProcessor|access$000 |PipelineProcessor.java | 60| |g.orbeon.oxf.processor.pipeline.PipelineProcessor$1|readImpl |PipelineProcessor.java | 91| |essor.impl.ProcessorOutputImpl$TopLevelOutputFilter|read |ProcessorOutputImpl.java | 258| |org.orbeon.oxf.processor.impl.ProcessorOutputImpl |read |ProcessorOutputImpl.java | 404| |org.orbeon.oxf.processor.ProcessorImpl |readInputAsSAX |ProcessorImpl.java | 262| |org.orbeon.oxf.processor.ProcessorImpl |readInputAsSAX |ProcessorImpl.java | 266| |org.orbeon.oxf.processor.serializer.URLSerializer |serialize |URLSerializer.java | 87| |----------------------------------------------------------------------------------------------------------------------| |Exception: org.orbeon.oxf.common.OXFException | |----------------------------------------------------------------------------------------------------------------------| |org.orbeon.oxf.processor.serializer.URLSerializer |serialize |URLSerializer.java | 100| |org.orbeon.oxf.main.OPS |start |OPS.java | 262| |org.orbeon.oxf.main.OPS |main |OPS.java | 277| +----------------------------------------------------------------------------------------------------------------------+ |
Administrator
|
Hi Sander,
Indeed, I fixed this issue, and the fix will be in 3.8.2 PE and 3.9 CE. And for reference, this is the corresponding issue, with the link to the patch in case you want to create your own build with the fix. Thank you for letting us know about this! https://github.com/orbeon/orbeon-forms/issues/2092 Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Thanks! I pulled orbeon-xforms project from github, built, tested and can confirm the issue is fixed and submission processor works flawlessly with orbeon-cli.
PS: Surely the fix will be in 4.8.2 PE and 4.9 CE.
|
In reply to this post by Alessandro Vernet
Not sure, if this is a concern or related to this topic, but if I built 'teamcity-release' with ant, it did some unit tests and org.orbeon.oxf.test.ProcessorTest failed. I have Java 1.8 JDK, otherwise my environment should not be unusual. If I commented out line 178 in the unit test, then the build was successful. The unit test output is brought below:
XPL - Element around result of delegation processor [junit] Expected data: [junit] <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xi="" xmlns:d="http://orbeon.org/oxf/xml/document" xmlns:delegation="http://orbeon.org/oxf/xml/delegation" xmlns:oxf="http://www.orbeon.com/oxf/processors" xsi:type="xs:string" content-type="application/xml; charset=utf-8"><root xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:delegation="http://orbeon.org/oxf/xml/delegation" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://orbeon.org/oxf/xml/document" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -1 </root></document> [junit] Actual data: [junit] <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string" content-type="application/xml; charset=utf-8"><root xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:d="http://orbeon.org/oxf/xml/document" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:delegation="http://orbeon.org/oxf/xml/delegation" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -1 </root></document> [junit] [FAIL] runTest[XPL - Element around result of delegation processor](org.orbeon.oxf.test.ProcessorTest) [junit] junit.framework.AssertionFailedError [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$3.addError(JUnitTestRunner.java:974) [junit] at junit.framework.TestResult.addError(TestResult.java:39) [junit] at junit.framework.JUnit4TestAdapterCache$1.testFailure(JUnit4TestAdapterCache.java:49) [junit] at org.junit.runner.notification.RunNotifier$4.notifyListener(RunNotifier.java:139) [junit] at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:61) [junit] at org.junit.runner.notification.RunNotifier.fireTestFailures(RunNotifier.java:134) [junit] at org.junit.runner.notification.RunNotifier.fireTestFailure(RunNotifier.java:128) [junit] at org.junit.internal.runners.model.EachTestNotifier.addFailure(EachTestNotifier.java:23) [junit] at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:275) [junit] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) [junit] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit] at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit] at org.junit.runners.Suite.runChild(Suite.java:127) [junit] at org.junit.runners.Suite.runChild(Suite.java:26) [junit] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit] at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit] at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768) [junit] Caused by: java.lang.AssertionError [junit] at org.junit.Assert.fail(Assert.java:86) [junit] at org.junit.Assert.fail(Assert.java:95) [junit] at org.orbeon.oxf.test.ProcessorTest.test(ProcessorTest.java:178) [junit] at org.orbeon.oxf.test.ProcessorTest.runTest(ProcessorTest.java:52) [junit] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [junit] at java.lang.reflect.Method.invoke(Method.java:483) [junit] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit] at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit] at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit] at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) [junit] at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit] at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) [junit] ... 21 more |
Administrator
|
Hi Sander,
Yes, indeed, I was referring to 4.8.2 PE and 4.9 CE :). About the test failing, I am not getting this here. You're getting this on the "master", or with an earlier version? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |