xforms submission, replace instance

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

xforms submission, replace instance

Aline Grente
Hi,

I try to update a xform instance with a webservice result. I use xform
submission to replace the instance. It seem work, but I can't access
to the updated instance.

here the xpl :

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

<p:processor name="oxf:xslt">
        <p:input name="data" href="#instance"/>
        <p:input name="config">
                <delegation:execute service="addUserServ" operation="addUser"
xsl:version="2.0">
                        <addUserRequest>
                                ...
                        </addUserRequest>
                </delegation:execute>
        </p:input>
        <p:output name="data" id="call"/>
</p:processor>
<p:processor name="oxf:delegation">
        <p:input name="interface">
                <config>
                        <service id="addUserServ" type="webservice" style="document"
endpoint="http://...">
                                <operation name="addUser" soap-action="addUser"/>
                        </service>
                </config>
        </p:input>
        <p:input name="call" href="#call"/>
        <p:output name="data" id="resp"/>
</p:processor>
<p:processor name="oxf:xml-serializer">
        <p:input name="data" href="#resp"/>
        <p:input name="config">
                <config>
                        <content-type>application/xml</content-type>
                </config>
        </p:input>
</p:processor>

view :
<xforms:model>
        <xforms:instance id="actionResult">
                <actionResult>
                        <actionMessage>action message</actionMessage>
                        <actionCode>1</actionCode>
                </actionResult>
        </xforms:instance>
        <xforms:submission id="form-submit" method="post"
action="/submissionXPL" replace="instance" instance="actionResult"/>
</xforms:model>
        <xforms:group ref="instance('actionResult')">
                <xforms:trigger>
                        <xforms:label>Valider</xforms:label>
                        <xforms:action ev:event="DOMActivate">
                                <xforms:send submission="form-submit"/>
                        </xforms:action>
                </xforms:trigger>
                <xforms:output ref="/actionResult/actionMessage"/>
        </xforms:group>


any idea ?

regards

Aline



--
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: xforms submission, replace instance

Erik Bruchez
Administrator
Are you using OPS 3.0 beta, or a nightly build? the "instance" attribute
was not supported in the beta.

-Erik

Aline Grente wrote:

> Hi,
>
> I try to update a xform instance with a webservice result. I use xform
> submission to replace the instance. It seem work, but I can't access
> to the updated instance.
>
> here the xpl :
>
> <p:param type="input" name="instance"/>
>
> <p:processor name="oxf:xslt">
> <p:input name="data" href="#instance"/>
> <p:input name="config">
> <delegation:execute service="addUserServ" operation="addUser"
> xsl:version="2.0">
> <addUserRequest>
> ...
> </addUserRequest>
> </delegation:execute>
> </p:input>
> <p:output name="data" id="call"/>
> </p:processor>
> <p:processor name="oxf:delegation">
> <p:input name="interface">
> <config>
> <service id="addUserServ" type="webservice" style="document"
> endpoint="http://...">
> <operation name="addUser" soap-action="addUser"/>
> </service>
> </config>
> </p:input>
> <p:input name="call" href="#call"/>
> <p:output name="data" id="resp"/>
> </p:processor>
> <p:processor name="oxf:xml-serializer">
> <p:input name="data" href="#resp"/>
> <p:input name="config">
> <config>
> <content-type>application/xml</content-type>
> </config>
> </p:input>
> </p:processor>
>
> view :
> <xforms:model>
> <xforms:instance id="actionResult">
> <actionResult>
> <actionMessage>action message</actionMessage>
> <actionCode>1</actionCode>
> </actionResult>
> </xforms:instance>
> <xforms:submission id="form-submit" method="post"
> action="/submissionXPL" replace="instance" instance="actionResult"/>
> </xforms:model>
> <xforms:group ref="instance('actionResult')">
> <xforms:trigger>
> <xforms:label>Valider</xforms:label>
> <xforms:action ev:event="DOMActivate">
> <xforms:send submission="form-submit"/>
> </xforms:action>
> </xforms:trigger>
> <xforms:output ref="/actionResult/actionMessage"/>
> </xforms:group>
>
>
> any idea ?
>
> regards
>
> Aline
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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



--
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: xforms submission, replace instance

Aline Grente
I tried with the nightly build, but I have the same problem :

Single-node binding expression '/actionResult/actionMessage' returned
an empty nodeset

Aline

2005/8/19, Erik Bruchez <[hidden email]>:

> Are you using OPS 3.0 beta, or a nightly build? the "instance" attribute
> was not supported in the beta.
>
> -Erik
>
> Aline Grente wrote:
> > Hi,
> >
> > I try to update a xform instance with a webservice result. I use xform
> > submission to replace the instance. It seem work, but I can't access
> > to the updated instance.
> >
> > here the xpl :
> >
> > <p:param type="input" name="instance"/>
> >
> > <p:processor name="oxf:xslt">
> >       <p:input name="data" href="#instance"/>
> >       <p:input name="config">
> >               <delegation:execute service="addUserServ" operation="addUser"
> > xsl:version="2.0">
> >                       <addUserRequest>
> >                               ...
> >                       </addUserRequest>
> >               </delegation:execute>
> >       </p:input>
> >       <p:output name="data" id="call"/>
> > </p:processor>
> > <p:processor name="oxf:delegation">
> >       <p:input name="interface">
> >               <config>
> >                       <service id="addUserServ" type="webservice" style="document"
> > endpoint="http://...">
> >                               <operation name="addUser" soap-action="addUser"/>
> >                       </service>
> >               </config>
> >       </p:input>
> >       <p:input name="call" href="#call"/>
> >       <p:output name="data" id="resp"/>
> > </p:processor>
> > <p:processor name="oxf:xml-serializer">
> >       <p:input name="data" href="#resp"/>
> >       <p:input name="config">
> >               <config>
> >                       <content-type>application/xml</content-type>
> >               </config>
> >       </p:input>
> > </p:processor>
> >
> > view :
> > <xforms:model>
> >       <xforms:instance id="actionResult">
> >               <actionResult>
> >                       <actionMessage>action message</actionMessage>
> >                       <actionCode>1</actionCode>
> >               </actionResult>
> >       </xforms:instance>
> >       <xforms:submission id="form-submit" method="post"
> > action="/submissionXPL" replace="instance" instance="actionResult"/>
> > </xforms:model>
> >       <xforms:group ref="instance('actionResult')">
> >               <xforms:trigger>
> >                       <xforms:label>Valider</xforms:label>
> >                       <xforms:action ev:event="DOMActivate">
> >                               <xforms:send submission="form-submit"/>
> >                       </xforms:action>
> >               </xforms:trigger>
> >               <xforms:output ref="/actionResult/actionMessage"/>
> >       </xforms:group>
> >
> >
> > any idea ?
> >
> > regards
> >
> > Aline
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > --
> > 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
>
>
>
>
>
> --
> 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
>
>
>


--
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: xforms submission, replace instance

Alessandro  Vernet
Administrator
--- Aline Grente <[hidden email]> wrote:

> I tried with the nightly build, but I have the same problem :
> Single-node binding expression '/actionResult/actionMessage' returned
> an empty nodeset

Hi Aline,

It looks like the web service is returning a document that does not
contain a /actionResult/actionMessage. Can you check ] the document
returned by your web services (e.g. monitoring what is going over HTTP),
and check its structure?

Alex

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

Re: xforms submission, replace instance

Aline Grente
Hi,

here the webservice result

<actionResult>
<actionMessage>Utilisateur ajoute</actionMessage>
<actionCode>0</actionCode>
</actionResult>

Aline

2005/8/19, Alessandro Vernet <[hidden email]>:

> --- Aline Grente <[hidden email]> wrote:
>
> > I tried with the nightly build, but I have the same problem :
> > Single-node binding expression '/actionResult/actionMessage' returned
> > an empty nodeset
>
> Hi Aline,
>
> It looks like the web service is returning a document that does not
> contain a /actionResult/actionMessage. Can you check ] the document
> returned by your web services (e.g. monitoring what is going over HTTP),
> and check its structure?
>
> Alex
>
> --
> 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
>
>
>


--
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: xforms submission, replace instance

Alessandro  Vernet
Administrator
--- Aline Grente <[hidden email]> wrote:
> here the webservice result
>
> <actionResult>
> <actionMessage>Utilisateur ajoute</actionMessage>
> <actionCode>0</actionCode>
> </actionResult>

Hi Aline,

This result looks fine. Can you share with us the XForms file and expose
the web service it is using (or use another equivalent web service that we
can access)?

Alex

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

Re: xforms submission, replace instance

Aline Grente
Hi,

The result is not really
<actionResult>
<actionMessage>Utilisateur ajoute</actionMessage>
<actionCode>0</actionCode>
</actionResult>
there are some name space declaration in the actionResult node. I
added an xslt processor to delete these declaration before the
oxf:xml-serializer procesor and it's work.
thanks for your help

here the xslt processor :

<p:processor name="oxf:xslt">
                <p:input name="data" href="#resp"/>
                <p:input name="config">
                        <xsl:stylesheet version="2.0" exclude-result-prefixes="xhtml oxf p
f" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
                                <xsl:template match="/">
                                        <xsl:apply-templates/>
                                </xsl:template>
                                <xsl:template match="*">
                                        <xsl:element name="{local-name()}">
                                                <xsl:apply-templates select="@*|node()"/>
                                        </xsl:element>
                                </xsl:template>
                        </xsl:stylesheet>
                </p:input>
                <p:output name="data" id="xml-response"/>
        </p:processor>

2005/8/22, Alessandro Vernet <[hidden email]>:

> --- Aline Grente <[hidden email]> wrote:
> > here the webservice result
> >
> > <actionResult>
> > <actionMessage>Utilisateur ajoute</actionMessage>
> > <actionCode>0</actionCode>
> > </actionResult>
>
> Hi Aline,
>
> This result looks fine. Can you share with us the XForms file and expose
> the web service it is using (or use another equivalent web service that we
> can access)?
>
> Alex
>
> --
> 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
>
>
>


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