how to input parameter from xhtml to xpl in web-service[Urgentt]

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

how to input parameter from xhtml to xpl in web-service[Urgentt]

Suganda
hi all
i already capable to print the result of my web-service

however i still use static text in the input parameter of my service

can anyone explain how do i pass parameter from my xhtml to my xpl

below is the xhtml file

<?xml version="1.0" encoding="utf-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
      xmlns:xi="http://www.w3.org/2001/XInclude">

    <xhtml:head>
        <xhtml:title>XForms Web-Service-Ganda</xhtml:title>
        <xforms:model>
            <xforms:instance id="result-instance">
                <xi:include href="input:data"/>
            </xforms:instance>
            <xforms:instance id="start-instance">
                <start/>       
            </xforms:instance>
            <xforms:submission id="receive" action="/xforms-web-service-ganda/starts" ref="instance('start-instance')" method="post">
            </xforms:submission>
        </xforms:model>
    </xhtml:head>

    <xhtml:body>
         <xforms:group>
            <xhtml:p>
                <xforms:output ref="instance('result-instance')">
                    <xforms:label>The result is: </xforms:label>
                </xforms:output>
            </xhtml:p>
            <xhtml:p>
                <xforms:group>
                    <xforms:input ref="instance('start-instance')">
                        <xforms:label>Start : </xforms:label>
                    </xforms:input>
                    <xforms:trigger>
                        <xforms:label>Submit</xforms:label>
                    </xforms:trigger>
                    <xforms:send ev:event="DOMActivate" submission="receive"/>
                </xforms:group>
            </xhtml:p>
        </xforms:group>
        <xhtml:p style="margin-top: 3em">
            <xhtml:a href="/xforms-web-service-ganda/">Back</xhtml:a> to web-service-ganda
        </xhtml:p>
    </xhtml:body>

</html>


and this is the page flow

<config xmlns="http://www.orbeon.com/oxf/controller"
            xmlns:xu="http://www.xmldb.org/xupdate">
       
        <page path-info="/xforms-web-service-ganda/" view="enter-starts.xhtml">
        <action when="/form/action = 'submit'" action="enter-starts-action.xsl">
            <result when="/valid = 'true'" page="web-service-ganda"/>
        </action>
    </page>

    <page id="web-service-ganda" path-info="/xforms-web-service-ganda/starts" model="view-web-service.xpl" view="view.xhtml">
                <action when="true()" action="atom.xpl">
            <result when="/success = 'true'" page="finishing"/>
            <result when="/success = 'false'" page="errors"/>
        </action>
        </page>
       
        <page path-info="/xforms-web-service-ganda/get" model="get.xpl"/>

        <page id="finishing" path-info="/xforms-web-service-ganda/finish" model="get.xpl" view="finishing.xhtml">
        <action when="/anything-else = 'yes'">
            <result page="web-service-ganda"/>
        </action>
                <action when="/anything-else = 'no'">
            <result page="see-you-again"/>
        </action>
    </page>
       
        <page id="errors" path-info="/xforms-web-service-ganda/errors" view="errors.xhtml">
                 <action when="/action = 'ok'">
            <result page="web-service-ganda"/>
        </action>
    </page>

        <page id="see-you-again" path-info="/xforms-web-service-ganda/see-you-again" view="see-you-again-view.xml"/>

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

</config>



then this is the xpl that is used to call web service that i confuse how to pass parameter

<?xml version="1.0" encoding="utf-8"?>


<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:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:b4p="http://www.example.org/message"
          xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
          xmlns:xs="http://www.w3.org/2001/XMLSchema">
   
    <p:param name="instance" type="input"/>
    <p:param name="data" type="output"/>
    <p:param name="data2" type="output"/>

    <p:processor name="oxf:delegation">
        <p:input name="data" href="#instance"/>
        <p:input name="interface">
                <config>
                        <service id="single-branch" type="webservice" style="document" endpoint="http://localhost:8080/ode/processes/SimpleChoiceBranching/SimpleChoiceBranching/SimpleChoiceBranching/Client?wsdl">
                                <operation name="receive" nsuri="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching" soap-action="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching/ForClient/receive"/>
                        </service>
                </config>
        </p:input>
       
        <p:input name="call">
                <delegation:execute service="single-branch" operation="receive" xsl:version="2.0" xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
                        <b4p:start>Hello</b4p:start>
                </delegation:execute>
        </p:input>

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

    </p:processor>
       
     <p:processor name="oxf:exception-catcher">
        <p:input name="data" href="#receiveResponse"/>
        <p:output name="data" id="revoke-ws-output"/>
    </p:processor>
   
    <p:choose href="#revoke-ws-output">
       
        <p:when test="/exceptions">

           
            <p:processor name="oxf:pipeline">
                <p:input name="config" href="view-web-service.xpl"/>
                <p:input name="data" href="#revoke-ws-output"/>
                <p:input name="delegation" href="#receiveResponse"/>
                <p:input name="header">
                    http://localhost:8080/ode/processes/completeTask
                </p:input>
                <p:output name="data" id="revokedTask"/>
            </p:processor>
           
           
            <p:processor name="oxf:scope-generator">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data2"><receiveResponse>false</receiveResponse></p:input>
                <p:output name="data2" ref="data2" id="data4"/>
            </p:processor>

            <p:processor name="oxf:scope-serializer">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data" href="#data4"/>
            </p:processor>

            <p:processor name="oxf:identity">
                <p:input name="data"><success>false</success></p:input>
                <p:output name="data" ref="data"/> 
            </p:processor>

        </p:when>

        <p:otherwise>
           
           
            <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance"/>
                <p:input name="config">
                    <task xsl:version="2.0">
                        <receiveResponse>
                            <xsl:value-of select="/*:output/@start"/>
                        </receiveResponse>
                        <reloadTaskList/>
                    </task>
                </p:input>
                <p:output name="data" id="revokedTask"/>
            </p:processor>
           

            <p:processor name="oxf:scope-generator">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data2" href="#receiveResponse"/>
                <p:output name="data2" ref="data2" id="data3"/>
            </p:processor>
           
            <p:processor name="oxf:scope-serializer">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data" href="#data3"/>
            </p:processor>

            <p:processor name="oxf:identity">
                <p:input name="data"><success>true</success></p:input>
                <p:output name="data" ref="data"/> 
            </p:processor>

        </p:otherwise>

    </p:choose>
     
</p:config>

===========

see this line <b4p:start>Hello</b4p:start>?
Hello is static text,
i want to bring that input from my view.xhtml
but i dont have any idea about it
helppppp

thanks
ganda:)
Reply | Threaded
Open this post in threaded view
|

RE : how to input parameter from xhtml to xpl in web-service[Urgentt]

Leray Eric
Hi suganda,

The way you could go about this could be the following:

Use your main xpl instance (the one with all the input parameters) as an input to a xslt processor. This will allow for the creation of the dynamic request.

Here is an example
        <!-- Prepared the configuration of the web service and construct the object parameter -->
        <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance" />
                <p:input name="config">
                        <delegation:execute service="yourservice"
                                operation="anOperation" xsl:version="2.0">
                                <!-- Build of the object to pass to the web service -->
                                <param1><xsl:value-of select="/requestInfo/param1" /></param1>
                        </delegation:execute>
                </p:input>
                <p:output name="data" id="request" />
        </p:processor>

