Quantcast

Orbeon XForms Submission Struts 2 Webservice Http call with query parameters

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

Orbeon XForms Submission Struts 2 Webservice Http call with query parameters

dcstingray
Hello,

I have tried to have Orbeon send a request to the struts 2 webservice that is working in my environment.  Orbeon seems to hang for a long time before it comes back with nothing (no response value or error code).  I have tried testing at run-time and through the http service test.

Here is the submission code that I am using.

<xforms:instance id="fr-service-request-instance"
        xxforms:exclude-result-prefixes="#all">
        <request />
</xforms:instance>

<xforms:instance id="fr-service-response-instance"
        xxforms:exclude-result-prefixes="#all">
        <response />
</xforms:instance>


<xforms:instance id="orbeonCustomer-instance" class="fr-service"
        xxforms:exclude-result-prefixes="#all">
        <body><data/></body>
</xforms:instance>
<xforms:submission id="orbeonCustomer-submission"
        class="fr-service"
        ref="instance('fr-service-request-instance')"
        action="http://......./orbeonFormsManager/outstanding.action?userId={xxforms:instance('user-instance')/userId}&amp;accountNumber={xxforms:instance('user-instance')/accountNumber}"
        method="get"
        separator="&amp;"
        serialization="application/xml"
        mediatype="application/xml"
        replace="instance"
        xforms:url-type="resource"
        instance="fr-service-response-instance" />
<xforms:action id="orbeonCustomer-binding">

        <xforms:action ev:event="xforms-ready" ev:observer="fr-form-model">

                <xforms:send submission="orbeonCustomer-submission" />
        </xforms:action>

        <xforms:action ev:event="xforms-submit" ev:observer="orbeonCustomer-submission">

                <xxforms:variable name="request-instance-name"
                        select="'orbeonCustomer-instance'" as="xs:string" />

                <xforms:insert nodeset="instance('fr-service-request-instance')"
                        origin="saxon:parse(instance($request-instance-name))" />


                <xforms:action context="instance('fr-service-request-instance')">

                </xforms:action>
        </xforms:action>
        ......
        ......
</xforms:action>

I have tried with using another action of "http://...../myaccount/payments/username/45481218" and it works fine.
Both calls return clean xml.

Any ideas for what I am missing that may be special when adding query parameters to the action call?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Orbeon XForms Submission Struts 2 Webservice Http call with query parameters

Erik Bruchez
Administrator
Michael,

At first glance that should work. It might be a good idea to enable
more logging and see if there is any information in the logs about
what went wrong with the submission:

http://wiki.orbeon.com/forms/doc/developer-guide/xforms-logging

-Erik

On Thu, Feb 2, 2012 at 10:22 AM, dcstingray
<[hidden email]> wrote:

> Hello,
>
> I have tried to have Orbeon send a request to the struts 2 webservice that
> is working in my environment.  Orbeon seems to hang for a long time before
> it comes back with nothing (no response value or error code).  I have tried
> testing at run-time and through the http service test.
>
> Here is the submission code that I am using.
>
> <xforms:instance id="fr-service-request-instance"
>        xxforms:exclude-result-prefixes="#all">
>        <request />
> </xforms:instance>
>
> <xforms:instance id="fr-service-response-instance"
>        xxforms:exclude-result-prefixes="#all">
>        <response />
> </xforms:instance>
>
>
> <xforms:instance id="orbeonCustomer-instance" class="fr-service"
>        xxforms:exclude-result-prefixes="#all">
>        <body>&lt;data/&gt;</body>
> </xforms:instance>
> <xforms:submission id="orbeonCustomer-submission"
>        class="fr-service"
>        ref="instance('fr-service-request-instance')"
>
> action="http://......./orbeonFormsManager/outstanding.action?userId={xxforms:instance('user-instance')/userId}&amp;accountNumber={xxforms:instance('user-instance')/accountNumber}"
>        method="get"
>        separator="&amp;"
>        serialization="application/xml"
>        mediatype="application/xml"
>        replace="instance"
>        xforms:url-type="resource"
>        instance="fr-service-response-instance" />
> <xforms:action id="orbeonCustomer-binding">
>
>        <xforms:action ev:event="xforms-ready" ev:observer="fr-form-model">
>
>                <xforms:send submission="orbeonCustomer-submission" />
>        </xforms:action>
>
>        <xforms:action ev:event="xforms-submit"
> ev:observer="orbeonCustomer-submission">
>
>                <xxforms:variable name="request-instance-name"
>                        select="'orbeonCustomer-instance'" as="xs:string" />
>
>                <xforms:insert nodeset="instance('fr-service-request-instance')"
>                        origin="saxon:parse(instance($request-instance-name))" />
>
>
>                <xforms:action context="instance('fr-service-request-instance')">
>
>                </xforms:action>
>        </xforms:action>
>        ......
>        ......
> </xforms:action>
>
> I have tried with using another action of
> "http://...../myaccount/payments/username/45481218" and it works fine.
> Both calls return clean xml.
>
> Any ideas for what I am missing that may be special when adding query
> parameters to the action call?
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Orbeon-XForms-Submission-Struts-2-Webservice-Http-call-with-query-parameters-tp4352336p4352336.html
> Sent from the Orbeon Forms (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
>


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