|
|||||||||||||||||||||
|
|
It is very useful to encapsulate services behind a public URI interface. The underlying mechanism by which the service is provided is hidden from the service requestor. Often such a service will require that additional named arguments are passed to it. The requestWithArgs accessor allows a call to be made to an arbitrary URI - provided in the <uri> argument. All other arguments are added as named arguments on a compound URI - the name being the same as the element name containing the argument URI. The assembled compound URI request is then made and the result returned. ExampleSuppose we wish to call an interface "ffcpl:/services/wordcount" which returns the word count of a document supplied as a named argument "doc". <instr>
<type>requestWithArgs</type> <uri>/services/wordcount</uri> <doc>mydoc.xml</doc> <target>var:result</target> </instr> Creates and issues the request...
Multiple arguments are supported so for example... <instr>
<type>requestWithArgs</type> <uri>/services/vet</uri> <dog>hound.xml</dog> <horse>equine.xml</horse> <target>var:result</target> </instr> Creates and requests...
A variation of this accessor is (C) 2003, 1060 Research Limited |
||||||||||||||||||||
|
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited
|
|||||||||||||||||||||