Orbeon pipeline input/output handling

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Orbeon pipeline input/output handling

Lawson, Eric

Dear Orbeon Gurus,

 

I am working on trying to create a simple XForm that calls a document style web service and displays the result in an XForm. So far, I have been able to get it to call the web service, the form displays, but I get no results. I’m really unsure how to configure the inputs/outputs of the pipeline correctly. I based my call on the StockQuote example that comes with Orbeon (The web services example in the documentation doesn’t work).

 

My question is twofold:

1)     How does the output of a pipeline work? More accurately, where does the result XML that was placed in the output pipeline from the web services call go? Does it get placed in the model xml document? If so, how do I specify where the results of the pipeline go (element location, etc)?

2)     Is there additional documentation that explains I/O flow into and out of pipelines from the page flow controller?

 

 

Here are all the files in my example project. I have verified that the pipeline does successfully call the web service. However, I can’t seem to find out where the results went.

 

Page-flow.xml:

<config xmlns="http://www.orbeon.com/oxf/controller"

        xmlns:xu="http://www.xmldb.org/xupdate">

    <page path-info="/toolEvaluation" xforms="form.xml" model="model.xpl" view="view.xsl"/>

    <epilogue url="oxf:/config/epilogue.xpl"/>

</config>

 

Model.xpl:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"

    xmlns:f="http://orbeon.org/oxf/xml/formatting"

    xmlns:xhtml="http://www.w3.org/1999/xhtml"

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    xmlns:delegation="http://orbeon.org/oxf/xml/delegation"

    xmlns:oxf="http://www.orbeon.com/oxf/processors">

 

    <p:param type="input" name="instance"/>

    <p:param type="output" name="data"/>

 

    <p:processor name="oxf:xslt">

        <p:input name="data" href="#instance"/>

        <p:input name="config">

            <delegation:execute service="createToolEval" operation="createToolEval" xsl:version="2.0">

                <eval:createToolEval xmlns:eval="http://www.innodata-isogen.com/nightowl">

                        <eval:toolEvaluation instanceId="www.test.com/tooleval">

                                    <eval:property propertyId="name">Test</eval:property>

                                    <eval:property propertyId="OS">WinXP</eval:property>

                        </eval:toolEvaluation>

                </eval:createToolEval>

            </delegation:execute>

        </p:input>

        <p:output name="data" id="call"/>

    </p:processor>

 

    <p:processor name="oxf:delegation">

        <p:input name="interface">

            <config>

                <service id="createToolEval" type="webservice" style="document"

                    endpoint="http://localhost:8080/tooleval/ws/create">

                    <operation name="createToolEval"/>

                </service>

            </config>

        </p:input>

        <p:input name="call" href="#call"/>

        <p:output name="data" ref="data"/>

    </p:processor>

</p:config>

 

Form.xml:

<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">

    <xforms:instance>

        <instance>

            <webservice.result/>

        </instance>

    </xforms:instance>

</xforms:model>

 

View.xsl:

<xhtml:html xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

            xmlns:xforms="http://www.w3.org/2002/xforms"

            xmlns:f="http://orbeon.org/oxf/xml/formatting"

            xmlns:xhtml="http://www.w3.org/1999/xhtml"

            xmlns:eval="http://www.innodata-isogen.com/nightowl"

            xsl:version="2.0">

    <xhtml:head>

        <xhtml:title>Web Services caller</xhtml:title>

    </xhtml:head>

    <xhtml:body>

        <xforms:group>

            <xhtml:p>

                        Web service called

            </xhtml:p>

 

            <xforms:submit>

                        <xforms:label>Call web service again</xforms:label>

            </xforms:submit>

 

            <xhtml:p>Results: <xsl:value-of select =”//webservice.result”/></xhtml:p>

           

            <f:xml-source>

                        <xsl:copy-of select="//*"/>

            </f:xml-source>

       </xforms:group>

    </xhtml:body>

</xhtml:html>

 

Any help on this would be appreciated.

 

Thanks,

-------------------------------------
Eric E. Lawson
Sr. Software Engineer
Innodata Isogen
2200 N Lamar St. #230
Dallas, TX 75202
(214) 954-5109
 
[hidden email]
www.innodata-isogen.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
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon pipeline input/output handling

Erik Bruchez
Administrator
 > My question is twofold:
 >
 > 1) How does the output of a pipeline work? More accurately, where
 > does the result XML that was placed in the output pipeline from the
 > web services call go? Does it get placed in the model xml document?
 > If so, how do I specify where the results of the pipeline go
 > (element location, etc)?

In your particular example, the "data" output of the Delegation
processor is sent to the "data" output of the Model pipeline (with
<p:output name="data" ref="data"/>). This means that whoever reads
that pipeline's "data" output will read the result of your web
service. If you connect a page view after the page model, like you are
doing, the page view will be able to read the page model by accessing
its own "data" input.

 > 2) Is there additional documentation that explains I/O flow into and
 > out of pipelines from the page flow controller?

There is fairly extensive documentation here:

   http://www.orbeon.com/ops/doc/reference-page-flow#page-model-page-view

Please let us know if this is not enough (and what is missing in your
opinion).

 > Here are all the files in my example project. I have verified that
 > the pipeline does successfully call the web service. However, I
 > can't seem to find out where the results went.

Try putting a "debug" attribute on your model pipeline's "data" output:

   <p:param type="output" name="data" debug="model"/>

An check that at least the result is being passed to the view.

-Erik



--
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