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 |
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:
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 |
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 |
In reply to this post by Nathan (synergetics)
Ben gewoon laat. (wegens Maastricht conferentie) Werk er vanmorgen aan. Luk Vervenne Synergetics NV/SA From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nathan (synergetics)
-- 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 |
Oops, Please ignore J Luk Vervenne Synergetics NV/SA From: Luk Vervenne [mailto:[hidden email]] Ben gewoon laat. (wegens Maastricht conferentie) Werk er vanmorgen aan. Luk Vervenne Synergetics NV/SA From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nathan (synergetics)
-- 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 |
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 |
Free forum by Nabble | Edit this page |