then you ca use the result of this processor to make the call

        <!-- Call to the web service with the predefined configuration -->
        <p:processor name="oxf:delegation">
                <p:input name="interface">
                        <config>
                                <service id=" yourservice" type="webservice"
                                        endpoint="http://localhost:8080/WebServices/services/yourservice">
                                        <operation name=" anOperation " nsuri="http://servicenamespace/" />
                                </service>
                        </config>
                </p:input>
                <p:input name="call" href="#request" />
                <p:output name="response_ws" id="service-response" />
        </p:processor>
 
I hope this will help

E.

-----Message d'origine-----
De : Suganda [mailto:[hidden email]]
Envoyé : jeudi, 20. septembre 2007 12:25
À : [hidden email]
Objet : [ops-users] how to input parameter from xhtml to xpl in web-service[Urgentt]


hi all
i already capable to print the result of my web-service

however i still use static text in the input parameter of my service

can anyone explain how do i pass parameter from my xhtml to my xpl

below is the xhtml file

<?xml version="1.0" encoding="utf-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
      xmlns:xi="http://www.w3.org/2001/XInclude">

    <xhtml:head>
        <xhtml:title>XForms Web-Service-Ganda</xhtml:title>
        <xforms:model>
            <xforms:instance id="result-instance">
                <xi:include href="input:data"/>
            </xforms:instance>
            <xforms:instance id="start-instance">
                <start/>
            </xforms:instance>
            <xforms:submission id="receive"
action="/xforms-web-service-ganda/starts" ref="instance('start-instance')"
method="post">
            </xforms:submission>
        </xforms:model>
    </xhtml:head>

    <xhtml:body>
         <xforms:group>
            <xhtml:p>
                <xforms:output ref="instance('result-instance')">
                    <xforms:label>The result is: </xforms:label>
                </xforms:output>
            </xhtml:p>
            <xhtml:p>
                <xforms:group>
                    <xforms:input ref="instance('start-instance')">
                        <xforms:label>Start : </xforms:label>
                    </xforms:input>
                    <xforms:trigger>
                        <xforms:label>Submit</xforms:label>
                    </xforms:trigger>
                    <xforms:send ev:event="DOMActivate"
submission="receive"/>
                </xforms:group>
            </xhtml:p>
        </xforms:group>
        <xhtml:p style="margin-top: 3em">
            <xhtml:a href="/xforms-web-service-ganda/">Back</xhtml:a> to
web-service-ganda
        </xhtml:p>
    </xhtml:body>

</html>


and this is the page flow

<config xmlns="http://www.orbeon.com/oxf/controller"
            xmlns:xu="http://www.xmldb.org/xupdate">
       
        <page path-info="/xforms-web-service-ganda/" view="enter-starts.xhtml">
        <action when="/form/action = 'submit'"
action="enter-starts-action.xsl">
            <result when="/valid = 'true'" page="web-service-ganda"/>
        </action>
    </page>

    <page id="web-service-ganda"
path-info="/xforms-web-service-ganda/starts" model="view-web-service.xpl"
view="view.xhtml">
                <action when="true()" action="atom.xpl">
            <result when="/success = 'true'" page="finishing"/>
            <result when="/success = 'false'" page="errors"/>
        </action>
        </page>
       
        <page path-info="/xforms-web-service-ganda/get" model="get.xpl"/>

        <page id="finishing" path-info="/xforms-web-service-ganda/finish"
model="get.xpl" view="finishing.xhtml">
        <action when="/anything-else = 'yes'">
            <result page="web-service-ganda"/>
        </action>
                <action when="/anything-else = 'no'">
            <result page="see-you-again"/>
        </action>
    </page>
       
        <page id="errors" path-info="/xforms-web-service-ganda/errors"
view="errors.xhtml">
                 <action when="/action = 'ok'">
            <result page="web-service-ganda"/>
        </action>
    </page>

        <page id="see-you-again"
path-info="/xforms-web-service-ganda/see-you-again"
view="see-you-again-view.xml"/>

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

</config>



then this is the xpl that is used to call web service that i confuse how to
pass parameter

<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2007 Orbeon, Inc.

    This program is free software; you can redistribute it and/or modify it
under the terms of the
    GNU Lesser General Public License as published by the Free Software
Foundation; either version
    2.1 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
    See the GNU Lesser General Public License for more details.

    The full text of the license is available at
http://www.gnu.org/copyleft/lesser.html
-->

<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:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:b4p="http://www.example.org/message"
          xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
          xmlns:xs="http://www.w3.org/2001/XMLSchema">
   
    <p:param name="instance" type="input"/>
    <p:param name="data" type="output"/>
    <p:param name="data2" type="output"/>

    <p:processor name="oxf:delegation">
        <p:input name="data" href="#instance"/>
        <p:input name="interface">
                <config>
                        <service id="single-branch" type="webservice" style="document"
endpoint="http://localhost:8080/ode/processes/SimpleChoiceBranching/SimpleChoiceBranching/SimpleChoiceBranching/Client?wsdl">
                                <operation name="receive"
nsuri="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching"
soap-action="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching/ForClient/receive"/>
                        </service>
                </config>
        </p:input>
       
        <p:input name="call">
                <delegation:execute service="single-branch" operation="receive"
xsl:version="2.0" xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
                        <b4p:start>Hello</b4p:start>
                </delegation:execute>
        </p:input>

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

    </p:processor>
       
     <p:processor name="oxf:exception-catcher">
        <p:input name="data" href="#receiveResponse"/>
        <p:output name="data" id="revoke-ws-output"/>
    </p:processor>
   
    <p:choose href="#revoke-ws-output">
       
        <p:when test="/exceptions">

            <!--delete this area also works properly-->
            <p:processor name="oxf:pipeline">
                <p:input name="config" href="view-web-service.xpl"/>
                <p:input name="data" href="#revoke-ws-output"/>
                <p:input name="delegation" href="#receiveResponse"/>
                <p:input name="header">
                    http://localhost:8080/ode/processes/completeTask
                </p:input>
                <p:output name="data" id="revokedTask"/>
            </p:processor>
            <!--end of comment-->
           
            <p:processor name="oxf:scope-generator">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data2"><receiveResponse>false</receiveResponse></p:input>
                <p:output name="data2" ref="data2" id="data4"/>
            </p:processor>

            <p:processor name="oxf:scope-serializer">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data" href="#data4"/>
            </p:processor>

            <p:processor name="oxf:identity">
                <p:input name="data"><success>false</success></p:input>
                <p:output name="data" ref="data"/>
            </p:processor>

        </p:when>

        <p:otherwise>
           
            <!-- delete this area also works properly-->
            <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance"/>
                <p:input name="config">
                    <task xsl:version="2.0">
                        <receiveResponse>
                            <xsl:value-of select="/*:output/@start"/>
                        </receiveResponse>
                        <reloadTaskList/>
                    </task>
                </p:input>
                <p:output name="data" id="revokedTask"/>
            </p:processor>
            <!--end of comment-->

            <p:processor name="oxf:scope-generator">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data2" href="#receiveResponse"/>
                <p:output name="data2" ref="data2" id="data3"/>
            </p:processor>
           
            <p:processor name="oxf:scope-serializer">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data" href="#data3"/>
            </p:processor>

            <p:processor name="oxf:identity">
                <p:input name="data"><success>true</success></p:input>
                <p:output name="data" ref="data"/>
            </p:processor>

        </p:otherwise>

    </p:choose>
     
</p:config>

===========

see this line <b4p:start>Hello</b4p:start>?
Hello is static text,
i want to bring that input from my view.xhtml
but i dont have any idea about it
helppppp

thanks
ganda:)

--
View this message in context: http://www.nabble.com/how-to-input-parameter-from-xhtml-to-xpl-in-web-service-Urgentt--tf4486685.html#a12794532
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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: RE : how to input parameter from xhtml to xpl in web-service[Urgentt]

Suganda
Hi Eric
thanks for fast response

ok i understand your reply

but i still confuse about this line


                                <param1><xsl:value-of select="/requestInfo/param1" /></param1> 

what is the requestInfo example that you mean ?
can you elaborate mode detail about this line ? perhaps some simple example
is the requestInfo related to the view.xhtml ?

thanks in advance
ganda:)

Leray Eric wrote
Hi suganda,

The way you could go about this could be the following:

Use your main xpl instance (the one with all the input parameters) as an input to a xslt processor. This will allow for the creation of the dynamic request.

Here is an example
       
        <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance" />
                <p:input name="config">
                        <delegation:execute service="yourservice"
                                operation="anOperation" xsl:version="2.0">
                               
                                <param1><xsl:value-of select="/requestInfo/param1" /></param1>
                        </delegation:execute>
                </p:input>
                <p:output name="data" id="request" />
        </p:processor>

then you ca use the result of this processor to make the call

       
        <p:processor name="oxf:delegation">
                <p:input name="interface">
                        <config>
                                <service id=" yourservice" type="webservice"
                                        endpoint="http://localhost:8080/WebServices/services/yourservice">
                                        <operation name=" anOperation " nsuri="http://servicenamespace/" />
                                </service>                               
                        </config>
                </p:input>
                <p:input name="call" href="#request" />
                <p:output name="response_ws" id="service-response" />
        </p:processor>
 
I hope this will help

E.

-----Message d'origine-----
De : Suganda [mailto:suganda.ekaputra@gmail.com]
Envoyé : jeudi, 20. septembre 2007 12:25
À : ops-users@objectweb.org
Objet : [ops-users] how to input parameter from xhtml to xpl in web-service[Urgentt]


hi all
i already capable to print the result of my web-service

however i still use static text in the input parameter of my service

can anyone explain how do i pass parameter from my xhtml to my xpl

below is the xhtml file

<?xml version="1.0" encoding="utf-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
      xmlns:xi="http://www.w3.org/2001/XInclude">

    <xhtml:head>
        <xhtml:title>XForms Web-Service-Ganda</xhtml:title>
        <xforms:model>
            <xforms:instance id="result-instance">
                <xi:include href="input:data"/>
            </xforms:instance>
            <xforms:instance id="start-instance">
                <start/>       
            </xforms:instance>
            <xforms:submission id="receive"
action="/xforms-web-service-ganda/starts" ref="instance('start-instance')"
method="post">
            </xforms:submission>
        </xforms:model>
    </xhtml:head>

    <xhtml:body>
         <xforms:group>
            <xhtml:p>
                <xforms:output ref="instance('result-instance')">
                    <xforms:label>The result is: </xforms:label>
                </xforms:output>
            </xhtml:p>
            <xhtml:p>
                <xforms:group>
                    <xforms:input ref="instance('start-instance')">
                        <xforms:label>Start : </xforms:label>
                    </xforms:input>
                    <xforms:trigger>
                        <xforms:label>Submit</xforms:label>
                    </xforms:trigger>
                    <xforms:send ev:event="DOMActivate"
submission="receive"/>
                </xforms:group>
            </xhtml:p>
        </xforms:group>
        <xhtml:p style="margin-top: 3em">
            <xhtml:a href="/xforms-web-service-ganda/">Back</xhtml:a> to
web-service-ganda
        </xhtml:p>
    </xhtml:body>

</html>


and this is the page flow

<config xmlns="http://www.orbeon.com/oxf/controller"
            xmlns:xu="http://www.xmldb.org/xupdate">
       
        <page path-info="/xforms-web-service-ganda/" view="enter-starts.xhtml">
        <action when="/form/action = 'submit'"
action="enter-starts-action.xsl">
            <result when="/valid = 'true'" page="web-service-ganda"/>
        </action>
    </page>

    <page id="web-service-ganda"
path-info="/xforms-web-service-ganda/starts" model="view-web-service.xpl"
view="view.xhtml">
                <action when="true()" action="atom.xpl">
            <result when="/success = 'true'" page="finishing"/>
            <result when="/success = 'false'" page="errors"/>
        </action>
        </page>
       
        <page path-info="/xforms-web-service-ganda/get" model="get.xpl"/>

        <page id="finishing" path-info="/xforms-web-service-ganda/finish"
model="get.xpl" view="finishing.xhtml">
        <action when="/anything-else = 'yes'">
            <result page="web-service-ganda"/>
        </action>
                <action when="/anything-else = 'no'">
            <result page="see-you-again"/>
        </action>
    </page>
       
        <page id="errors" path-info="/xforms-web-service-ganda/errors"
view="errors.xhtml">
                 <action when="/action = 'ok'">
            <result page="web-service-ganda"/>
        </action>
    </page>

        <page id="see-you-again"
path-info="/xforms-web-service-ganda/see-you-again"
view="see-you-again-view.xml"/>

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

</config>



then this is the xpl that is used to call web service that i confuse how to
pass parameter

<?xml version="1.0" encoding="utf-8"?>


<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:oxf="http://www.orbeon.com/oxf/processors"
          xmlns:b4p="http://www.example.org/message"
          xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
          xmlns:xs="http://www.w3.org/2001/XMLSchema">
   
    <p:param name="instance" type="input"/>
    <p:param name="data" type="output"/>
    <p:param name="data2" type="output"/>

    <p:processor name="oxf:delegation">
        <p:input name="data" href="#instance"/>
        <p:input name="interface">
                <config>
                        <service id="single-branch" type="webservice" style="document"
endpoint="http://localhost:8080/ode/processes/SimpleChoiceBranching/SimpleChoiceBranching/SimpleChoiceBranching/Client?wsdl">
                                <operation name="receive"
nsuri="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching"
soap-action="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching/ForClient/receive"/>
                        </service>
                </config>
        </p:input>
       
        <p:input name="call">
                <delegation:execute service="single-branch" operation="receive"
xsl:version="2.0" xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
                        <b4p:start>Hello</b4p:start>
                </delegation:execute>
        </p:input>

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

    </p:processor>
       
     <p:processor name="oxf:exception-catcher">
        <p:input name="data" href="#receiveResponse"/>
        <p:output name="data" id="revoke-ws-output"/>
    </p:processor>
   
    <p:choose href="#revoke-ws-output">
       
        <p:when test="/exceptions">

           
            <p:processor name="oxf:pipeline">
                <p:input name="config" href="view-web-service.xpl"/>
                <p:input name="data" href="#revoke-ws-output"/>
                <p:input name="delegation" href="#receiveResponse"/>
                <p:input name="header">
                    http://localhost:8080/ode/processes/completeTask
                </p:input>
                <p:output name="data" id="revokedTask"/>
            </p:processor>
           
           
            <p:processor name="oxf:scope-generator">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data2"><receiveResponse>false</receiveResponse></p:input>
                <p:output name="data2" ref="data2" id="data4"/>
            </p:processor>

            <p:processor name="oxf:scope-serializer">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data" href="#data4"/>
            </p:processor>

            <p:processor name="oxf:identity">
                <p:input name="data"><success>false</success></p:input>
                <p:output name="data" ref="data"/> 
            </p:processor>

        </p:when>

        <p:otherwise>
           
           
            <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance"/>
                <p:input name="config">
                    <task xsl:version="2.0">
                        <receiveResponse>
                            <xsl:value-of select="/*:output/@start"/>
                        </receiveResponse>
                        <reloadTaskList/>
                    </task>
                </p:input>
                <p:output name="data" id="revokedTask"/>
            </p:processor>
           

            <p:processor name="oxf:scope-generator">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data2" href="#receiveResponse"/>
                <p:output name="data2" ref="data2" id="data3"/>
            </p:processor>
           
            <p:processor name="oxf:scope-serializer">
                <p:input name="config">
                    <config>
                        <key>webservice2</key>
                        <scope>session</scope>
                        <session-scope>application</session-scope>
                    </config>
                </p:input>
                <p:input name="data" href="#data3"/>
            </p:processor>

            <p:processor name="oxf:identity">
                <p:input name="data"><success>true</success></p:input>
                <p:output name="data" ref="data"/> 
            </p:processor>

        </p:otherwise>

    </p:choose>
     
</p:config>

===========

see this line <b4p:start>Hello</b4p:start>?
Hello is static text,
i want to bring that input from my view.xhtml
but i dont have any idea about it
helppppp

thanks
ganda:)

--
View this message in context: http://www.nabble.com/how-to-input-parameter-from-xhtml-to-xpl-in-web-service-Urgentt--tf4486685.html#a12794532
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.





--
You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE : how to input parameter from xhtml to xpl in web-service[Urgentt]

xzdead

Hi

I am following this post trying to call a local webservice passing a
parameter from xhtml to xpl but
can't make it work.

here is my pageflow:
<config xmlns="http://www.orbeon.com/oxf/controller">

    <page path-info="/webservice_simple/" view="view.xhtml"/>
        <page path-info="/webservice_simple/post" view="webservice.xpl"/>

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

</config>


xhtml file:
<?xml version="1.0" encoding="utf-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:p="http://www.orbeon.com/oxf/pipeline">

    <xhtml:head>
        <xhtml:title>XForms Web-Service</xhtml:title>
        <xforms:model>
                               
                <xforms:instance id="obj-instance">
                        <obj xmlns="">
                                <idobject></idobject>
                        </obj>
                </xforms:instance>

                <xforms:instance id="response-instance">
                        <response xmlns="">
                                <xmlcontents/>
                        </response>
                </xforms:instance>
                 
                <!-- Submit to webservice.xpl-->
                <xforms:submission id="wslocalcap" ref="instance('obj-instance')"    
action="/webservice_simple/post" method="post" replace="instance"
instance="response-instance"/>
               
        </xforms:model>
    </xhtml:head>

    <xhtml:body>
         
     <xforms:input id="txt_idobject"
ref="instance('obj-instance')/idobject">
                        <xforms:label>Id Asset:</xforms:label>
                        <xforms:send submission="wslocalcap" ev:event="xforms-value-changed"/>
        </xforms:input>
     
                 
        <br/><br/>
                 
        <xforms:output ref="instance('response-instance')">
         <xforms:label class="bold">Respuesta:</xforms:label>
     </xforms:output>
       
       
        <widget:xforms-instance-inspector
xmlns:widget="http://orbeon.org/oxf/xml/widget"/>
       
    </xhtml:body>

</html>

and XPL:
<?xml version="1.0" encoding="utf-8"?>
<p:config xmlns:oxf="http://www.orbeon.com/oxf/processors"
   xmlns:p="http://www.orbeon.com/oxf/pipeline"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

          <!-- Pipeline inputs and outputs -->
                <p:param type="input" name="idobject"/>
          <p:param type="output" name="data"/>
                 
                <!-- Prepared the configuration of the web service and construct the
object parameter -->
                <p:processor name="oxf:xslt">
                        <p:input name="data" href="#idobject" />
                                <p:input name="config">
                                        <delegation:execute service="localcaptureservice"
                                        operation="lc_xml_generate11" xsl:version="2.0">
                                                <!-- Build of the object to pass to the web service -->
                                                <param1><xsl:value-of select="/idobject" /></param1>
                                        </delegation:execute>
                                 </p:input>
                        <p:output name="data" id="request"/>
                </p:processor>
                 
                 
                <!-- Call to the web service with the predefined configuration -->
                <p:processor name="oxf:delegation">
                        <p:input name="interface">
                                <config>
                                        <service id="localcaptureservice" type="webservice"
                               
endpoint="http://localhost:3333/localcaptureservice/localcaptureservice.asmx">
                                                <operation name="lc_xml_generate11"
nsuri="http://www.tedial.com/localcaptureservice"/>
                                        </service>
                                </config>
                        </p:input>
                        <p:input name="call" href="#request"/>
                        <p:output name="response_ws" id="service-response"/>
                </p:processor>
</p:config>

I'm using TCPMon to check the call, but it doesn't make it.

Can anyone help please?


Thanks







Suganda wrote:

>
> Hi Eric
> thanks for fast response
>
> ok i understand your reply
>
> but i still confuse about this line
>
> <!-- Build of the object to pass to the web service -->
>                                 <param1><xsl:value-of
> select="/requestInfo/param1" /></param1>
>
> what is the requestInfo example that you mean ?
> can you elaborate mode detail about this line ? perhaps some simple
> example
> is the requestInfo related to the view.xhtml ?
>
> thanks in advance
> ganda:)
>
>
> Leray Eric wrote:
>>
>> Hi suganda,
>>
>> The way you could go about this could be the following:
>>
>> Use your main xpl instance (the one with all the input parameters) as an
>> input to a xslt processor. This will allow for the creation of the
>> dynamic request.
>>
>> Here is an example
>> <!-- Prepared the configuration of the web service and construct the
>> object parameter -->
>> <p:processor name="oxf:xslt">
>> <p:input name="data" href="#instance" />
>> <p:input name="config">
>> <delegation:execute service="yourservice"
>> operation="anOperation" xsl:version="2.0">
>> <!-- Build of the object to pass to the web service -->
>> <param1><xsl:value-of select="/requestInfo/param1" /></param1>
>> </delegation:execute>
>> </p:input>
>> <p:output name="data" id="request" />
>> </p:processor>
>>
>> then you ca use the result of this processor to make the call
>>
>> <!-- Call to the web service with the predefined configuration -->
>> <p:processor name="oxf:delegation">
>> <p:input name="interface">
>> <config>
>> <service id=" yourservice" type="webservice"
>> endpoint="http://localhost:8080/WebServices/services/yourservice">
>> <operation name=" anOperation "
>> nsuri="http://servicenamespace/" />
>> </service>
>> </config>
>> </p:input>
>> <p:input name="call" href="#request" />
>> <p:output name="response_ws" id="service-response" />
>> </p:processor>
>>  
>> I hope this will help
>>
>> E.
>>
>> -----Message d'origine-----
>> De : Suganda [mailto:[hidden email]]
>> Envoyé : jeudi, 20. septembre 2007 12:25
>> À : [hidden email]
>> Objet : [ops-users] how to input parameter from xhtml to xpl in
>> web-service[Urgentt]
>>
>>
>> hi all
>> i already capable to print the result of my web-service
>>
>> however i still use static text in the input parameter of my service
>>
>> can anyone explain how do i pass parameter from my xhtml to my xpl
>>
>> below is the xhtml file
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>>       xmlns:xhtml="http://www.w3.org/1999/xhtml"
>>       xmlns:xforms="http://www.w3.org/2002/xforms"
>>       xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>       xmlns:ev="http://www.w3.org/2001/xml-events"
>>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>       xmlns:xi="http://www.w3.org/2001/XInclude">
>>
>>     <xhtml:head>
>>         <xhtml:title>XForms Web-Service-Ganda</xhtml:title>
>> <xforms:model>
>>             <xforms:instance id="result-instance">
>> <xi:include href="input:data"/>
>>    </xforms:instance>
>>    <xforms:instance id="start-instance">
>> <start/>
>>    </xforms:instance>
>>    <xforms:submission id="receive"
>> action="/xforms-web-service-ganda/starts"
>> ref="instance('start-instance')"
>> method="post">
>>    </xforms:submission>
>>         </xforms:model>
>>     </xhtml:head>
>>
>>     <xhtml:body>
>> <xforms:group>
>>             <xhtml:p>
>>                 <xforms:output ref="instance('result-instance')">
>>                     <xforms:label>The result is: </xforms:label>
>>                 </xforms:output>
>>             </xhtml:p>
>>             <xhtml:p>
>>                 <xforms:group>
>>                     <xforms:input ref="instance('start-instance')">
>>                         <xforms:label>Start : </xforms:label>
>>                     </xforms:input>
>>                     <xforms:trigger>
>>                         <xforms:label>Submit</xforms:label>
>>                     </xforms:trigger>
>>                     <xforms:send ev:event="DOMActivate"
>> submission="receive"/>
>>                 </xforms:group>
>>             </xhtml:p>
>>         </xforms:group>
>> <xhtml:p style="margin-top: 3em">
>>             <xhtml:a href="/xforms-web-service-ganda/">Back</xhtml:a> to
>> web-service-ganda
>>         </xhtml:p>
>>     </xhtml:body>
>>
>> </html>
>>
>>
>> and this is the page flow
>>
>> <config xmlns="http://www.orbeon.com/oxf/controller"
>>    xmlns:xu="http://www.xmldb.org/xupdate">
>>
>> <page path-info="/xforms-web-service-ganda/" view="enter-starts.xhtml">
>>         <action when="/form/action = 'submit'"
>> action="enter-starts-action.xsl">
>>             <result when="/valid = 'true'" page="web-service-ganda"/>
>>         </action>
>>     </page>
>>
>>     <page id="web-service-ganda"
>> path-info="/xforms-web-service-ganda/starts" model="view-web-service.xpl"
>> view="view.xhtml">
>> <action when="true()" action="atom.xpl">
>>             <result when="/success = 'true'" page="finishing"/>
>>             <result when="/success = 'false'" page="errors"/>
>>         </action>
>> </page>
>>
>> <page path-info="/xforms-web-service-ganda/get" model="get.xpl"/>
>>
>> <page id="finishing" path-info="/xforms-web-service-ganda/finish"
>> model="get.xpl" view="finishing.xhtml">
>>         <action when="/anything-else = 'yes'">
>>             <result page="web-service-ganda"/>
>>         </action>
>> <action when="/anything-else = 'no'">
>>             <result page="see-you-again"/>
>>         </action>
>>     </page>
>>
>> <page id="errors" path-info="/xforms-web-service-ganda/errors"
>> view="errors.xhtml">
>> <action when="/action = 'ok'">
>>             <result page="web-service-ganda"/>
>>         </action>
>>     </page>
>>
>> <page id="see-you-again"
>> path-info="/xforms-web-service-ganda/see-you-again"
>> view="see-you-again-view.xml"/>
>>
>>     <epilogue url="oxf:/config/epilogue.xpl"/>
>>
>> </config>
>>
>>
>>
>> then this is the xpl that is used to call web service that i confuse how
>> to
>> pass parameter
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <!--
>>     Copyright (C) 2007 Orbeon, Inc.
>>
>>     This program is free software; you can redistribute it and/or modify
>> it
>> under the terms of the
>>     GNU Lesser General Public License as published by the Free Software
>> Foundation; either version
>>     2.1 of the License, or (at your option) any later version.
>>
>>     This program is distributed in the hope that it will be useful, but
>> WITHOUT ANY WARRANTY;
>>     without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
>> PARTICULAR PURPOSE.
>>     See the GNU Lesser General Public License for more details.
>>
>>     The full text of the license is available at
>> http://www.gnu.org/copyleft/lesser.html
>> -->
>>
>> <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:oxf="http://www.orbeon.com/oxf/processors"
>>  xmlns:b4p="http://www.example.org/message"
>>  xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
>>  xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>    
>>     <p:param name="instance" type="input"/>
>>     <p:param name="data" type="output"/>
>>     <p:param name="data2" type="output"/>
>>
>>     <p:processor name="oxf:delegation">
>> <p:input name="data" href="#instance"/>
>> <p:input name="interface">
>> <config>
>> <service id="single-branch" type="webservice" style="document"
>> endpoint="http://localhost:8080/ode/processes/SimpleChoiceBranching/SimpleChoiceBranching/SimpleChoiceBranching/Client?wsdl">
>> <operation name="receive"
>> nsuri="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching"
>> soap-action="http://example.com/SimpleChoiceBranching/SimpleChoiceBranching/ForClient/receive"/>
>> </service>
>> </config>
>> </p:input>
>>
>> <p:input name="call">
>> <delegation:execute service="single-branch" operation="receive"
>> xsl:version="2.0"
>> xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
>> <b4p:start>Hello</b4p:start>
>> </delegation:execute>
>> </p:input>
>>
>> <p:output name="data" id="receiveResponse"/>
>>
>>     </p:processor>
>>
>>      <p:processor name="oxf:exception-catcher">
>>         <p:input name="data" href="#receiveResponse"/>
>>         <p:output name="data" id="revoke-ws-output"/>
>>     </p:processor>
>>    
>>     <p:choose href="#revoke-ws-output">
>>        
>> <p:when test="/exceptions">
>>
>>             <!--delete this area also works properly-->
>>    <p:processor name="oxf:pipeline">
>>                 <p:input name="config" href="view-web-service.xpl"/>
>>                 <p:input name="data" href="#revoke-ws-output"/>
>>                 <p:input name="delegation" href="#receiveResponse"/>
>>                 <p:input name="header">
>>                     http://localhost:8080/ode/processes/completeTask
>>                 </p:input>
>> <p:output name="data" id="revokedTask"/>
>>             </p:processor>
>>    <!--end of comment-->
>>    
>>    <p:processor name="oxf:scope-generator">
>> <p:input name="config">
>>    <config>
>> <key>webservice2</key>
>> <scope>session</scope>
>> <session-scope>application</session-scope>
>>    </config>
>> </p:input>
>> <p:input
>> name="data2"><receiveResponse>false</receiveResponse></p:input>
>> <p:output name="data2" ref="data2" id="data4"/>
>>    </p:processor>
>>
>>    <p:processor name="oxf:scope-serializer">
>> <p:input name="config">
>>    <config>
>> <key>webservice2</key>
>> <scope>session</scope>
>> <session-scope>application</session-scope>
>>    </config>
>> </p:input>
>> <p:input name="data" href="#data4"/>
>>    </p:processor>
>>
>>    <p:processor name="oxf:identity">
>> <p:input name="data"><success>false</success></p:input>
>> <p:output name="data" ref="data"/>
>>    </p:processor>
>>
>>         </p:when>
>>
>>         <p:otherwise>
>>    
>>    <!-- delete this area also works properly-->
>>             <p:processor name="oxf:xslt">
>>                 <p:input name="data" href="#instance"/>
>>                 <p:input name="config">
>>                     <task xsl:version="2.0">
>>                         <receiveResponse>
>>                             <xsl:value-of select="/*:output/@start"/>
>>                         </receiveResponse>
>>                         <reloadTaskList/>
>>                     </task>
>>                 </p:input>
>>                 <p:output name="data" id="revokedTask"/>
>>             </p:processor>
>>    <!--end of comment-->
>>
>>    <p:processor name="oxf:scope-generator">
>> <p:input name="config">
>>    <config>
>> <key>webservice2</key>
>> <scope>session</scope>
>> <session-scope>application</session-scope>
>>    </config>
>> </p:input>
>> <p:input name="data2" href="#receiveResponse"/>
>> <p:output name="data2" ref="data2" id="data3"/>
>>    </p:processor>
>>    
>>    <p:processor name="oxf:scope-serializer">
>> <p:input name="config">
>>    <config>
>> <key>webservice2</key>
>> <scope>session</scope>
>> <session-scope>application</session-scope>
>>    </config>
>> </p:input>
>> <p:input name="data" href="#data3"/>
>>    </p:processor>
>>
>>    <p:processor name="oxf:identity">
>> <p:input name="data"><success>true</success></p:input>
>> <p:output name="data" ref="data"/>
>>    </p:processor>
>>
>> </p:otherwise>
>>
>>     </p:choose>
>>      
>> </p:config>
>>
>> ===========
>>
>> see this line <b4p:start>Hello</b4p:start>?
>> Hello is static text,
>> i want to bring that input from my view.xhtml
>> but i dont have any idea about it
>> helppppp
>>
>> thanks
>> ganda:)
>>
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-input-parameter-from-xhtml-to-xpl-in-web-service-Urgentt--tf4486685.html#a12794532
>> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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
>>
>>
>
>

