Hi! One questions – most probably a bit simple and I just don’t get it: How can I submit an complete instance in a XForms-form via a HTTP-Request (either get or post – dosn’t matter at all) to an other web service or PHP-Skript as a real XML document (including all attributes, elements, namespaces and so on). We’ve got a single XHTML-XForms page defined as view.xhtml and therein is a submission. This submission hast to send a complete, validateable XML-Document to an other system expecting this XML document either as post or get request (as a get request it is expected to be wrapped in the variable ‚xml‘). I just find something like that to make it work: <xforms:instance id="departures-ticket"> <request transaction="BA"> <service mark="false" number="1"> ... </service> </request> </xforms:instance> <xforms:instance id="departures-response"> <bookingResponse xmlns="" /> </xforms:instance> <xforms:variable name="departures-ticket" select="encode-for-uri(normalize-space(saxon:serialize(instance('departures-ticket'), 'xml')))" ev:event="xforms-submit" ev:observer="departures-submission" /> <xforms:submission id="departures-submission" method="get" mode="asynchronous" xxforms:cache="false" replace="instance" action="<A HREF="http://localhost/requestlog.php?xml={$departures-ticket}">http://localhost/requestlog.php?xml={$departures-ticket}" ref="instance('departures-ticket')" instance="departures-response"/> And I really can’t believe that is a efficient way to do such an essential and simple, intuitive task as sending an XML to an other web service!? Is it? Why? So, how can I address any instance in any model in the form and send it to a random service without having to serialize it in a variable as a pre-send condition? With post I don’t even get it to work. I tried to do it the way it is suggested in XForms 1.1 Spec but didn’t even succeed to send a single request I saw something in the documentation about XPL-processors but I don’t get it how to _ transmit what I want to transmit (a single instance not the whole form) _ transmit without reloading the whole document Can you give me information about a step by step tutorial? Can you give me a working example how to set up post submissions of instances? All my post submissions are empty (except fort he java session information) Thanky a lot, JT
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Thorsten,
I am not sure what the issue is, but posting an XML document to a service is the easiest thing to do with XForms in general and Orbeon Forms in particular. The Orbeon Forms tutorial covers that BTW, see: http://www.orbeon.com/orbeon/doc/intro-tutorial#bookcast-save-button In your case, this will definitely work, assuming you do have your PHP stuff running at http://localhost/requestlog.php: <xforms:submission id="departures-submission" ref="instance('departures-ticket')" method="post action="http://localhost/requestlog.php" replace="instance"instance="departures-response"/> Something like the above definitely works with post. If you have trouble, enable XForms logging to see what's going on: http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging -Erik On Fri, Feb 5, 2010 at 5:52 AM, Stumpf, Jens Thorsten <[hidden email]> wrote: > Hi! > > One questions – most probably a bit simple and I just don’t get it: > > How can I submit an complete instance in a XForms-form via a HTTP-Request > (either get or post – dosn’t matter at all) to an other web service or > PHP-Skript as a real XML document (including all attributes, elements, > namespaces and so on). > > We’ve got a single XHTML-XForms page defined as view.xhtml and therein is a > submission. This submission hast to send a complete, validateable > XML-Document to an other system expecting this XML document either as post > or get request (as a get request it is expected to be wrapped in the > variable ‚xml‘). > > I just find something like that to make it work: > > <xforms:instance id="departures-ticket"> > > <request transaction="BA"> > > <service mark="false" number="1"> > > ... > > </service> > > </request> > > </xforms:instance> > > <xforms:instance id="departures-response"> > > <bookingResponse xmlns="" /> > > </xforms:instance> > > <xforms:variable name="departures-ticket" > > select="encode-for-uri(normalize-space(saxon:serialize(instance('departures-ticket'), > > 'xml')))" ev:event="xforms-submit" ev:observer="departures-submission" > > /> > > <xforms:submission id="departures-submission" method="get" > > mode="asynchronous" xxforms:cache="false" replace="instance" > > action="http://localhost/requestlog.php?xml={$departures-ticket}" > > ref="instance('departures-ticket')" instance="departures-response"/> > > And I really can’t believe that is a efficient way to do such an essential > and simple, intuitive task as sending an XML to an other web service!? Is > it? Why? > > So, how can I address any instance in any model in the form and send it to a > random service without having to serialize it in a variable as a pre-send > condition? > > With post I don’t even get it to work. I tried to do it the way it is > suggested in XForms 1.1 Spec but didn’t even succeed to send a single > request > > I saw something in the documentation about XPL-processors but I don’t get it > how to _ transmit what I want to transmit (a single instance not the whole > form) _ transmit without reloading the whole document > > Can you give me information about a step by step tutorial? Can you give me a > working example how to set up post submissions of instances? All my post > submissions are empty (except fort he java session information) Thanky a > lot, > > JT > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi,
thanks for your reply! Ok, maybe I'm really blindfolded. But IMHO there is no data send at all. It is not working the way I described it/you said it has to work. So let's drill down to the core: 1. The setup ========= #################################################################################################### # File: page-flow.xml #################################################################################################### <config xmlns="http://www.orbeon.com/oxf/controller" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xu="http://www.xmldb.org/xupdate"> <!- --> <!-- Testpage 06: XForms Submissions und Services --> <page path-info="/srm/" view="test06/view.xhtml"/> <!-- --> <epilogue url="oxf:/config/epilogue.xpl"/> </config> #################################################################################################### # File: test06/view.xhtml #################################################################################################### <?xml version="1.0" encoding="UTF-8"?> <xhtml:html xsl:version="2.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:widget="http://orbeon.org/oxf/xml/widget"> <xhtml:head> <xhtml:title>Testpages Orbeon</xhtml:title> <xforms:model> <!-- Inserted because of the instance fetch warning on form load - dosn't help at all --> <xforms:instance> <nil xmlns=""/> </xforms:instance> <xforms:instance id="ticket"> <request transaction="BA" xmlns=""> <service mark="false" number="1"> </service> </request> </xforms:instance> <xforms:instance id="flights"> <bookingResponse xmlns=""/> </xforms:instance> <xforms:submission id="test-submission" method="post" action="http://srmservice.loc/requestlog.php" ref="instance('ticket')" replace="instance" instance="flights" /> </xforms:model> </xhtml:head> <xhtml:body> <xhtml:h1>Testpage 5</xhtml:h1> <xforms:submit submission="test-submission"> <xforms:label>Send</xforms:label> </xforms:submit> <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget" /> </xhtml:body> </xhtml:html> 2. The logs ============ On loading the form: ==> /var/log/tomcat6/orbeon.log <== 2010-02-05 20:01:43,462 INFO ProcessorService - /srm/ - Received request 2010-02-05 20:01:43,793 WARN XFormsServer - XForms - function - Instance not found with xxforms:instance() function {instance id: ""} 2010-02-05 20:01:43,892 INFO ProcessorService - /srm/ - Timing: 430 - Cache hits for cache.main: 1060, fault: 1, adds: 1, expirations: 1, success rate: 99% 2010-02-05 20:01:43,963 INFO ProcessorService - /config/theme/orbeon.css - Received request 2010-02-05 20:01:43,965 INFO ProcessorService - /config/theme/orbeon.css - Timing: 2 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:43,966 INFO ProcessorService - /xforms-server/xforms-yuicalendar-min.css - Received request 2010-02-05 20:01:43,996 INFO ProcessorService - /config/theme/xforms-widgets.css - Received request 2010-02-05 20:01:43,997 INFO ProcessorService - /config/theme/xforms-widgets.css - Timing: 1 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:43,999 INFO ProcessorService - /xforms-server/xforms-yuicalendar-min.css - Timing: 33 - Cache hits for cache.main: 7, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:43,999 INFO ProcessorService - /config/theme/images/orbeon-small-blueorange.gif - Received request 2010-02-05 20:01:44,001 INFO ProcessorService - /config/theme/images/orbeon-small-blueorange.gif - Timing: 2 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,005 INFO ProcessorService - /ops/images/xforms/section-closed.png - Received request 2010-02-05 20:01:44,006 INFO ProcessorService - /ops/images/xforms/section-opened.png - Received request 2010-02-05 20:01:44,038 INFO ProcessorService - /ops/images/xforms/section-closed.png - Timing: 33 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,040 INFO ProcessorService - /ops/images/xforms/help.png - Received request 2010-02-05 20:01:44,041 INFO ProcessorService - /ops/images/xforms/help.png - Timing: 1 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,042 INFO ProcessorService - /ops/images/xforms/section-opened.png - Timing: 36 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,068 INFO ProcessorService - /xforms-server/xforms-yuicalendar-min.js - Received request 2010-02-05 20:01:44,079 INFO ProcessorService - /xforms-server/xforms-yuicalendar-min.js - Timing: 11 - Cache hits for cache.main: 7, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,089 INFO ProcessorService - /config/theme/images/tabbar-blue.png - Received request 2010-02-05 20:01:44,091 INFO ProcessorService - /config/theme/images/tabbar-blue.png - Timing: 2 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,092 INFO ProcessorService - /config/theme/images/tab-shadow-left.png - Received request 2010-02-05 20:01:44,093 INFO ProcessorService - /config/theme/images/tab-shadow-left.png - Timing: 1 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,093 INFO ProcessorService - /config/theme/images/tab-shadow-top.png - Received request 2010-02-05 20:01:44,094 INFO ProcessorService - /config/theme/images/tab-shadow-top.png - Timing: 1 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,342 INFO ProcessorService - /ops/yui/assets/skins/sam/sprite.png - Received request 2010-02-05 20:01:44,345 INFO ProcessorService - /ops/yui/assets/skins/sam/sprite.png - Timing: 3 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% 2010-02-05 20:01:44,349 INFO ProcessorService - /ops/yui/assets/skins/sam/sprite.png - Received request 2010-02-05 20:01:44,352 INFO ProcessorService - /ops/yui/assets/skins/sam/sprite.png - Timing: 3 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% When I click the submit button: ==> /var/log/tomcat6/orbeon.log <== 2010-02-05 20:03:10,310 INFO ProcessorService - /xforms-server - Received request 2010-02-05 20:03:10,506 WARN XFormsServer - XForms - submission - instance replacement did not take place upon successful response because no body was provided. Submission: test-submission 2010-02-05 20:03:10,508 INFO ProcessorService - /xforms-server - Timing: 197 - Cache hits for cache.main: 24, fault: 1, adds: 0, expirations: 0, success rate: 96% ==> websites/jts.integration.www.studiosus.loc/static/backend/request.log <== February 5, 2010, 8:03 pm: Array ( [JSESSIONID] => 43C8A7853DD9276CF05295FE1314BFDF ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ \---- That's where I (and PHP) expect the post data to be... in that array, which is simply a complete dump of all requests send to the php If i send post data by hand from an html form: February 5, 2010, 8:08 pm: Array ( [foo] => bar [PHPSESSID] => p6tgni4in9qeo9uvpq2vjjhnr0 ) The only relevant problem I see is: I don't use any xxforms, so this warning is maybe wrong (but maybe it's triggered by the widget). It really shouldn't matter that there is no reply. The POST-Data should be send with and without a reply (especially because the reply of the web service is a reply to the request ;-). The epilogue.xpl is the standard one, didn't change anything. And anything else is shown here. So what's wrong? I think the instance providing the data is ignored. What's the reason? Regards, JT > -----Ursprüngliche Nachricht----- > Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Erik > Bruchez > Gesendet: Freitag, 5. Februar 2010 17:54 > An: [hidden email] > Betreff: [ops-users] Re: XML-Document-Submission and -Reply > > Thorsten, > > I am not sure what the issue is, but posting an XML document to a service is the > easiest thing to do with XForms in general and Orbeon Forms in particular. > > The Orbeon Forms tutorial covers that BTW, see: > > http://www.orbeon.com/orbeon/doc/intro-tutorial#bookcast-save-button > > In your case, this will definitely work, assuming you do have your PHP stuff > running at http://localhost/requestlog.php: > > <xforms:submission id="departures-submission" > ref="instance('departures-ticket')" method="post > action="http://localhost/requestlog.php" > replace="instance"instance="departures-response"/> > > Something like the above definitely works with post. > > If you have trouble, enable XForms logging to see what's going on: > > http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging > > -Erik > > On Fri, Feb 5, 2010 at 5:52 AM, Stumpf, Jens Thorsten > <[hidden email]> wrote: > > Hi! > > > > One questions - most probably a bit simple and I just don't get it: > > > > How can I submit an complete instance in a XForms-form via a > > HTTP-Request (either get or post - dosn't matter at all) to an other > > web service or PHP-Skript as a real XML document (including all > > attributes, elements, namespaces and so on). > > > > We've got a single XHTML-XForms page defined as view.xhtml and therein > > is a submission. This submission hast to send a complete, validateable > > XML-Document to an other system expecting this XML document either as > > post or get request (as a get request it is expected to be wrapped in > > the variable 'xml'). > > > > I just find something like that to make it work: > > > > <xforms:instance id="departures-ticket"> > > > > <request transaction="BA"> > > > > <service mark="false" number="1"> > > > > ... > > > > </service> > > > > </request> > > > > </xforms:instance> > > > > <xforms:instance id="departures-response"> > > > > <bookingResponse xmlns="" /> > > > > </xforms:instance> > > > > <xforms:variable name="departures-ticket" > > > > select="encode-for-uri(normalize-space(saxon:serialize(instance('depar > > tures-ticket'), > > > > 'xml')))" ev:event="xforms-submit" ev:observer="departures-submission" > > > > /> > > > > <xforms:submission id="departures-submission" method="get" > > > > mode="asynchronous" xxforms:cache="false" replace="instance" > > > > action="http://localhost/requestlog.php?xml={$departures-ticket}" > > > > ref="instance('departures-ticket')" instance="departures-response"/> > > > > And I really can't believe that is a efficient way to do such an > > essential and simple, intuitive task as sending an XML to an other web > > service!? Is it? Why? > > > > So, how can I address any instance in any model in the form and send > > it to a random service without having to serialize it in a variable as > > a pre-send condition? > > > > With post I don't even get it to work. I tried to do it the way it is > > suggested in XForms 1.1 Spec but didn't even succeed to send a single > > request Oviously I send the request, but there is no data inside. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Thorsten,
The next step is to enable more logging. Try this in your properties-local.xml file: <property as="xs:NMTOKENS" name="oxf.xforms.logging.debug" value="document model submission submission-details control event action analysis server html analysis-xbl-tree server-body submission-body"/> Then restart Tomcat and try again. You should have lots of details about the submission, including the body sent. -Erik On Fri, Feb 5, 2010 at 11:28 AM, Stumpf, Jens Thorsten <[hidden email]> wrote: > Hi, > > thanks for your reply! > > Ok, maybe I'm really blindfolded. But IMHO there is no data send at all. It is not working the way I described it/you said it has to work. > > So let's drill down to the core: > > 1. The setup > ========= > > #################################################################################################### > # File: page-flow.xml > #################################################################################################### > <config xmlns="http://www.orbeon.com/oxf/controller" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xu="http://www.xmldb.org/xupdate"> > <!- --> > <!-- Testpage 06: XForms Submissions und Services --> > <page path-info="/srm/" view="test06/view.xhtml"/> > <!-- --> > > <epilogue url="oxf:/config/epilogue.xpl"/> > > </config> > > > #################################################################################################### > # File: test06/view.xhtml > #################################################################################################### > <?xml version="1.0" encoding="UTF-8"?> > <xhtml:html xsl:version="2.0" xmlns="http://www.w3.org/1999/xhtml" > xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:widget="http://orbeon.org/oxf/xml/widget"> > <xhtml:head> > <xhtml:title>Testpages Orbeon</xhtml:title> > <xforms:model> > > <!-- Inserted because of the instance fetch warning on form load - dosn't help at all --> > <xforms:instance> > <nil xmlns=""/> > </xforms:instance> > > <xforms:instance id="ticket"> > <request transaction="BA" xmlns=""> > <service mark="false" number="1"> > </service> > </request> > </xforms:instance> > > <xforms:instance id="flights"> > <bookingResponse xmlns=""/> > </xforms:instance> > > <xforms:submission id="test-submission" method="post" action="http://srmservice.loc/requestlog.php" ref="instance('ticket')" replace="instance" instance="flights" /> > </xforms:model> > </xhtml:head> > <xhtml:body> > <xhtml:h1>Testpage 5</xhtml:h1> > > <xforms:submit submission="test-submission"> > <xforms:label>Send</xforms:label> > </xforms:submit> > > <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget" /> > </xhtml:body> > </xhtml:html> > > > 2. The logs > ============ > > On loading the form: > ==> /var/log/tomcat6/orbeon.log <== > 2010-02-05 20:01:43,462 INFO ProcessorService - /srm/ - Received request > 2010-02-05 20:01:43,793 WARN XFormsServer - XForms - function - Instance not found with xxforms:instance() function {instance id: ""} > 2010-02-05 20:01:43,892 INFO ProcessorService - /srm/ - Timing: 430 - Cache hits for cache.main: 1060, fault: 1, adds: 1, expirations: 1, success rate: 99% > 2010-02-05 20:01:43,963 INFO ProcessorService - /config/theme/orbeon.css - Received request > 2010-02-05 20:01:43,965 INFO ProcessorService - /config/theme/orbeon.css - Timing: 2 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:43,966 INFO ProcessorService - /xforms-server/xforms-yuicalendar-min.css - Received request > 2010-02-05 20:01:43,996 INFO ProcessorService - /config/theme/xforms-widgets.css - Received request > 2010-02-05 20:01:43,997 INFO ProcessorService - /config/theme/xforms-widgets.css - Timing: 1 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:43,999 INFO ProcessorService - /xforms-server/xforms-yuicalendar-min.css - Timing: 33 - Cache hits for cache.main: 7, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:43,999 INFO ProcessorService - /config/theme/images/orbeon-small-blueorange.gif - Received request > 2010-02-05 20:01:44,001 INFO ProcessorService - /config/theme/images/orbeon-small-blueorange.gif - Timing: 2 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,005 INFO ProcessorService - /ops/images/xforms/section-closed.png - Received request > 2010-02-05 20:01:44,006 INFO ProcessorService - /ops/images/xforms/section-opened.png - Received request > 2010-02-05 20:01:44,038 INFO ProcessorService - /ops/images/xforms/section-closed.png - Timing: 33 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,040 INFO ProcessorService - /ops/images/xforms/help.png - Received request > 2010-02-05 20:01:44,041 INFO ProcessorService - /ops/images/xforms/help.png - Timing: 1 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,042 INFO ProcessorService - /ops/images/xforms/section-opened.png - Timing: 36 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,068 INFO ProcessorService - /xforms-server/xforms-yuicalendar-min.js - Received request > 2010-02-05 20:01:44,079 INFO ProcessorService - /xforms-server/xforms-yuicalendar-min.js - Timing: 11 - Cache hits for cache.main: 7, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,089 INFO ProcessorService - /config/theme/images/tabbar-blue.png - Received request > 2010-02-05 20:01:44,091 INFO ProcessorService - /config/theme/images/tabbar-blue.png - Timing: 2 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,092 INFO ProcessorService - /config/theme/images/tab-shadow-left.png - Received request > 2010-02-05 20:01:44,093 INFO ProcessorService - /config/theme/images/tab-shadow-left.png - Timing: 1 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,093 INFO ProcessorService - /config/theme/images/tab-shadow-top.png - Received request > 2010-02-05 20:01:44,094 INFO ProcessorService - /config/theme/images/tab-shadow-top.png - Timing: 1 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,342 INFO ProcessorService - /ops/yui/assets/skins/sam/sprite.png - Received request > 2010-02-05 20:01:44,345 INFO ProcessorService - /ops/yui/assets/skins/sam/sprite.png - Timing: 3 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > 2010-02-05 20:01:44,349 INFO ProcessorService - /ops/yui/assets/skins/sam/sprite.png - Received request > 2010-02-05 20:01:44,352 INFO ProcessorService - /ops/yui/assets/skins/sam/sprite.png - Timing: 3 - Cache hits for cache.main: 12, fault: 0, adds: 0, expirations: 0, success rate: 100% > > > When I click the submit button: > ==> /var/log/tomcat6/orbeon.log <== > 2010-02-05 20:03:10,310 INFO ProcessorService - /xforms-server - Received request > 2010-02-05 20:03:10,506 WARN XFormsServer - XForms - submission - instance replacement did not take place upon successful response because no body was provided. Submission: test-submission > 2010-02-05 20:03:10,508 INFO ProcessorService - /xforms-server - Timing: 197 - Cache hits for cache.main: 24, fault: 1, adds: 0, expirations: 0, success rate: 96% > > ==> websites/jts.integration.www.studiosus.loc/static/backend/request.log <== > > February 5, 2010, 8:03 pm: > Array > ( > [JSESSIONID] => 43C8A7853DD9276CF05295FE1314BFDF > ) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > \---- That's where I (and PHP) expect the post data to be... in that array, which is simply a complete dump of all requests send to the php > > > If i send post data by hand from an html form: > February 5, 2010, 8:08 pm: > Array > ( > [foo] => bar > [PHPSESSID] => p6tgni4in9qeo9uvpq2vjjhnr0 > ) > > > The only relevant problem I see is: I don't use any xxforms, so this warning is maybe wrong (but maybe it's triggered by the widget). > It really shouldn't matter that there is no reply. The POST-Data should be send with and without a reply (especially because the reply of the web service is a reply to the request ;-). The epilogue.xpl is the standard one, didn't change anything. And anything else is shown here. > > So what's wrong? I think the instance providing the data is ignored. What's the reason? > > Regards, > > JT > > > >> -----Ursprüngliche Nachricht----- >> Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Erik >> Bruchez >> Gesendet: Freitag, 5. Februar 2010 17:54 >> An: [hidden email] >> Betreff: [ops-users] Re: XML-Document-Submission and -Reply >> >> Thorsten, >> >> I am not sure what the issue is, but posting an XML document to a service is the >> easiest thing to do with XForms in general and Orbeon Forms in particular. >> >> The Orbeon Forms tutorial covers that BTW, see: >> >> http://www.orbeon.com/orbeon/doc/intro-tutorial#bookcast-save-button >> >> In your case, this will definitely work, assuming you do have your PHP stuff >> running at http://localhost/requestlog.php: >> >> <xforms:submission id="departures-submission" >> ref="instance('departures-ticket')" method="post >> action="http://localhost/requestlog.php" >> replace="instance"instance="departures-response"/> >> >> Something like the above definitely works with post. >> >> If you have trouble, enable XForms logging to see what's going on: >> >> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging >> >> -Erik >> >> On Fri, Feb 5, 2010 at 5:52 AM, Stumpf, Jens Thorsten >> <[hidden email]> wrote: >> > Hi! >> > >> > One questions - most probably a bit simple and I just don't get it: >> > >> > How can I submit an complete instance in a XForms-form via a >> > HTTP-Request (either get or post - dosn't matter at all) to an other >> > web service or PHP-Skript as a real XML document (including all >> > attributes, elements, namespaces and so on). >> > >> > We've got a single XHTML-XForms page defined as view.xhtml and therein >> > is a submission. This submission hast to send a complete, validateable >> > XML-Document to an other system expecting this XML document either as >> > post or get request (as a get request it is expected to be wrapped in >> > the variable 'xml'). >> > >> > I just find something like that to make it work: >> > >> > <xforms:instance id="departures-ticket"> >> > >> > <request transaction="BA"> >> > >> > <service mark="false" number="1"> >> > >> > ... >> > >> > </service> >> > >> > </request> >> > >> > </xforms:instance> >> > >> > <xforms:instance id="departures-response"> >> > >> > <bookingResponse xmlns="" /> >> > >> > </xforms:instance> >> > >> > <xforms:variable name="departures-ticket" >> > >> > select="encode-for-uri(normalize-space(saxon:serialize(instance('depar >> > tures-ticket'), >> > >> > 'xml')))" ev:event="xforms-submit" ev:observer="departures-submission" >> > >> > /> >> > >> > <xforms:submission id="departures-submission" method="get" >> > >> > mode="asynchronous" xxforms:cache="false" replace="instance" >> > >> > action="http://localhost/requestlog.php?xml={$departures-ticket}" >> > >> > ref="instance('departures-ticket')" instance="departures-response"/> >> > >> > And I really can't believe that is a efficient way to do such an >> > essential and simple, intuitive task as sending an XML to an other web >> > service!? Is it? Why? >> > >> > So, how can I address any instance in any model in the form and send >> > it to a random service without having to serialize it in a variable as >> > a pre-send condition? >> > >> > With post I don't even get it to work. I tried to do it the way it is >> > suggested in XForms 1.1 Spec but didn't even succeed to send a single >> > request > > The truth is: > > Oviously I send the request, but there is no data inside. > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Erik Bruchez
Thanks,
I enabled the logging (a little bit different - we don't have the newest version) and it was in deed working. The submit was send, but the PHP-System didn't list it, because the request data isn't available via any of the standard PHP variables. Glad it works now :-) Thx, JT > -----Ursprüngliche Nachricht----- > Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Erik > Bruchez > Gesendet: Freitag, 5. Februar 2010 17:54 > An: [hidden email] > Betreff: [ops-users] Re: XML-Document-Submission and -Reply > > Thorsten, > > I am not sure what the issue is, but posting an XML document to a service is the > easiest thing to do with XForms in general and Orbeon Forms in particular. > > The Orbeon Forms tutorial covers that BTW, see: > > http://www.orbeon.com/orbeon/doc/intro-tutorial#bookcast-save-button > > In your case, this will definitely work, assuming you do have your PHP stuff > running at http://localhost/requestlog.php: > > <xforms:submission id="departures-submission" > ref="instance('departures-ticket')" method="post > action="http://localhost/requestlog.php" > replace="instance"instance="departures-response"/> > > Something like the above definitely works with post. > > If you have trouble, enable XForms logging to see what's going on: > > http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging > > -Erik > > On Fri, Feb 5, 2010 at 5:52 AM, Stumpf, Jens Thorsten > <[hidden email]> wrote: > > Hi! > > > > One questions - most probably a bit simple and I just don't get it: > > > > How can I submit an complete instance in a XForms-form via a > > HTTP-Request (either get or post - dosn't matter at all) to an other > > web service or PHP-Skript as a real XML document (including all > > attributes, elements, namespaces and so on). > > > > We've got a single XHTML-XForms page defined as view.xhtml and therein > > is a submission. This submission hast to send a complete, validateable > > XML-Document to an other system expecting this XML document either as > > post or get request (as a get request it is expected to be wrapped in > > the variable 'xml'). > > > > I just find something like that to make it work: > > > > <xforms:instance id="departures-ticket"> > > > > <request transaction="BA"> > > > > <service mark="false" number="1"> > > > > ... > > > > </service> > > > > </request> > > > > </xforms:instance> > > > > <xforms:instance id="departures-response"> > > > > <bookingResponse xmlns="" /> > > > > </xforms:instance> > > > > <xforms:variable name="departures-ticket" > > > > select="encode-for-uri(normalize-space(saxon:serialize(instance('depar > > tures-ticket'), > > > > 'xml')))" ev:event="xforms-submit" ev:observer="departures-submission" > > > > /> > > > > <xforms:submission id="departures-submission" method="get" > > > > mode="asynchronous" xxforms:cache="false" replace="instance" > > > > action="http://localhost/requestlog.php?xml={$departures-ticket}" > > > > ref="instance('departures-ticket')" instance="departures-response"/> > > > > And I really can't believe that is a efficient way to do such an > > essential and simple, intuitive task as sending an XML to an other web > > service!? Is it? Why? > > > > So, how can I address any instance in any model in the form and send > > it to a random service without having to serialize it in a variable as > > a pre-send condition? > > > > With post I don't even get it to work. I tried to do it the way it is > > suggested in XForms 1.1 Spec but didn't even succeed to send a single > > request > > > > I saw something in the documentation about XPL-processors but I don't > > get it how to _ transmit what I want to transmit (a single instance > > not the whole > > form) _ transmit without reloading the whole document > > > > Can you give me information about a step by step tutorial? Can you > > give me a working example how to set up post submissions of instances? > > All my post submissions are empty (except fort he java session > > information) Thanky a lot, > > > > JT > > > > -- > > You receive this message as a subscriber of the [hidden email] > > mailing list. > > To unsubscribe: mailto:[hidden email] > > For general help: mailto:[hidden email]?subject=help > > OW2 mailing lists service home page: http://www.ow2.org/wws > > > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Good to hear that.
-Erik On Mon, Feb 15, 2010 at 2:32 AM, Stumpf, Jens Thorsten <[hidden email]> wrote: > Thanks, > > I enabled the logging (a little bit different - we don't have the newest version) and it was in deed working. > The submit was send, but the PHP-System didn't list it, because the request data isn't available via any of the standard PHP variables. > > Glad it works now :-) > > Thx, > > JT > > >> -----Ursprüngliche Nachricht----- >> Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Erik >> Bruchez >> Gesendet: Freitag, 5. Februar 2010 17:54 >> An: [hidden email] >> Betreff: [ops-users] Re: XML-Document-Submission and -Reply >> >> Thorsten, >> >> I am not sure what the issue is, but posting an XML document to a service is the >> easiest thing to do with XForms in general and Orbeon Forms in particular. >> >> The Orbeon Forms tutorial covers that BTW, see: >> >> http://www.orbeon.com/orbeon/doc/intro-tutorial#bookcast-save-button >> >> In your case, this will definitely work, assuming you do have your PHP stuff >> running at http://localhost/requestlog.php: >> >> <xforms:submission id="departures-submission" >> ref="instance('departures-ticket')" method="post >> action="http://localhost/requestlog.php" >> replace="instance"instance="departures-response"/> >> >> Something like the above definitely works with post. >> >> If you have trouble, enable XForms logging to see what's going on: >> >> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging >> >> -Erik >> >> On Fri, Feb 5, 2010 at 5:52 AM, Stumpf, Jens Thorsten >> <[hidden email]> wrote: >> > Hi! >> > >> > One questions - most probably a bit simple and I just don't get it: >> > >> > How can I submit an complete instance in a XForms-form via a >> > HTTP-Request (either get or post - dosn't matter at all) to an other >> > web service or PHP-Skript as a real XML document (including all >> > attributes, elements, namespaces and so on). >> > >> > We've got a single XHTML-XForms page defined as view.xhtml and therein >> > is a submission. This submission hast to send a complete, validateable >> > XML-Document to an other system expecting this XML document either as >> > post or get request (as a get request it is expected to be wrapped in >> > the variable 'xml'). >> > >> > I just find something like that to make it work: >> > >> > <xforms:instance id="departures-ticket"> >> > >> > <request transaction="BA"> >> > >> > <service mark="false" number="1"> >> > >> > ... >> > >> > </service> >> > >> > </request> >> > >> > </xforms:instance> >> > >> > <xforms:instance id="departures-response"> >> > >> > <bookingResponse xmlns="" /> >> > >> > </xforms:instance> >> > >> > <xforms:variable name="departures-ticket" >> > >> > select="encode-for-uri(normalize-space(saxon:serialize(instance('depar >> > tures-ticket'), >> > >> > 'xml')))" ev:event="xforms-submit" ev:observer="departures-submission" >> > >> > /> >> > >> > <xforms:submission id="departures-submission" method="get" >> > >> > mode="asynchronous" xxforms:cache="false" replace="instance" >> > >> > action="http://localhost/requestlog.php?xml={$departures-ticket}" >> > >> > ref="instance('departures-ticket')" instance="departures-response"/> >> > >> > And I really can't believe that is a efficient way to do such an >> > essential and simple, intuitive task as sending an XML to an other web >> > service!? Is it? Why? >> > >> > So, how can I address any instance in any model in the form and send >> > it to a random service without having to serialize it in a variable as >> > a pre-send condition? >> > >> > With post I don't even get it to work. I tried to do it the way it is >> > suggested in XForms 1.1 Spec but didn't even succeed to send a single >> > request >> > >> > I saw something in the documentation about XPL-processors but I don't >> > get it how to _ transmit what I want to transmit (a single instance >> > not the whole >> > form) _ transmit without reloading the whole document >> > >> > Can you give me information about a step by step tutorial? Can you >> > give me a working example how to set up post submissions of instances? >> > All my post submissions are empty (except fort he java session >> > information) Thanky a lot, >> > >> > JT >> > >> > -- >> > You receive this message as a subscriber of the [hidden email] >> > mailing list. >> > To unsubscribe: mailto:[hidden email] >> > For general help: mailto:[hidden email]?subject=help >> > OW2 mailing lists service home page: http://www.ow2.org/wws >> > >> > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |