Webservice
Calls a webservice and retrieves the result.
Usage
webservice (service-url, method-name, method-params, indata : outdata)
Details
method_params specifies the attribute names of the relation indata that are passed as input to the method method_name.
The result of calling this method is a HashMap of (key, value). The result is appended to indata relation resulting in a dependent join. The new attribute names correspond to the "keys" in the HashMap and the new values correspond to the "values" in the HashMap.
Notes
Known Bugs
Example
Using the input:
RELATION indata: echo_this_string
Hello World!
Nice weather!
Bye Bye!
when executing the plan:
PLAN test
{
INPUT: stream indata
OUTPUT: stream output
BODY
{
webservice("http://mssoapinterop.org/asmx/xsd/round4XSD.wsdl", "echoString", "echo_this_string", indata : output)
}
}
generates the following output:
----------------------------------------------
RELATION: output
attrs: echo_this_string char, return char
----------------------------------------------
Hello World! | Hello World!
Nice weather! | Nice weather!
Bye Bye! | Bye Bye!
you may also pass the value of the parameter as a constant:
PLAN test
{
INPUT: stream indata
OUTPUT: stream output
BODY
{
webservice("http://mssoapinterop.org/asmx/xsd/round4XSD.wsdl", "echoString", "'Echo This String!'", indata : output)
}
}
generates the following output:
----------------------------------------------
RELATION: output
attrs: echo_this_string char, return char
----------------------------------------------
Hello World! | Echo This String!
Nice weather! | Echo This String!
Bye Bye! | Echo This String!