-----
http://www.victorgil.es http://www.victorgil.es 
--
View this message in context: http://www.nabble.com/how-to-input-parameter-from-xhtml-to-xpl-in-web-service-Urgentt--tp12794532p16833349.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: RE : how to input parameter from xhtml to xpl in web-service[Urgentt]

Hank Ratzesberger
In reply to this post by Suganda

I think you want your webservice to have model="webservice.xpl" and
not a view (which the page-flow would expect to produce xhtml).

As for placing an <xforms:send> element as a child of an <xforms:input>,
I don't know if that will work.

Maybe try a test case, with values you expect to work in the instance  
you
will submit, and an <xforms:trigger> so you have button to click to
have control over when this will happen.

HTH,
Hank



On Apr 23, 2008, at 1:20 AM, xzdead wrote:

>
> Hi
>
> I am following this post trying to call a local webservice passing a
> parameter from xhtml to xpl but
> can't make it work.
>
> here is my pageflow:
> <config xmlns="http://www.orbeon.com/oxf/controller">
>
>     <page path-info="/webservice_simple/" view="view.xhtml"/>
> <page path-info="/webservice_simple/post" view="webservice.xpl"/>
>
>     <epilogue url="oxf:/config/epilogue.xpl"/>
>
> </config>
>
>
> xhtml file:
> <?xml version="1.0" encoding="utf-8"?>
>
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:xhtml="http://www.w3.org/1999/xhtml"
>       xmlns:xforms="http://www.w3.org/2002/xforms"
>       xmlns:xs="http://www.w3.org/2001/XMLSchema"
>       xmlns:ev="http://www.w3.org/2001/xml-events"
>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>       xmlns:xi="http://www.w3.org/2001/XInclude"
>       xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
>       xmlns:p="http://www.orbeon.com/oxf/pipeline">
>
>     <xhtml:head>
>         <xhtml:title>XForms Web-Service</xhtml:title>
>         <xforms:model>
>
> <xforms:instance id="obj-instance">
> <obj xmlns="">
> <idobject></idobject>
> </obj>
> </xforms:instance>
>
> <xforms:instance id="response-instance">
> <response xmlns="">
> <xmlcontents/>
> </response>
> </xforms:instance>
>
> <!-- Submit to webservice.xpl-->
> <xforms:submission id="wslocalcap" ref="instance('obj-instance')"
> action="/webservice_simple/post" method="post" replace="instance"
> instance="response-instance"/>
>
>         </xforms:model>
>     </xhtml:head>
>
>     <xhtml:body>
>
>      <xforms:input id="txt_idobject"
> ref="instance('obj-instance')/idobject">
> <xforms:label>Id Asset:</xforms:label>
> <xforms:send submission="wslocalcap" ev:event="xforms-value-
> changed"/>
> </xforms:input>
>
>
> <br/><br/>
>
> <xforms:output ref="instance('response-instance')">
>          <xforms:label class="bold">Respuesta:</xforms:label>
>      </xforms:output>
>
>        
> <widget:xforms-instance-inspector
> xmlns:widget="http://orbeon.org/oxf/xml/widget"/>
>
>     </xhtml:body>
>
> </html>
>
> and XPL:
> <?xml version="1.0" encoding="utf-8"?>
> <p:config xmlns:oxf="http://www.orbeon.com/oxf/processors"
>    xmlns:p="http://www.orbeon.com/oxf/pipeline"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>  <!-- Pipeline inputs and outputs -->
> <p:param type="input" name="idobject"/>
>  <p:param type="output" name="data"/>
>
> <!-- Prepared the configuration of the web service and construct the
> object parameter -->
> <p:processor name="oxf:xslt">
> <p:input name="data" href="#idobject" />
> <p:input name="config">
> <delegation:execute service="localcaptureservice"
> operation="lc_xml_generate11" xsl:version="2.0">
> <!-- Build of the object to pass to the web service -->
> <param1><xsl:value-of select="/idobject" /></param1>
> </delegation:execute>
> </p:input>
> <p:output name="data" id="request"/>
> </p:processor>
>
>
> <!-- Call to the web service with the predefined configuration -->
> <p:processor name="oxf:delegation">
> <p:input name="interface">
> <config>
> <service id="localcaptureservice" type="webservice"
>
> endpoint="http://localhost:3333/localcaptureservice/ 
> localcaptureservice.asmx">
> <operation name="lc_xml_generate11"
> nsuri="http://www.tedial.com/localcaptureservice"/>
> </service>
> </config>
> </p:input>
> <p:input name="call" href="#request"/>
> <p:output name="response_ws" id="service-response"/>
> </p:processor>
> </p:config>
>
> I'm using TCPMon to check the call, but it doesn't make it.
>
> Can anyone help please?
>
>
> Thanks
>
>
>
>
>
>
>
> Suganda wrote:
>>
>> Hi Eric
>> thanks for fast response
>>
>> ok i understand your reply
>>
>> but i still confuse about this line
>>
>> <!-- Build of the object to pass to the web service -->
>>                                 <param1><xsl:value-of
>> select="/requestInfo/param1" /></param1>
>>
>> what is the requestInfo example that you mean ?
>> can you elaborate mode detail about this line ? perhaps some simple
>> example
>> is the requestInfo related to the view.xhtml ?
>>
>> thanks in advance
>> ganda:)
>>
>>
>> Leray Eric wrote:
>>>
>>> Hi suganda,
>>>
>>> The way you could go about this could be the following:
>>>
>>> Use your main xpl instance (the one with all the input  
>>> parameters) as an
>>> input to a xslt processor. This will allow for the creation of the
>>> dynamic request.
>>>
>>> Here is an example
>>> <!-- Prepared the configuration of the web service and construct  
>>> the
>>> object parameter -->
>>> <p:processor name="oxf:xslt">
>>> <p:input name="data" href="#instance" />
>>> <p:input name="config">
>>> <delegation:execute service="yourservice"
>>> operation="anOperation" xsl:version="2.0">
>>> <!-- Build of the object to pass to the web service -->
>>> <param1><xsl:value-of select="/requestInfo/param1" /></param1>
>>> </delegation:execute>
>>> </p:input>
>>> <p:output name="data" id="request" />
>>> </p:processor>
>>>
>>> then you ca use the result of this processor to make the call
>>>
>>> <!-- Call to the web service with the predefined configuration -->
>>> <p:processor name="oxf:delegation">
>>> <p:input name="interface">
>>> <config>
>>> <service id=" yourservice" type="webservice"
>>> endpoint="http://localhost:8080/WebServices/services/ 
>>> yourservice">
>>> <operation name=" anOperation "
>>> nsuri="http://servicenamespace/" />
>>> </service>
>>> </config>
>>> </p:input>
>>> <p:input name="call" href="#request" />
>>> <p:output name="response_ws" id="service-response" />
>>> </p:processor>
>>>
>>> I hope this will help
>>>
>>> E.
>>>
>>> -----Message d'origine-----
>>> De : Suganda [mailto:[hidden email]]
>>> Envoyé : jeudi, 20. septembre 2007 12:25
>>> À : [hidden email]
>>> Objet : [ops-users] how to input parameter from xhtml to xpl in
>>> web-service[Urgentt]
>>>
>>>
>>> hi all
>>> i already capable to print the result of my web-service
>>>
>>> however i still use static text in the input parameter of my service
>>>
>>> can anyone explain how do i pass parameter from my xhtml to my xpl
>>>
>>> below is the xhtml file
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>>
>>> <html xmlns="http://www.w3.org/1999/xhtml"
>>>       xmlns:xhtml="http://www.w3.org/1999/xhtml"
>>>       xmlns:xforms="http://www.w3.org/2002/xforms"
>>>       xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>       xmlns:ev="http://www.w3.org/2001/xml-events"
>>>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>>>       xmlns:xi="http://www.w3.org/2001/XInclude">
>>>
>>>     <xhtml:head>
>>>         <xhtml:title>XForms Web-Service-Ganda</xhtml:title>
>>> <xforms:model>
>>>             <xforms:instance id="result-instance">
>>> <xi:include href="input:data"/>
>>>    </xforms:instance>
>>>    <xforms:instance id="start-instance">
>>> <start/>
>>>    </xforms:instance>
>>>    <xforms:submission id="receive"
>>> action="/xforms-web-service-ganda/starts"
>>> ref="instance('start-instance')"
>>> method="post">
>>>    </xforms:submission>
>>>         </xforms:model>
>>>     </xhtml:head>
>>>
>>>     <xhtml:body>
>>> <xforms:group>
>>>             <xhtml:p>
>>>                 <xforms:output ref="instance('result-instance')">
>>>                     <xforms:label>The result is: </xforms:label>
>>>                 </xforms:output>
>>>             </xhtml:p>
>>>             <xhtml:p>
>>>                 <xforms:group>
>>>                     <xforms:input ref="instance('start-instance')">
>>>                         <xforms:label>Start : </xforms:label>
>>>                     </xforms:input>
>>>                     <xforms:trigger>
>>>                         <xforms:label>Submit</xforms:label>
>>>                     </xforms:trigger>
>>>                     <xforms:send ev:event="DOMActivate"
>>> submission="receive"/>
>>>                 </xforms:group>
>>>             </xhtml:p>
>>>         </xforms:group>
>>> <xhtml:p style="margin-top: 3em">
>>>             <xhtml:a href="/xforms-web-service-ganda/">Back</
>>> xhtml:a> to
>>> web-service-ganda
>>>         </xhtml:p>
>>>     </xhtml:body>
>>>
>>> </html>
>>>
>>>
>>> and this is the page flow
>>>
>>> <config xmlns="http://www.orbeon.com/oxf/controller"
>>>    xmlns:xu="http://www.xmldb.org/xupdate">
>>>
>>> <page path-info="/xforms-web-service-ganda/" view="enter-
>>> starts.xhtml">
>>>         <action when="/form/action = 'submit'"
>>> action="enter-starts-action.xsl">
>>>             <result when="/valid = 'true'" page="web-service-
>>> ganda"/>
>>>         </action>
>>>     </page>
>>>
>>>     <page id="web-service-ganda"
>>> path-info="/xforms-web-service-ganda/starts" model="view-web-
>>> service.xpl"
>>> view="view.xhtml">
>>> <action when="true()" action="atom.xpl">
>>>             <result when="/success = 'true'" page="finishing"/>
>>>             <result when="/success = 'false'" page="errors"/>
>>>         </action>
>>> </page>
>>>
>>> <page path-info="/xforms-web-service-ganda/get" model="get.xpl"/>
>>>
>>> <page id="finishing" path-info="/xforms-web-service-ganda/finish"
>>> model="get.xpl" view="finishing.xhtml">
>>>         <action when="/anything-else = 'yes'">
>>>             <result page="web-service-ganda"/>
>>>         </action>
>>> <action when="/anything-else = 'no'">
>>>             <result page="see-you-again"/>
>>>         </action>
>>>     </page>
>>>
>>> <page id="errors" path-info="/xforms-web-service-ganda/errors"
>>> view="errors.xhtml">
>>> <action when="/action = 'ok'">
>>>             <result page="web-service-ganda"/>
>>>         </action>
>>>     </page>
>>>
>>> <page id="see-you-again"
>>> path-info="/xforms-web-service-ganda/see-you-again"
>>> view="see-you-again-view.xml"/>
>>>
>>>     <epilogue url="oxf:/config/epilogue.xpl"/>
>>>
>>> </config>
>>>
>>>
>>>
>>> then this is the xpl that is used to call web service that i  
>>> confuse how
>>> to
>>> pass parameter
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>> <!--
>>>     Copyright (C) 2007 Orbeon, Inc.
>>>
>>>     This program is free software; you can redistribute it and/or  
>>> modify
>>> it
>>> under the terms of the
>>>     GNU Lesser General Public License as published by the Free  
>>> Software
>>> Foundation; either version
>>>     2.1 of the License, or (at your option) any later version.
>>>
>>>     This program is distributed in the hope that it will be  
>>> useful, but
>>> WITHOUT ANY WARRANTY;
>>>     without even the implied warranty of MERCHANTABILITY or  
>>> FITNESS FOR A
>>> PARTICULAR PURPOSE.
>>>     See the GNU Lesser General Public License for more details.
>>>
>>>     The full text of the license is available at
>>> http://www.gnu.org/copyleft/lesser.html
>>> -->
>>>
>>> <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:oxf="http://www.orbeon.com/oxf/processors"
>>>  xmlns:b4p="http://www.example.org/message"
>>>  xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
>>>  xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>>
>>>     <p:param name="instance" type="input"/>
>>>     <p:param name="data" type="output"/>
>>>     <p:param name="data2" type="output"/>
>>>
>>>     <p:processor name="oxf:delegation">
>>> <p:input name="data" href="#instance"/>
>>> <p:input name="interface">
>>> <config>
>>> <service id="single-branch" type="webservice" style="document"
>>> endpoint="http://localhost:8080/ode/processes/ 
>>> SimpleChoiceBranching/SimpleChoiceBranching/SimpleChoiceBranching/
>>> Client?wsdl">
>>> <operation name="receive"
>>> nsuri="http://example.com/SimpleChoiceBranching/ 
>>> SimpleChoiceBranching"
>>> soap-action="http://example.com/SimpleChoiceBranching/ 
>>> SimpleChoiceBranching/ForClient/receive"/>
>>> </service>
>>> </config>
>>> </p:input>
>>>
>>> <p:input name="call">
>>> <delegation:execute service="single-branch" operation="receive"
>>> xsl:version="2.0"
>>> xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
>>> <b4p:start>Hello</b4p:start>
>>> </delegation:execute>
>>> </p:input>
>>>
>>> <p:output name="data" id="receiveResponse"/>
>>>
>>>     </p:processor>
>>>
>>>      <p:processor name="oxf:exception-catcher">
>>>         <p:input name="data" href="#receiveResponse"/>
>>>         <p:output name="data" id="revoke-ws-output"/>
>>>     </p:processor>
>>>
>>>     <p:choose href="#revoke-ws-output">
>>>
>>> <p:when test="/exceptions">
>>>
>>>             <!--delete this area also works properly-->
>>>    <p:processor name="oxf:pipeline">
>>>                 <p:input name="config" href="view-web-service.xpl"/>
>>>                 <p:input name="data" href="#revoke-ws-output"/>
>>>                 <p:input name="delegation" href="#receiveResponse"/>
>>>                 <p:input name="header">
>>>                     http://localhost:8080/ode/processes/completeTask
>>>                 </p:input>
>>> <p:output name="data" id="revokedTask"/>
>>>             </p:processor>
>>>    <!--end of comment-->
>>>
>>>    <p:processor name="oxf:scope-generator">
>>> <p:input name="config">
>>>    <config>
>>> <key>webservice2</key>
>>> <scope>session</scope>
>>> <session-scope>application</session-scope>
>>>    </config>
>>> </p:input>
>>> <p:input
>>> name="data2"><receiveResponse>false</receiveResponse></p:input>
>>> <p:output name="data2" ref="data2" id="data4"/>
>>>    </p:processor>
>>>
>>>    <p:processor name="oxf:scope-serializer">
>>> <p:input name="config">
>>>    <config>
>>> <key>webservice2</key>
>>> <scope>session</scope>
>>> <session-scope>application</session-scope>
>>>    </config>
>>> </p:input>
>>> <p:input name="data" href="#data4"/>
>>>    </p:processor>
>>>
>>>    <p:processor name="oxf:identity">
>>> <p:input name="data"><success>false</success></p:input>
>>> <p:output name="data" ref="data"/>
>>>    </p:processor>
>>>
>>>         </p:when>
>>>
>>>         <p:otherwise>
>>>
>>>    <!-- delete this area also works properly-->
>>>             <p:processor name="oxf:xslt">
>>>                 <p:input name="data" href="#instance"/>
>>>                 <p:input name="config">
>>>                     <task xsl:version="2.0">
>>>                         <receiveResponse>
>>>                             <xsl:value-of select="/*:output/
>>> @start"/>
>>>                         </receiveResponse>
>>>                         <reloadTaskList/>
>>>                     </task>
>>>                 </p:input>
>>>                 <p:output name="data" id="revokedTask"/>
>>>             </p:processor>
>>>    <!--end of comment-->
>>>
>>>    <p:processor name="oxf:scope-generator">
>>> <p:input name="config">
>>>    <config>
>>> <key>webservice2</key>
>>> <scope>session</scope>
>>> <session-scope>application</session-scope>
>>>    </config>
>>> </p:input>
>>> <p:input name="data2" href="#receiveResponse"/>
>>> <p:output name="data2" ref="data2" id="data3"/>
>>>    </p:processor>
>>>
>>>    <p:processor name="oxf:scope-serializer">
>>> <p:input name="config">
>>>    <config>
>>> <key>webservice2</key>
>>> <scope>session</scope>
>>> <session-scope>application</session-scope>
>>>    </config>
>>> </p:input>
>>> <p:input name="data" href="#data3"/>
>>>    </p:processor>
>>>
>>>    <p:processor name="oxf:identity">
>>> <p:input name="data"><success>true</success></p:input>
>>> <p:output name="data" ref="data"/>
>>>    </p:processor>
>>>
>>> </p:otherwise>
>>>
>>>     </p:choose>
>>>
>>> </p:config>
>>>
>>> ===========
>>>
>>> see this line <b4p:start>Hello</b4p:start>?
>>> Hello is static text,
>>> i want to bring that input from my view.xhtml
>>> but i dont have any idea about it
>>> helppppp
>>>
>>> thanks
>>> ganda:)
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/how-to-input-parameter-from-xhtml-to-xpl-in- 
>>> web-service-Urgentt--tf4486685.html#a12794532
>>> Sent from the ObjectWeb OPS - Users mailing list archive at  
>>> Nabble.com.
>>>
>>>
>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the ops-
>>> [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
>>>
>>>
>>
>>
>
>
> -----
> http://www.victorgil.es http://www.victorgil.es
> --
> View this message in context: http://www.nabble.com/how-to-input- 
> parameter-from-xhtml-to-xpl-in-web-service-Urgentt--
> tp12794532p16833349.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.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
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







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