Hello,

The classes you are probably interested in would be in the
org.apache.wink.server.handlers.* package (
http://incubator.apache.org/wink/1.1.2/api/index.html ). To register a
custom handler factory, you'll need to initialize a custom property.

https://cwiki.apache.org/WINK/2-apache-wink-building-blocks.html#2ApacheWinkBuildingBlocks-CustomizationoftheHandlersChain
https://cwiki.apache.org/WINK/57-handler-chain-runtime-extension.html

may help.

Your user handler should come before CreateInvocationParametersHandler
and InvokeMethodHandler . You could parse each part, create the
invocation parameters and then invoke the method for that part. I'm
not sure if you're planning to use other types of parameters but you
can look at the system handlers in
org.apache.wink.server.internal.handlers.* like the
CreateInvocationParametersHandler to understand what you would need to
do.

On Sun, Jun 19, 2011 at 9:34 AM, Borshtein, Ofer <[email protected]> wrote:
> Hi
>
> Using a custom handler, how can I get the message body, and invoke resources
> ?
>
>
>
> More info:
>
> I want to implement some way of batch requests in REST.
>
>
>
> The input: a message body of JSON/XML, that contain several entries.
>
> Each Entry consists of the target URI and the message body.
>
>
>
> Ex:
>
> --boundary
>
> Content-Type: application/xml
>
>
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?><uri>… uri for a
> resource … </uri> <user>… body …</user>
>
> --boundary
>
> Content-Type: application/xml
>
>
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?><uri>… uri for a
> resource … </uri> <user>… body …</user>
>
> --boundary—
>
>
>
> For that, I want to write my own handler, to read above input, parse it, and
> invoke each entry.
>
>
>
> How do I do that?
>
>
>
>

Reply via email to