On Tue, Mar 4, 2008 at 11:10 PM, harshal <[EMAIL PROTECTED]> wrote:
>
>  Hello John,
>
>  One question about setting and getting the parameter values from soap
>  participants.
>  Can we have a couple of more examples around this concept?
>  It would definitely help to understand it better.

Hello Harshal,

if you take a look at the code of the soap participant :

http://openwferu.rubyforge.org/svn/trunk/openwfe-ruby/lib/openwfe/participants/soapparticipants.rb

you'll notice it's just a thin veneer around the standard Ruby lib for SOAP.

Out of the box, the participant expects at initialization time a list
of  "params".

---8<---
    quote_service = OpenWFE::SoapParticipant.new(
        "http://services.xmethods.net/soap";,        # service URI
        "urn:xmethods-delayed-quotes",              # namespace
        "getQuote",                                 # operation name
        [ "symbol", "other-symbol" ])                               #
param arrays (workitem fields)
--->8---

Upon receiving a workitem with { "symbol" => "YHOO", "other-symbol" =>
"JAVA" }, this participant instance will invoke the webservice with
"getQuote('YHOO', 'JAVA')".

It's Ruby, you can also easily override this class or monkey-patch it.

You could also implement your own SoapParticipant, or do something like :

---8<---
engine.register_participant :my_service do |workitem|
    driver = SOAP::RPC::Driver.new("http://ws.harshal.net/my_service_endpoint";)
    result = driver.send(workitem["field0"], workitem["fieldX"])
    workitem["result"] = result
end
--->8---


I hope this will help, best regards,

-- 
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to