-
Notifications
You must be signed in to change notification settings - Fork 5
Xcc Support
Richard Louapre edited this page May 8, 2016
·
2 revisions
dispatcher.web.xqy [1] has been modified so it can be invoke from Xcc
Dispatcher can now be invoked from QConsole:
xquery version "1.0-ml";
import module namespace request = "http://xquerrail.com/request" at "/main/_framework/request.xqy";
import module namespace domain = "http://xquerrail.com/domain" at "/main/_framework/domain.xqy";
declare option xdmp:mapping "false";
let $request := json:object()
let $_ := (
map:put($request, "type", "request:request"),
map:put($request, "request:method","PUT"),
map:put($request, "request:route","default_controller_action_format"),
map:put($request, "request:application","app-test"),
map:put($request, "request:controller","documents"),
map:put($request, "request:action","insert"),
map:put($request, "request:format","xml"),
map:put($request, "request:param::uri","/text/4.xml")
)
return
xdmp:invoke(
"/main/_framework/dispatchers/dispatcher.web.xqy",
map:new((
map:entry("{http://xquerrail.com/domain}REQUEST-EXTERNAL", $request),
map:entry("{http://xquerrail.com/domain}REQUEST-BODY-EXTERNAL", <trade><name>trade-1</name></trade>)
))
)Or from Xcc /invoke.
[1] - https://github.com/nativelogix/xquerrail2.framework/commit/2211eaa3658d86d00bc7e46d56b4cd6e295605d1