RE: Orbeon pipeline input/output handling

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

RE: Orbeon pipeline input/output handling

Lawson, Eric
Erik,

Thanks for your reply. I looked through the documentation you pointed me
to, but so far, I still cannot access the results of my web service.

I have tried almost everything in the book to get the xupdate command to
copy the results from the pipeline action into the model of the next
form. I just don't know what else to try.


Page-flow.xml:
<config xmlns="http://www.orbeon.com/oxf/controller"
xmlns:xu="http://www.xmldb.org/xupdate">
        <page id="myapp_form1" path-info="/myApp/form1"
xforms="../MyApp/form1/form.xml" view="../MyApp/form1/view.xml">
                <action when="/instance/action = 'ws'"
action="../MyApp/form1/wscall.xpl">
                <result page="myapp_form2">
                        <xu:update
select="/instance/soapresults"><xu:copy-of
select="document('input:action')/*"/></xu:update>
                </result>
                </action>
        </page>
       
        <page id="myapp_form2" path-info="/myApp/form2"
xforms="../MyApp/form2/form.xml" view="../MyApp/form2/view.xml">
        </page>
       
        <epilogue url="oxf:/config/epilogue.xpl"/>
</config>


Pipeline document (wscall.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"
    xmlns:eval="http://www.innodata-isogen.com/nightowl">

    <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="getProperties"
operation="getProperties" xsl:version="2.0">
 
<eval:getProperties>http://www.innodata-isogen.com/ps/tools/evaluation#x
mlEditor</eval:getProperties>
            </delegation:execute>
        </p:input>
        <p:output name="data" id="call"/>
    </p:processor>

    <p:processor name="oxf:delegation">
        <p:input name="interface">
            <config>
                <service id="getProperties" type="webservice"
style="document"
 
endpoint="http://localhost:8080/tooleval/ws/proplist">
                    <operation name="getProperties"
soap-action="getProperties"/>
                </service>
            </config>
        </p:input>
        <p:input name="call" href="#call"/>
        <p:output name="data" ref="data"/>
    </p:processor>
</p:config>

Model for form2: (form.xml)
<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
    <xforms:instance>
        <instance>
            <soapresults/>
                </instance>
    </xforms:instance>
</xforms:model>



-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: Friday, January 13, 2006 10:44 AM
To: [hidden email]
Subject: Re: [ops-users] Orbeon pipeline input/output handling

 > 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
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon pipeline input/output handling

Alessandro  Vernet
Administrator
Hi Eric,

Just by reading your code, I don't see anything wrong. Did you make
sure that there is a /instance/soapresult in the default instance of
your second page? If there is no /instance/soapresult, then the
XUpdate <xu:update> statement would have no effect.

If that does not solve the problem, can you send us some code that we
can run locally to reproduce the issue?

Alex

On 1/23/06, Lawson, Eric <[hidden email]> wrote:

> Erik,
>
> Thanks for your reply. I looked through the documentation you pointed me
> to, but so far, I still cannot access the results of my web service.
>
> I have tried almost everything in the book to get the xupdate command to
> copy the results from the pipeline action into the model of the next
> form. I just don't know what else to try.
>
>
> Page-flow.xml:
> <config xmlns="http://www.orbeon.com/oxf/controller"
> xmlns:xu="http://www.xmldb.org/xupdate">
>         <page id="myapp_form1" path-info="/myApp/form1"
> xforms="../MyApp/form1/form.xml" view="../MyApp/form1/view.xml">
>                 <action when="/instance/action = 'ws'"
> action="../MyApp/form1/wscall.xpl">
>                 <result page="myapp_form2">
>                         <xu:update
> select="/instance/soapresults"><xu:copy-of
> select="document('input:action')/*"/></xu:update>
>                 </result>
>                 </action>
>         </page>
>
>         <page id="myapp_form2" path-info="/myApp/form2"
> xforms="../MyApp/form2/form.xml" view="../MyApp/form2/view.xml">
>         </page>
>
>         <epilogue url="oxf:/config/epilogue.xpl"/>
> </config>
>
>
> Pipeline document (wscall.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"
>     xmlns:eval="http://www.innodata-isogen.com/nightowl">
>
>     <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="getProperties"
> operation="getProperties" xsl:version="2.0">
>
> <eval:getProperties>http://www.innodata-isogen.com/ps/tools/evaluation#x
> mlEditor</eval:getProperties>
>             </delegation:execute>
>         </p:input>
>         <p:output name="data" id="call"/>
>     </p:processor>
>
>     <p:processor name="oxf:delegation">
>         <p:input name="interface">
>             <config>
>                 <service id="getProperties" type="webservice"
> style="document"
>
> endpoint="http://localhost:8080/tooleval/ws/proplist">
>                     <operation name="getProperties"
> soap-action="getProperties"/>
>                 </service>
>             </config>
>         </p:input>
>         <p:input name="call" href="#call"/>
>         <p:output name="data" ref="data"/>
>     </p:processor>
> </p:config>
>
> Model for form2: (form.xml)
> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
>     <xforms:instance>
>         <instance>
>             <soapresults/>
>                 </instance>
>     </xforms:instance>
> </xforms:model>
>
>
>
> -----Original Message-----
> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: Friday, January 13, 2006 10:44 AM
> To: [hidden email]
> Subject: Re: [ops-users] Orbeon pipeline input/output handling
>
>  > 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
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet