I am trying to call a web service using data from my instance as a
parameter. I have used the documentation at http://www.orbeon.com/ops/doc/processors-delegation#d51e411 as a reference. The documentation example includes the fragment (note the xsl:value-of...): <p:input name="call"> <delegation:execute service="stock-quote" operation="get-quote" xsl:version="2.0"> <m:GetQuote> <m:StockSymbol> <xsl:value-of select="/symbol"/> </m:StockSymbol> <m:LicenseKey>0</m:LicenseKey></m:GetQuote> </delegation:execute> </p:input> My delegation step is (note the xsl:value-of...): <p:processor name="oxf:delegation"> <p:input name="interface"> <config> <service id="simple-ws" type="webservice" style="document" endpoint="http://localhost:7001/msd_formsWeb/processes/simple_ws.jpd"> <operation name="clientRequestwithReturn" soap-action="http://www.openuri.org/clientRequestwithReturn"/> </service> </config> </p:input> <p:input name="call"> <delegation:execute service="simple-ws" operation="clientRequestwithReturn" xmlns:delegation="http://orbeon.org/oxf/xml/delegation"> <m:clientRequestwithReturn xmlns:m="http://www.openuri.org/"> <m:requestMessage> <xsl:value-of select="/model/user/name"/> </m:requestMessage> </m:clientRequestwithReturn> </delegation:execute> </p:input> <p:output name="data" id="simple-ws" /> </p:processor> The problem is that the <xsl:value-of select="/model/user/name"/> is not being transformed; it is passed straight through to the web service (only to be rejected because it is not plain text). I have managed to make the delegation work in a couple of ways: 1. hard code the value passed to the web service (not a real answer, but proves the web service is responding) 2. pre-formatting the entire <delegation:execute> ... </delegation:execute> in a separate oxf:xslt step and then referring to it with an href as follows: <p:input name="call" href="#web-service-call" /> Is it possible to use <xsl:value-of ... /> within a <p:processor name="oxf:delegation">? If so, what can I do do get my xsl evaluated? Thanks in anticipation, John -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Suggest you build your <p:input name="call"> in a separate oxf:xslt
processor. Steve -----Original Message----- From: John Unwin [mailto:[hidden email]] Sent: 27 April 2007 06:27 To: [hidden email] Subject: [ops-users] Calling web service - using xsl within a delegation processor I am trying to call a web service using data from my instance as a parameter. I have used the documentation at http://www.orbeon.com/ops/doc/processors-delegation#d51e411 as a reference. The documentation example includes the fragment (note the xsl:value-of...): <p:input name="call"> <delegation:execute service="stock-quote" operation="get-quote" xsl:version="2.0"> <m:GetQuote> <m:StockSymbol> <xsl:value-of select="/symbol"/> </m:StockSymbol> <m:LicenseKey>0</m:LicenseKey></m:GetQuote> </delegation:execute> </p:input> My delegation step is (note the xsl:value-of...): <p:processor name="oxf:delegation"> <p:input name="interface"> <config> <service id="simple-ws" type="webservice" style="document" endpoint="http://localhost:7001/msd_formsWeb/processes/simple_ws.jpd"> <operation name="clientRequestwithReturn" soap-action="http://www.openuri.org/clientRequestwithReturn"/> </service> </config> </p:input> <p:input name="call"> <delegation:execute service="simple-ws" operation="clientRequestwithReturn" xmlns:delegation="http://orbeon.org/oxf/xml/delegation"> <m:clientRequestwithReturn xmlns:m="http://www.openuri.org/"> <m:requestMessage> <xsl:value-of select="/model/user/name"/> </m:requestMessage> </m:clientRequestwithReturn> </delegation:execute> </p:input> <p:output name="data" id="simple-ws" /> </p:processor> The problem is that the <xsl:value-of select="/model/user/name"/> is not being transformed; it is passed straight through to the web service (only to be rejected because it is not plain text). I have managed to make the delegation work in a couple of ways: 1. hard code the value passed to the web service (not a real answer, but proves the web service is responding) 2. pre-formatting the entire <delegation:execute> ... </delegation:execute> in a separate oxf:xslt step and then referring to it with an href as follows: <p:input name="call" href="#web-service-call" /> Is it possible to use <xsl:value-of ... /> within a <p:processor name="oxf:delegation">? If so, what can I do do get my xsl evaluated? Thanks in anticipation, John -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by John Unwin
Hi John,
Like Steve said, you need to build the document you feed to the "call" input of the Delegation processor with XSLT for the <xsl:value-of> to work. This is a bug in the documentation :). I changed this <xsl:value-of> in the documentation with a static value. http://forge.objectweb.org/tracker/index.php?func=detail&aid=306971&group_id=168&atid=350207 Alex On 4/26/07, John Unwin <[hidden email]> wrote: > I am trying to call a web service using data from my instance as a > parameter. I have used the documentation at > http://www.orbeon.com/ops/doc/processors-delegation#d51e411 as a reference. > > The documentation example includes the fragment (note the xsl:value-of...): > > <p:input name="call"> > <delegation:execute service="stock-quote" operation="get-quote" > xsl:version="2.0"> > <m:GetQuote> > <m:StockSymbol> > <xsl:value-of select="/symbol"/> > </m:StockSymbol> > <m:LicenseKey>0</m:LicenseKey></m:GetQuote> > </delegation:execute> > </p:input> > > My delegation step is (note the xsl:value-of...): > > <p:processor name="oxf:delegation"> > <p:input name="interface"> > <config> > <service id="simple-ws" type="webservice" style="document" > > endpoint="http://localhost:7001/msd_formsWeb/processes/simple_ws.jpd"> > <operation name="clientRequestwithReturn" > > soap-action="http://www.openuri.org/clientRequestwithReturn"/> > </service> > </config> > </p:input> > <p:input name="call"> > <delegation:execute service="simple-ws" > operation="clientRequestwithReturn" > xmlns:delegation="http://orbeon.org/oxf/xml/delegation"> > <m:clientRequestwithReturn > xmlns:m="http://www.openuri.org/"> > <m:requestMessage> > <xsl:value-of select="/model/user/name"/> > </m:requestMessage> > </m:clientRequestwithReturn> > </delegation:execute> > </p:input> > <p:output name="data" id="simple-ws" /> > </p:processor> > > The problem is that the <xsl:value-of select="/model/user/name"/> is not > being transformed; it is passed straight through to the web service > (only to be rejected because it is not plain text). > > I have managed to make the delegation work in a couple of ways: > > 1. hard code the value passed to the web service (not a real answer, but > proves the web service is responding) > 2. pre-formatting the entire <delegation:execute> ... > </delegation:execute> in a separate oxf:xslt step and then referring to > it with an href as follows: > > <p:input name="call" href="#web-service-call" /> > > Is it possible to use <xsl:value-of ... /> within a <p:processor > name="oxf:delegation">? > > If so, what can I do do get my xsl evaluated? > > Thanks in anticipation, > John > > > > -- > 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 > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Thanks guys,
John -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |