using webservices in xforms

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

using webservices in xforms

Nathan (synergetics)


Hi there,

in a project i had the pleasure to take over, a lot of handcoded xforms were used inside
an intalio environment.
Those xforms are extremely powerful, but to be honest, i only understand half of it (or not even).

Now i want to extend one of these forms, and include webservices to fill in the dummy lists.
E.g. in the appended formevc.xform there is a dummy instance 'users-instance'
and there is a TODO in the xforms-ready event to "load the list of users".

I have implemented a webservice, that returns a list of users, in the same format as before (see appended WSDL file).
Now i need to get it called from the xform itself.

I have been searching the orbeon website and the web, but there are very little tutorials or explanations how to use WSDL webservices from xforms.

Could you give me a few pointers ? I think i found an example that uses a SOAP webservice (without any explanation),
but it starts its action on form-submission. How do i start an action on an event ?

<xforms:instance id="ws-request">
                <SOAP-ENV:Envelope>
                    <SOAP-ENV:Body>
                        <m:GetQuote xmlns:m="<a href="http://ws.invesbot.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://ws.invesbot.com/">
                            <m:symbol>GOOG</m:symbol>
                        </m:GetQuote>
                    </SOAP-ENV:Body>
                </SOAP-ENV:Envelope>
            </xforms:instance>

            <xforms:instance id="ws-response"><dummy/></xforms:instance>

            <xforms:submission id="stock-submission" method="post"
                    action=" <a href="http://ws.invesbot.com/stockquotes.asmx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ws.invesbot.com/stockquotes.asmx"
                    ref="instance('ws-request')" replace="instance" instance="ws-response"
                    mediatype="application/soap+xml; action="<a href="http://ws.invesbot.com/GetQuote12" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ws.invesbot.com/GetQuote12 ""/>


I can fill in the SOAP-header, using SOAPUI, but then it stops.

Please, any tips ?


Kind regards,

Nathan



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

