users@grizzly.java.net

Re: Processing of the Content

From: Daniel Manzke <daniel.manzke_at_googlemail.com>
Date: Fri, 6 Feb 2009 10:43:48 +0100

Hi Jeanfrancois,
ok let me give it another try. ;)

To support WebDAV in JAX-RS Markus KARG developed the needed classes and
annotated them with JAXB annotations. What I want to do is, to process the
the xml which was generated by a JAX-RS implementation right before it was
send to the client.

Example:
The Microsoft WebDAV-Client (MiniRedi) needs namespaces in XML. Without them
the client aborts the connection. We have a solution which works for new
applications, there you add an empty property, which causes JAXB to use
namespaces.
What I want to have is a solution which I can add by configuration.

That's why we thought about using Servlet Filters.

Until now I'm trying to implement this solution by an Adapter which I can
pass to the GrizzlyFactory. This would allow that I could just wrap the
original Adapter for Jersey and I don't have to add classes to the JAXB
context.

"Do you means the XML that was written by Jersey to the response before it
is sent to the client"
--> Exactly what I mean :) --> I need to process (adding namespaces) right
before it is send to the client


2. Example:
To discover WebDAV-Support the Microsoft WebDAV-Client calls the
Root-Resource. Due the fact that the most applications didn't have a root
resource with an implemented options method, my wrapper catchs up the
request and transform the repsonse to be correct (for Microsoft).
This could already be used, because this is just changing the Status-Code
and setting some headers. :)



Good morning from Berlin :)
Daniel

2009/2/6 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>

> Salut,
>
> Daniel Manzke wrote:
>
>> Hi,
>>
>> I'm working on WebDAV-Support for JAX-RS.
>>
>
> Yes I'm following you on the jersey list :-)
>
> Therefore we use grizzly as
>
>> the server for our samples and applications. Due there are heavy
>> interoperability issues with WebDAV (Microsoft Clients and so on), I'm
>> testing some ideas, which could be done, by postprocessing of the returned
>> elements.
>> In the end this will be done by a servlet filter, but until there I try to
>> solve it with an Adapter-Class.
>>
>> How could I get the xml which was created by jersey?
>>
>
> What do you means by XML? Do you means the XML that was written by Jersey
> to the response before it is sent to the client?
>
>
> Where do I find it
>
>> in the Response? Any Idea? Or I'm totally on the wrong way. :)
>>
>
> OK if I understand you correctly, you want to get a reference to the
> already written bytes (but not sent to the client). Right now we don't
> expose an API for getting those bytes, but I'm OK to expose it if I
> understand you properly. Can you elaborate more?
>
> Thanks
>
> -- Jeanfrancois
>
>
>
>>
>>
>> Best Regards and Thanks,
>> Daniel
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>


-- 
Mit freundlichen Grüßen
Daniel Manzke