Ah excellent! So does the message formatter get selected based on the accept headers sent (which refer to media types IIRC)? That's perfect.

Chinthaka, the idea of bringing content negotiation into SOAP is interesting but IMO not that useful. While content neg is a favorite RESTafarian feature, the reality is that it hasn't really proved its mettle. I wanted us to do it because its a simple thing for us to do with our architecture and because for pure HTTP there are some usecases, esp. with pure HTTP scenarios where the browser is involved.

I can't find the comment right now but Larry Messinter, who proposed content neg into the http spec, later regretted it. IIRC the quote and ref is in my ws-* vs. rest presentation somewhere!

Sanjiva.

keith chapman wrote:
Hi Chinthaka,

I did implement content-negotiation in Axis2 some time ago [1]. It was implemented using the Accept header. It can be enabled by adding the following parameter to the axis2.xml

<parameter name="httpContentNegotiation">true</parameter>

Thanks,
Keith.

[1] http://markmail.org/message/mbnxc2ysq2bt7v6a

On Mon, Sep 22, 2008 at 8:53 PM, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
Since our discussion is over on Faults and JSON messages, let's discuss one of the good points raised by Dr. Sanjiva.

I think content negotiation is a cool feature to have, especially when we are using HTTP. This is one of the features I personally definitely like to have.

Are you guys thinking of using cont-neg on transport level, or will it be sth like we did for service group context using a SOAP header?
If we check how browsers and Web servers do content negotiation, it is mainly using Accept, Accept-Encoding, Accept-Charset, etc., header. I think this can be easily done within Axis2 too.

But the problem with this approach is that, this cont-neg should happen for every message. If we find out a way to do this for a conversation, it'd great. Basically a client must ask from a server, the content types it can support and client can then use those types to send messages later. This also can be tricky as sometimes Web services server itself might restrict some content types only for some operations.

Even if one of us won't be doing this, this is sth a new comer can easily tackle if we list this on tasks to be done list (if we have one ;) )

What do you all think?

--
With Mettha,
Eran Chinthaka

--------------------------------------------------------------------
Health is the greatest gift; contentment is the greatest wealth; trusting is the best relationship; nirvana is the highest joy. - Dhammapada




--
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to