formevc.xform (75K) Download Attachment
services.wsdl (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: using webservices in xforms

Hank Ratzesberger

Hi Nathan,

When using SOAP style web services, one strategy is to 
write a handler in an xpl file that uses the delegation processor.
You can also transform the result , if needed, so that it is a proper
XForms instance.


This way, you likely would not need any SOAP elements in your 
XForms view -- all "clean" instances.  And your submission elements
would use the replace="instance" attribute.  
--Hank


On Oct 11, 2007, at 2:07 PM, Nathan (synergetics) wrote:



Hi there,

in a project i had the pleasure to take over, a lot of handcoded xforms were used inside
an intalio environment.
Those xforms are extremely powerful, but to be honest, i only understand half of it (or not even).

Now i want to extend one of these forms, and include webservices to fill in the dummy lists.
E.g. in the appended formevc.xform there is a dummy instance 'users-instance'
and there is a TODO in the xforms-ready event to "load the list of users".

I have implemented a webservice, that returns a list of users, in the same format as before (see appended WSDL file).
Now i need to get it called from the xform itself.

I have been searching the orbeon website and the web, but there are very little tutorials or explanations how to use WSDL webservices from xforms.

Could you give me a few pointers ? I think i found an example that uses a SOAP webservice (without any explanation),
but it starts its action on form-submission. How do i start an action on an event ?

<xforms:instance id="ws-request">
                <SOAP-ENV:Envelope>
                    <SOAP-ENV:Body>
                        <m:GetQuote xmlns:m="<A href="http://ws.invesbot.com/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://ws.invesbot.com/">
                            <m:symbol>GOOG</m:symbol>
                        </m:GetQuote>
                    </SOAP-ENV:Body>
                </SOAP-ENV:Envelope>
            </xforms:instance>

            <xforms:instance id="ws-response"><dummy/></xforms:instance>

            <xforms:submission id="stock-submission" method="post"
                    action=" <A href="http://ws.invesbot.com/stockquotes.asmx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ws.invesbot.com/stockquotes.asmx"
                    ref="instance('ws-request')" replace="instance" instance="ws-response"
                    mediatype="application/soap+xml; action="<A href="http://ws.invesbot.com/GetQuote12" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://ws.invesbot.com/GetQuote12 ""/>


I can fill in the SOAP-header, using SOAPUI, but then it stops.

Please, any tips ?


Kind regards,

Nathan

<formevc.xform>
<services.wsdl>

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: using webservices in xforms

Erik Bruchez
Administrator
Hank,

Yes this is possible, although I find it often easier to just paste the
SOAP envelope in XForms. This way, you don't need to write a separate
XPL file, add an entry in the page flow, or deal with the oxf:delegation
processor.

Which way is the easiest may depend on the particular use case.

-Erik

Hank Ratzesberger wrote:

>
> Hi Nathan,
>
> When using SOAP style web services, one strategy is to
> write a handler in an xpl file that uses the delegation processor.
> You can also transform the result , if needed, so that it is a proper
> XForms instance.
>
> http://www.orbeon.com/ops/doc/integration-webservices
>
> This way, you likely would not need any SOAP elements in your
> XForms view -- all "clean" instances.  And your submission elements
> would use the replace="instance" attribute.  
> --Hank
>
>
> On Oct 11, 2007, at 2:07 PM, Nathan (synergetics) wrote:
>
>>
>>
>> Hi there,
>>
>> in a project i had the pleasure to take over, a lot of handcoded
>> xforms were used inside
>> an intalio environment.
>> Those xforms are extremely powerful, but to be honest, i only
>> understand half of it (or not even).
>>
>> Now i want to extend one of these forms, and include webservices to
>> fill in the dummy lists.
>> E.g. in the appended formevc.xform there is a dummy instance
>> 'users-instance'
>> and there is a TODO in the xforms-ready event to "load the list of users".
>>
>> I have implemented a webservice, that returns a list of users, in the
>> same format as before (see appended WSDL file).
>> Now i need to get it called from the xform itself.
>>
>> I have been searching the orbeon website and the web, but there are
>> very little tutorials or explanations how to use WSDL webservices from
>> xforms.
>>
>> Could you give me a few pointers ? I think i found an example that
>> uses a SOAP webservice (without any explanation),
>> but it starts its action on form-submission. How do i start an action
>> on an event ?
>>
>> <xforms:instance id="ws-request">
>>                 <SOAP-ENV:Envelope>
>>                     <SOAP-ENV:Body>
>>                         <m:GetQuote xmlns:m=" http://ws.invesbot.com/">
>>                             <m:symbol>GOOG</m:symbol>
>>                         </m:GetQuote>
>>                     </SOAP-ENV:Body>
>>                 </SOAP-ENV:Envelope>
>>             </xforms:instance>
>>
>>             <xforms:instance id="ws-response"><dummy/></xforms:instance>
>>
>>             <xforms:submission id="stock-submission" method="post"
>>                     action=" http://ws.invesbot.com/stockquotes.asmx"
>>                     ref="instance('ws-request')" replace="instance" instance="ws-response"
>>
>>                     mediatype="application/soap+xml; action="http://ws.invesbot.com/GetQuote12 
>> <http://ws.invesbot.com/GetQuote12>""/>
>>
>>
>> I can fill in the SOAP-header, using SOAPUI, but then it stops.
>>
>> Please, any tips ?
>>
>>
>> Kind regards,
>>
>> Nathan
>>
>> <formevc.xform>
>> <services.wsdl>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> <mailto:[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
>
>
>
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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: using webservices in xforms

Luk Vervenne
In reply to this post by Nathan (synergetics)

Ben gewoon laat.

(wegens Maastricht conferentie)

Werk er vanmorgen aan.

 

Luk Vervenne
CEO

Synergetics NV/SA
Katwilgweg 2 | 2050 Antwerp | Belgium
T(+32)3/210.30.82 | F(+32)3/210.30.86
M(+32)476.53.00.21 | VAT BE 0455.690.261
www.synergetics.be | [hidden email]
---------------------------------------------
Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. The integrity and security of this message cannot be guaranteed on the Internet.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan (synergetics)
Sent: donderdag 11 oktober 2007 23:08
To: [hidden email]
Subject: [ops-users] using webservices in xforms

 



Hi there,

in a project i had the pleasure to take over, a lot of handcoded xforms were used inside
an intalio environment.
Those xforms are extremely powerful, but to be honest, i only understand half of it (or not even).

Now i want to extend one of these forms, and include webservices to fill in the dummy lists.
E.g. in the appended formevc.xform there is a dummy instance 'users-instance'
and there is a TODO in the xforms-ready event to "load the list of users".

I have implemented a webservice, that returns a list of users, in the same format as before (see appended WSDL file).
Now i need to get it called from the xform itself.

I have been searching the orbeon website and the web, but there are very little tutorials or explanations how to use WSDL webservices from xforms.

Could you give me a few pointers ? I think i found an example that uses a SOAP webservice (without any explanation),
but it starts its action on form-submission. How do i start an action on an event ?

<xforms:instance id="ws-request">
                <SOAP-ENV:Envelope>
                    <SOAP-ENV:Body>
                        <m:GetQuote xmlns:m=" http://ws.invesbot.com/">
                            <m:symbol>GOOG</m:symbol>
                        </m:GetQuote>
                    </SOAP-ENV:Body>
                </SOAP-ENV:Envelope>
            </xforms:instance>

            <xforms:instance id="ws-response"><dummy/></xforms:instance>

            <xforms:submission id="stock-submission" method="post"
                    action=" http://ws.invesbot.com/stockquotes.asmx"
                    ref="instance('ws-request')" replace="instance" instance="ws-response"
                    mediatype="application/soap+xml; action="http://ws.invesbot.com/GetQuote12 ""/>


I can fill in the SOAP-header, using SOAPUI, but then it stops.

Please, any tips ?


Kind regards,

Nathan



--
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: using webservices in xforms

Luk Vervenne

Oops,

Please ignore J

 

Luk Vervenne
CEO

Synergetics NV/SA
Katwilgweg 2 | 2050 Antwerp | Belgium
T(+32)3/210.30.82 | F(+32)3/210.30.86
M(+32)476.53.00.21 | VAT BE 0455.690.261
www.synergetics.be | [hidden email]
---------------------------------------------
Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. The integrity and security of this message cannot be guaranteed on the Internet.

 

From: Luk Vervenne [mailto:[hidden email]]
Sent: vrijdag 12 oktober 2007 9:28
To: [hidden email]
Subject: RE: [ops-users] using webservices in xforms

 

Ben gewoon laat.

(wegens Maastricht conferentie)

Werk er vanmorgen aan.

 

Luk Vervenne
CEO

Synergetics NV/SA
Katwilgweg 2 | 2050 Antwerp | Belgium
T(+32)3/210.30.82 | F(+32)3/210.30.86
M(+32)476.53.00.21 | VAT BE 0455.690.261
www.synergetics.be | [hidden email]
---------------------------------------------
Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. The integrity and security of this message cannot be guaranteed on the Internet.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan (synergetics)
Sent: donderdag 11 oktober 2007 23:08
To: [hidden email]
Subject: [ops-users] using webservices in xforms

 



Hi there,

in a project i had the pleasure to take over, a lot of handcoded xforms were used inside
an intalio environment.
Those xforms are extremely powerful, but to be honest, i only understand half of it (or not even).

Now i want to extend one of these forms, and include webservices to fill in the dummy lists.
E.g. in the appended formevc.xform there is a dummy instance 'users-instance'
and there is a TODO in the xforms-ready event to "load the list of users".

I have implemented a webservice, that returns a list of users, in the same format as before (see appended WSDL file).
Now i need to get it called from the xform itself.

I have been searching the orbeon website and the web, but there are very little tutorials or explanations how to use WSDL webservices from xforms.

Could you give me a few pointers ? I think i found an example that uses a SOAP webservice (without any explanation),
but it starts its action on form-submission. How do i start an action on an event ?

<xforms:instance id="ws-request">
                <SOAP-ENV:Envelope>
                    <SOAP-ENV:Body>
                        <m:GetQuote xmlns:m=" http://ws.invesbot.com/">
                            <m:symbol>GOOG</m:symbol>
                        </m:GetQuote>
                    </SOAP-ENV:Body>
                </SOAP-ENV:Envelope>
            </xforms:instance>

            <xforms:instance id="ws-response"><dummy/></xforms:instance>

            <xforms:submission id="stock-submission" method="post"
                    action=" http://ws.invesbot.com/stockquotes.asmx"
                    ref="instance('ws-request')" replace="instance" instance="ws-response"
                    mediatype="application/soap+xml; action="http://ws.invesbot.com/GetQuote12 ""/>


I can fill in the SOAP-header, using SOAPUI, but then it stops.

Please, any tips ?


Kind regards,

Nathan



--
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: using webservices in xforms

Erik Bruchez
Administrator
In reply to this post by Nathan (synergetics)
Nathan,

That's right, we are a little short on the Web Services documentation.
However you can do a lot from XForms. Just last week, I called Alfresco
Web Services from XForms without major issues.

In your example below, you can call the "stock-submission" with a simple
submit button:

<xforms:submit submission="stock-submission">
   <xforms:label>Try me</xforms:label>
</xforms:submit>

This should do for testing.

-Erik

Nathan (synergetics) wrote:

>
>
> Hi there,
>
> in a project i had the pleasure to take over, a lot of handcoded xforms
> were used inside
> an intalio environment.
> Those xforms are extremely powerful, but to be honest, i only understand
> half of it (or not even).
>
> Now i want to extend one of these forms, and include webservices to fill
> in the dummy lists.
> E.g. in the appended formevc.xform there is a dummy instance
> 'users-instance'
> and there is a TODO in the xforms-ready event to "load the list of users".
>
> I have implemented a webservice, that returns a list of users, in the
> same format as before (see appended WSDL file).
> Now i need to get it called from the xform itself.
>
> I have been searching the orbeon website and the web, but there are very
> little tutorials or explanations how to use WSDL webservices from xforms.
>
> Could you give me a few pointers ? I think i found an example that uses
> a SOAP webservice (without any explanation),
> but it starts its action on form-submission. How do i start an action on
> an event ?
>
> <xforms:instance id="ws-request">
>                 <SOAP-ENV:Envelope>
>                     <SOAP-ENV:Body>
>                         <m:GetQuote xmlns:m=" http://ws.invesbot.com/">
>                             <m:symbol>GOOG</m:symbol>
>                         </m:GetQuote>
>                     </SOAP-ENV:Body>
>                 </SOAP-ENV:Envelope>
>             </xforms:instance>
>
>             <xforms:instance id="ws-response"><dummy/></xforms:instance>
>
>             <xforms:submission id="stock-submission" method="post"
>                     action=" http://ws.invesbot.com/stockquotes.asmx"
>                     ref="instance('ws-request')" replace="instance" instance="ws-response"
>
>                     mediatype="application/soap+xml; action="http://ws.invesbot.com/GetQuote12 
> <http://ws.invesbot.com/GetQuote12>""/>
>
>
> I can fill in the SOAP-header, using SOAPUI, but then it stops.
>
> Please, any tips ?
>
>
> Kind regards,
>
> Nathan
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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