requestWithArgs
Layer1
Release Notes
attachGoldenThread
cast
copy
cutGoldenThread
cwu
delete
dpml
dump
entrypoint
exists
expire
fls
guid
hotRestart
HTTPCookie
HTTPRedirect
isUnix
locationToXPath
lock/unlock
log
loglevel
luceneIndex
luceneSearch
mapper
mapper-export
md5
mls
netkernel:*
new
Orchextra
org.ten60.util.aspell
org.ten60.util.image.SVG2PNG
org.ten60.util.image.Text2PNG
org.ten60.util.image.xchart
plainTextToXHTML
regex
relativizeURI
requestWithArgs
resolveURI
serialize
sleep
sqlBatch
sqlBooleanQuery
SQLEncodeElement
SQLEscapeXML
sqlQuery
sqlUpdate
stm
stopWatch
StringToCanonicalString
throw
toRelaxNG
trace
validateDTD
validateRNG
validateSchematron
validateXSD
xacml
xform
XHREFlinker
XHTMLredirect
XHTMLTidy
xinclude
xmltidy
xpatheval
xpur
xquery
xrl
xsign
xslfo-fop
xslfo-fop
xslt
xverify
License
Change History
NetKernel History
Acknowledgements

requestWithArgs

Used to create and issue a request for an encapsulated service with named arguments.

Module

urn:org:ten60:netkernel:ext:layer1

Definition

Format

<instr>
  <type>requestWithArgs</type>
  <uri>/myservice</uri>
  <myargument>mydoc.xml</myargument>
  <target>var:result</target>
</instr>

Syntax

ElementRulesDescription
typeMandatory requestWithArgs
uriMandatory the URI scheme to create requestWithArgs resource under
arg1Optional An argument to pass to the URI
argNOptional An argument to pass to the URI
targetMandatory the result of the request

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.

Example

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

ffcpl:/services/wordcount+doc@mydoc.xml

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

ffcpl:/services/vet+dog@hound.xml+horse@equine.xml

A variation of this accessor is requestWithAnonymousArgs which has the same syntax as requestWithArgs but issues a call where the arguments are not attached to the uri but are instead provided to the requested accessor as anonymous arguments on the URRequest.


(C) 2003, 1060 Research Limited
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited