You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by keith chapman <ke...@gmail.com> on 2007/10/17 07:17:47 UTC

[AXIS2] Proposal to implement http content negotiation

Hi Devs,

There have been some thought on http content negotiation. With the concept
of builders and formatters we have now this could be implemented trivially.
The idea is to use the "Accept" http header to serve the response requested
by the client. While going through this though I came across a issue though.
This occurs when a request is sent via a GET using a browser (Cause the
browser automatically adds the Accept http header). The Accept header sent
by firefox is "Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
0.8,image/png,*/*;q=0.5".  The confusion comes in because text/xml is used
for both SOAP and REST responses.

I believe having http content negotiation as a feature will be a nice
addition to Axis2. And I propose that we treat text/xml as a REST response
in implementing this. This would mean that you cannot ask for a SOAP
1.1response uaing http content negotiation (A SOAP
1.1 response will be went only when the request is SOAP 1.1 and there is no
matching value in the Accept header).

What do u think? Should we go ahead and implement this proposal?

Thanks,
Keith.

-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: [AXIS2] Proposal to implement http content negotiation

Posted by keith chapman <ke...@gmail.com>.
On 10/18/07, Glen Daniels <gl...@thoughtcraft.com> wrote:
>
>
> Hi folks:
>
> +1 from me *if* we make sure there's a flag to allow people to control
> whether a given operation supports POX or not.  Essentially I'm just
> saying we should backport the SOAP-Response MEP to SOAP 1.1, and allow
> the user to specify.  By default the behavior should be as in Keith's
> proposal, but if they indicate that a particular operation is using the
> SOAP-Response MEP (this could also be a disablePOX flag or whatever),


How about using the disable REST flag for this without introducing another
flag.

it
> should always return SOAP on a GET.
>
> Also...
>
> >> a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> >> response will be went only when the request is SOAP 1.1 and there is
> >> no matching value in the Accept header).
>
> If the request is SOAP 1.1, we should always return SOAP 1.1 regardless
> of the Accept header, right?


In this case the return will be  the return will be SOAP 1.1 only is there
was no matching ACCEPT header. Id a SOAP 1.1. request came with the header
ACCEPT : text/xml then the response will be pox.

Thanks,
Keith.

--Glen
>
> Sanjiva Weerawarana wrote:
> > +1 from me.
> >
> > For some further discussion on this see [1]. In particular [2] gives
> > rationale for why its ok to give more weight to POX over SOAP 1.1.
> >
> > Sanjiva.
> > [1]
> http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> > [2] http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
> >
> > keith chapman wrote:
> >> Hi Devs,
> >>
> >> There have been some thought on http content negotiation. With the
> >> concept of builders and formatters we have now this could be
> >> implemented trivially. The idea is to use the "Accept" http header to
> >> serve the response requested by the client. While going through this
> >> though I came across a issue though. This occurs when a request is
> >> sent via a GET using a browser (Cause the browser automatically adds
> >> the Accept http header). The Accept header sent by firefox is "Accept:
> >> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> ,text/plain;q=0.8,image/png,*/*;q=0.5".
> >> The confusion comes in because text/xml is used for both SOAP and REST
> >> responses.
> >>
> >> I believe having http content negotiation as a feature will be a nice
> >> addition to Axis2. And I propose that we treat text/xml as a REST
> >> response in implementing this. This would mean that you cannot ask for
> >> a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> >> response will be went only when the request is SOAP 1.1 and there is
> >> no matching value in the Accept header).
> >>
> >> What do u think? Should we go ahead and implement this proposal?
> >>
> >> Thanks,
> >> Keith.
> >>
> >> --
> >> Keith Chapman
> >> WSO2 Inc.
> >> Oxygen for Web Services Developers.
> >> http://wso2.org/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: [AXIS2] Proposal to implement http content negotiation

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi keith ,

> Hi all,
>
> I've added Content Negotiation via Accept header to Axis2 in revision
> 596950. As stated previously this would mean that doing a GET (Just
> typing in a URL on the browser) from the browser would result in a
> SOAP 1.1 response cause the browsers accept header  says text/xml.
>
> Do we need a switch in the axis2.xml to control this feature?
Yes please do so.

Thanks
Deepal


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [AXIS2] Proposal to implement http content negotiation

Posted by keith chapman <ke...@gmail.com>.
Hi all,

I've added Content Negotiation via Accept header to Axis2 in revision
596950. As stated previously this would mean that doing a GET (Just typing
in a URL on the browser) from the browser would result in a SOAP
1.1response cause the browsers accept header  says text/xml.

Do we need a switch in the axis2.xml to control this feature?

Thanks,
Keith.

On Oct 21, 2007 1:21 PM, keith chapman <ke...@gmail.com> wrote:

> Yes they are unaffected as long as they dont send the Accept header (Wich
> clients dont do unless explicitly set)
>
> Thanks,
> Keith.
>
>
> On 10/19/07, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> >
> > However, isn't the answer to Nick's first question yes? That is,
> > existing
> > services which do only SOAP are unaffected by this proposed change.
> >
> > Sanjiva.
> >
> > keith chapman wrote:
> > > Hi Nicholas,
> > >
> > > Yes it will be in effect for all application (Subjected to the fact
> > that
> > > it sends an Accept header). If the client does not send an Accept
> > header
> > > then everything will be as it used to be. But as Glen suggested we
> > could
> > > have a switch to turn this feature off.
> > >
> > > Thanks,
> > > Keith.
> > >
> > > On 10/19/07, *Nicholas L Gallardo* <nlgallar@us.ibm.com
> > > <mailto:nlgallar@us.ibm.com >> wrote:
> > >
> > >     Glen,
> > >
> > >     >  If the request is SOAP 1.1, we should always return SOAP 1.1
> > >     regardless
> > >     >  of the Accept header, right?
> > >
> > >     That's my understanding. I believe this is addressed in the SOAP
> > 1.2
> > >     spec as to what constitutes a mismatch error and what kinds of
> > >     responses can go back.
> > >
> > >     Would this leave the existing behavior unchanged for services that
> > >     declare an explicit SOAP binding in a WSDL? In other words, does
> > >     this just apply to endpoints choosing to leverage a RESTful
> > >     pattern/API, or will all applications be subject to negotiation?
> > >
> > >     -Nick
> > >
> > >
> > >
> > >     Inactive hide details for Glen Daniels < glen@thoughtcraft.com
> > >Glen
> > >     Daniels < glen@thoughtcraft.com <mailto:glen@thoughtcraft.com >>
> > >
> > >
> > >                             *Glen Daniels <glen@thoughtcraft.com
> > >                             <mailto: glen@thoughtcraft.com>>*
> > >
> > >                             10/18/2007 05:41 AM
> > >                             Please respond to
> > >                             axis-dev@ws.apache.org
> > >                             <ma...@ws.apache.org>
> > >
> > >
> > >
> > >     To
> > >
> > >     axis-dev@ws.apache.org <ma...@ws.apache.org>
> > >
> > >     cc
> > >
> > >
> > >     Subject
> > >
> > >     Re: [AXIS2] Proposal to implement http content negotiation
> > >
> > >
> > >
> > >
> > >
> > >     Hi folks:
> > >
> > >     +1 from me *if* we make sure there's a flag to allow people to
> > control
> > >     whether a given operation supports POX or not.  Essentially I'm
> > just
> > >     saying we should backport the SOAP-Response MEP to SOAP 1.1, and
> > allow
> > >     the user to specify.  By default the behavior should be as in
> > Keith's
> > >     proposal, but if they indicate that a particular operation is
> > using the
> > >     SOAP-Response MEP (this could also be a disablePOX flag or
> > >     whatever), it
> > >     should always return SOAP on a GET.
> > >
> > >     Also...
> > >
> > >     > > a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> > >     > > response will be went only when the request is SOAP 1.1 and
> > there is
> > >     > > no matching value in the Accept header).
> > >
> > >     If the request is SOAP 1.1, we should always return SOAP 1.1regardless
> > >     of the Accept header, right?
> > >
> > >     --Glen
> > >
> > >     Sanjiva Weerawarana wrote:
> > >     >  +1 from me.
> > >     >
> > >     >  For some further discussion on this see [1]. In particular [2]
> > gives
> > >     >  rationale for why its ok to give more weight to POX over SOAP
> > 1.1.
> > >     >
> > >     >  Sanjiva.
> > >     >  [1]
> > >
> > http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> > >     <http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> > >
> > >     >  [2]
> > >     http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
> > >     <http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
> > >
> > >     >
> > >     >  keith chapman wrote:
> > >     > > Hi Devs,
> > >     > >
> > >     > > There have been some thought on http content negotiation. With
> > the
> > >     > > concept of builders and formatters we have now this could be
> > >     > > implemented trivially. The idea is to use the "Accept" http
> > >     header to
> > >     > > serve the response requested by the client. While going
> > through this
> > >     > > though I came across a issue though. This occurs when a
> > request is
> > >     > > sent via a GET using a browser (Cause the browser
> > automatically adds
> > >     > > the Accept http header). The Accept header sent by firefox is
> > >     "Accept:
> > >     > >
> > >     text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> > ,text/plain;q=0.8,image/png,*/*;q=0.5".
> > >
> > >     > > The confusion comes in because text/xml is used for both SOAP
> > and
> > >     REST
> > >     > > responses.
> > >     > >
> > >     > > I believe having http content negotiation as a feature will be
> > a
> > >     nice
> > >     > > addition to Axis2. And I propose that we treat text/xml as a
> > REST
> > >     > > response in implementing this. This would mean that you cannot
> > >     ask for
> > >     > > a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> > >     > > response will be went only when the request is SOAP 1.1 and
> > there is
> > >     > > no matching value in the Accept header).
> > >     > >
> > >     > > What do u think? Should we go ahead and implement this
> > proposal?
> > >     > >
> > >     > > Thanks,
> > >     > > Keith.
> > >     > >
> > >     > > --
> > >     > > Keith Chapman
> > >     > > WSO2 Inc.
> > >     > > Oxygen for Web Services Developers.
> > >     > > http://wso2.org/
> > >     >
> > >
> > >
> > ---------------------------------------------------------------------
> > >     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > >     <ma...@ws.apache.org>
> > >     For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >     <ma...@ws.apache.org>
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Keith Chapman
> > > WSO2 Inc.
> > > Oxygen for Web Services Developers.
> > > http://wso2.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/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
> --
>
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: [AXIS2] Proposal to implement http content negotiation

Posted by keith chapman <ke...@gmail.com>.
Hi all,

I've added Content Negotiation via Accept header to Axis2 in revision
596950. As stated previously this would mean that doing a GET (Just typing
in a URL on the browser) from the browser would result in a SOAP
1.1response cause the browsers accept header  says text/xml.

Do we need a switch in the axis2.xml to control this feature?

Thanks,
Keith.

On Oct 21, 2007 1:21 PM, keith chapman <ke...@gmail.com> wrote:

> Yes they are unaffected as long as they dont send the Accept header (Wich
> clients dont do unless explicitly set)
>
> Thanks,
> Keith.
>
>
> On 10/19/07, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> >
> > However, isn't the answer to Nick's first question yes? That is,
> > existing
> > services which do only SOAP are unaffected by this proposed change.
> >
> > Sanjiva.
> >
> > keith chapman wrote:
> > > Hi Nicholas,
> > >
> > > Yes it will be in effect for all application (Subjected to the fact
> > that
> > > it sends an Accept header). If the client does not send an Accept
> > header
> > > then everything will be as it used to be. But as Glen suggested we
> > could
> > > have a switch to turn this feature off.
> > >
> > > Thanks,
> > > Keith.
> > >
> > > On 10/19/07, *Nicholas L Gallardo* <nlgallar@us.ibm.com
> > > <mailto:nlgallar@us.ibm.com >> wrote:
> > >
> > >     Glen,
> > >
> > >     >  If the request is SOAP 1.1, we should always return SOAP 1.1
> > >     regardless
> > >     >  of the Accept header, right?
> > >
> > >     That's my understanding. I believe this is addressed in the SOAP
> > 1.2
> > >     spec as to what constitutes a mismatch error and what kinds of
> > >     responses can go back.
> > >
> > >     Would this leave the existing behavior unchanged for services that
> > >     declare an explicit SOAP binding in a WSDL? In other words, does
> > >     this just apply to endpoints choosing to leverage a RESTful
> > >     pattern/API, or will all applications be subject to negotiation?
> > >
> > >     -Nick
> > >
> > >
> > >
> > >     Inactive hide details for Glen Daniels < glen@thoughtcraft.com
> > >Glen
> > >     Daniels < glen@thoughtcraft.com <mailto:glen@thoughtcraft.com >>
> > >
> > >
> > >                             *Glen Daniels <glen@thoughtcraft.com
> > >                             <mailto: glen@thoughtcraft.com>>*
> > >
> > >                             10/18/2007 05:41 AM
> > >                             Please respond to
> > >                             axis-dev@ws.apache.org
> > >                             <ma...@ws.apache.org>
> > >
> > >
> > >
> > >     To
> > >
> > >     axis-dev@ws.apache.org <ma...@ws.apache.org>
> > >
> > >     cc
> > >
> > >
> > >     Subject
> > >
> > >     Re: [AXIS2] Proposal to implement http content negotiation
> > >
> > >
> > >
> > >
> > >
> > >     Hi folks:
> > >
> > >     +1 from me *if* we make sure there's a flag to allow people to
> > control
> > >     whether a given operation supports POX or not.  Essentially I'm
> > just
> > >     saying we should backport the SOAP-Response MEP to SOAP 1.1, and
> > allow
> > >     the user to specify.  By default the behavior should be as in
> > Keith's
> > >     proposal, but if they indicate that a particular operation is
> > using the
> > >     SOAP-Response MEP (this could also be a disablePOX flag or
> > >     whatever), it
> > >     should always return SOAP on a GET.
> > >
> > >     Also...
> > >
> > >     > > a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> > >     > > response will be went only when the request is SOAP 1.1 and
> > there is
> > >     > > no matching value in the Accept header).
> > >
> > >     If the request is SOAP 1.1, we should always return SOAP 1.1regardless
> > >     of the Accept header, right?
> > >
> > >     --Glen
> > >
> > >     Sanjiva Weerawarana wrote:
> > >     >  +1 from me.
> > >     >
> > >     >  For some further discussion on this see [1]. In particular [2]
> > gives
> > >     >  rationale for why its ok to give more weight to POX over SOAP
> > 1.1.
> > >     >
> > >     >  Sanjiva.
> > >     >  [1]
> > >
> > http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> > >     <http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> > >
> > >     >  [2]
> > >     http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
> > >     <http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
> > >
> > >     >
> > >     >  keith chapman wrote:
> > >     > > Hi Devs,
> > >     > >
> > >     > > There have been some thought on http content negotiation. With
> > the
> > >     > > concept of builders and formatters we have now this could be
> > >     > > implemented trivially. The idea is to use the "Accept" http
> > >     header to
> > >     > > serve the response requested by the client. While going
> > through this
> > >     > > though I came across a issue though. This occurs when a
> > request is
> > >     > > sent via a GET using a browser (Cause the browser
> > automatically adds
> > >     > > the Accept http header). The Accept header sent by firefox is
> > >     "Accept:
> > >     > >
> > >     text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> > ,text/plain;q=0.8,image/png,*/*;q=0.5".
> > >
> > >     > > The confusion comes in because text/xml is used for both SOAP
> > and
> > >     REST
> > >     > > responses.
> > >     > >
> > >     > > I believe having http content negotiation as a feature will be
> > a
> > >     nice
> > >     > > addition to Axis2. And I propose that we treat text/xml as a
> > REST
> > >     > > response in implementing this. This would mean that you cannot
> > >     ask for
> > >     > > a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> > >     > > response will be went only when the request is SOAP 1.1 and
> > there is
> > >     > > no matching value in the Accept header).
> > >     > >
> > >     > > What do u think? Should we go ahead and implement this
> > proposal?
> > >     > >
> > >     > > Thanks,
> > >     > > Keith.
> > >     > >
> > >     > > --
> > >     > > Keith Chapman
> > >     > > WSO2 Inc.
> > >     > > Oxygen for Web Services Developers.
> > >     > > http://wso2.org/
> > >     >
> > >
> > >
> > ---------------------------------------------------------------------
> > >     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > >     <ma...@ws.apache.org>
> > >     For additional commands, e-mail: axis-dev-help@ws.apache.org
> > >     <ma...@ws.apache.org>
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Keith Chapman
> > > WSO2 Inc.
> > > Oxygen for Web Services Developers.
> > > http://wso2.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/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-dev-help@ws.apache.org
> >
> >
>
>
> --
>
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: [AXIS2] Proposal to implement http content negotiation

Posted by keith chapman <ke...@gmail.com>.
Yes they are unaffected as long as they dont send the Accept header (Wich
clients dont do unless explicitly set)

Thanks,
Keith.

On 10/19/07, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
>
> However, isn't the answer to Nick's first question yes? That is, existing
> services which do only SOAP are unaffected by this proposed change.
>
> Sanjiva.
>
> keith chapman wrote:
> > Hi Nicholas,
> >
> > Yes it will be in effect for all application (Subjected to the fact that
> > it sends an Accept header). If the client does not send an Accept header
> > then everything will be as it used to be. But as Glen suggested we could
> > have a switch to turn this feature off.
> >
> > Thanks,
> > Keith.
> >
> > On 10/19/07, *Nicholas L Gallardo* <nlgallar@us.ibm.com
> > <ma...@us.ibm.com>> wrote:
> >
> >     Glen,
> >
> >     >  If the request is SOAP 1.1, we should always return SOAP 1.1
> >     regardless
> >     >  of the Accept header, right?
> >
> >     That's my understanding. I believe this is addressed in the SOAP 1.2
> >     spec as to what constitutes a mismatch error and what kinds of
> >     responses can go back.
> >
> >     Would this leave the existing behavior unchanged for services that
> >     declare an explicit SOAP binding in a WSDL? In other words, does
> >     this just apply to endpoints choosing to leverage a RESTful
> >     pattern/API, or will all applications be subject to negotiation?
> >
> >     -Nick
> >
> >
> >
> >     Inactive hide details for Glen Daniels <gl...@thoughtcraft.com>Glen
> >     Daniels < glen@thoughtcraft.com <ma...@thoughtcraft.com>>
> >
> >
> >                             *Glen Daniels <glen@thoughtcraft.com
> >                             <ma...@thoughtcraft.com>>*
> >
> >                             10/18/2007 05:41 AM
> >                             Please respond to
> >                             axis-dev@ws.apache.org
> >                             <ma...@ws.apache.org>
> >
> >
> >
> >     To
> >
> >     axis-dev@ws.apache.org <ma...@ws.apache.org>
> >
> >     cc
> >
> >
> >     Subject
> >
> >     Re: [AXIS2] Proposal to implement http content negotiation
> >
> >
> >
> >
> >
> >     Hi folks:
> >
> >     +1 from me *if* we make sure there's a flag to allow people to
> control
> >     whether a given operation supports POX or not.  Essentially I'm just
> >     saying we should backport the SOAP-Response MEP to SOAP 1.1, and
> allow
> >     the user to specify.  By default the behavior should be as in
> Keith's
> >     proposal, but if they indicate that a particular operation is using
> the
> >     SOAP-Response MEP (this could also be a disablePOX flag or
> >     whatever), it
> >     should always return SOAP on a GET.
> >
> >     Also...
> >
> >     > > a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> >     > > response will be went only when the request is SOAP 1.1 and
> there is
> >     > > no matching value in the Accept header).
> >
> >     If the request is SOAP 1.1, we should always return SOAP 1.1regardless
> >     of the Accept header, right?
> >
> >     --Glen
> >
> >     Sanjiva Weerawarana wrote:
> >     >  +1 from me.
> >     >
> >     >  For some further discussion on this see [1]. In particular [2]
> gives
> >     >  rationale for why its ok to give more weight to POX over SOAP 1.1
> .
> >     >
> >     >  Sanjiva.
> >     >  [1]
> >
> http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> >     <
> http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473>
> >     >  [2]
> >     http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
> >     <http://wso2.org/mailarchive/registry-dev/2007-October/000540.html>
> >     >
> >     >  keith chapman wrote:
> >     > > Hi Devs,
> >     > >
> >     > > There have been some thought on http content negotiation. With
> the
> >     > > concept of builders and formatters we have now this could be
> >     > > implemented trivially. The idea is to use the "Accept" http
> >     header to
> >     > > serve the response requested by the client. While going through
> this
> >     > > though I came across a issue though. This occurs when a request
> is
> >     > > sent via a GET using a browser (Cause the browser automatically
> adds
> >     > > the Accept http header). The Accept header sent by firefox is
> >     "Accept:
> >     > >
> >     text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> ,text/plain;q=0.8,image/png,*/*;q=0.5".
> >
> >     > > The confusion comes in because text/xml is used for both SOAP
> and
> >     REST
> >     > > responses.
> >     > >
> >     > > I believe having http content negotiation as a feature will be a
> >     nice
> >     > > addition to Axis2. And I propose that we treat text/xml as a
> REST
> >     > > response in implementing this. This would mean that you cannot
> >     ask for
> >     > > a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> >     > > response will be went only when the request is SOAP 1.1 and
> there is
> >     > > no matching value in the Accept header).
> >     > >
> >     > > What do u think? Should we go ahead and implement this proposal?
> >     > >
> >     > > Thanks,
> >     > > Keith.
> >     > >
> >     > > --
> >     > > Keith Chapman
> >     > > WSO2 Inc.
> >     > > Oxygen for Web Services Developers.
> >     > > http://wso2.org/
> >     >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-dev-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
> >
> >
> >
> >
> > --
> > Keith Chapman
> > WSO2 Inc.
> > Oxygen for Web Services Developers.
> > http://wso2.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/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: [AXIS2] Proposal to implement http content negotiation

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
However, isn't the answer to Nick's first question yes? That is, existing 
services which do only SOAP are unaffected by this proposed change.

Sanjiva.

keith chapman wrote:
> Hi Nicholas,
> 
> Yes it will be in effect for all application (Subjected to the fact that 
> it sends an Accept header). If the client does not send an Accept header 
> then everything will be as it used to be. But as Glen suggested we could 
> have a switch to turn this feature off.
> 
> Thanks,
> Keith.
> 
> On 10/19/07, *Nicholas L Gallardo* <nlgallar@us.ibm.com 
> <ma...@us.ibm.com>> wrote:
> 
>     Glen,
> 
>     >  If the request is SOAP 1.1, we should always return SOAP 1.1
>     regardless
>     >  of the Accept header, right?
> 
>     That's my understanding. I believe this is addressed in the SOAP 1.2
>     spec as to what constitutes a mismatch error and what kinds of
>     responses can go back.
> 
>     Would this leave the existing behavior unchanged for services that
>     declare an explicit SOAP binding in a WSDL? In other words, does
>     this just apply to endpoints choosing to leverage a RESTful
>     pattern/API, or will all applications be subject to negotiation?
> 
>     -Nick
> 
> 
> 
>     Inactive hide details for Glen Daniels <gl...@thoughtcraft.com>Glen
>     Daniels < glen@thoughtcraft.com <ma...@thoughtcraft.com>>
> 
> 
>                             *Glen Daniels <glen@thoughtcraft.com
>                             <ma...@thoughtcraft.com>>*
> 
>                             10/18/2007 05:41 AM
>                             Please respond to
>                             axis-dev@ws.apache.org
>                             <ma...@ws.apache.org>
> 
>     	
> 
>     To
>     	
>     axis-dev@ws.apache.org <ma...@ws.apache.org>
> 
>     cc
>     	
> 
>     Subject
>     	
>     Re: [AXIS2] Proposal to implement http content negotiation
> 
>     	
> 
> 
> 
>     Hi folks:
> 
>     +1 from me *if* we make sure there's a flag to allow people to control
>     whether a given operation supports POX or not.  Essentially I'm just
>     saying we should backport the SOAP-Response MEP to SOAP 1.1, and allow
>     the user to specify.  By default the behavior should be as in Keith's
>     proposal, but if they indicate that a particular operation is using the
>     SOAP-Response MEP (this could also be a disablePOX flag or
>     whatever), it
>     should always return SOAP on a GET.
> 
>     Also...
> 
>     > > a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
>     > > response will be went only when the request is SOAP 1.1 and there is
>     > > no matching value in the Accept header).
> 
>     If the request is SOAP 1.1, we should always return SOAP 1.1 regardless
>     of the Accept header, right?
> 
>     --Glen
> 
>     Sanjiva Weerawarana wrote:
>     >  +1 from me.
>     >
>     >  For some further discussion on this see [1]. In particular [2] gives
>     >  rationale for why its ok to give more weight to POX over SOAP 1.1.
>     >
>     >  Sanjiva.
>     >  [1]
>     http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
>     <http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473>
>     >  [2]
>     http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
>     <http://wso2.org/mailarchive/registry-dev/2007-October/000540.html>
>     >
>     >  keith chapman wrote:
>     > > Hi Devs,
>     > >
>     > > There have been some thought on http content negotiation. With the
>     > > concept of builders and formatters we have now this could be
>     > > implemented trivially. The idea is to use the "Accept" http
>     header to
>     > > serve the response requested by the client. While going through this
>     > > though I came across a issue though. This occurs when a request is
>     > > sent via a GET using a browser (Cause the browser automatically adds
>     > > the Accept http header). The Accept header sent by firefox is
>     "Accept:
>     > >
>     text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5".
>      
>     > > The confusion comes in because text/xml is used for both SOAP and
>     REST
>     > > responses.
>     > >
>     > > I believe having http content negotiation as a feature will be a
>     nice
>     > > addition to Axis2. And I propose that we treat text/xml as a REST
>     > > response in implementing this. This would mean that you cannot
>     ask for
>     > > a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
>     > > response will be went only when the request is SOAP 1.1 and there is
>     > > no matching value in the Accept header).
>     > >
>     > > What do u think? Should we go ahead and implement this proposal?
>     > >
>     > > Thanks,
>     > > Keith.
>     > >
>     > > --
>     > > Keith Chapman
>     > > WSO2 Inc.
>     > > Oxygen for Web Services Developers.
>     > > http://wso2.org/
>     >
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-dev-help@ws.apache.org
>     <ma...@ws.apache.org>
> 
> 
> 
> 
> 
> 
> -- 
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.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/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [AXIS2] Proposal to implement http content negotiation

Posted by keith chapman <ke...@gmail.com>.
Hi Nicholas,

Yes it will be in effect for all application (Subjected to the fact that it
sends an Accept header). If the client does not send an Accept header then
everything will be as it used to be. But as Glen suggested we could have a
switch to turn this feature off.

Thanks,
Keith.

On 10/19/07, Nicholas L Gallardo <nl...@us.ibm.com> wrote:
>
> Glen,
>
> > If the request is SOAP 1.1, we should always return SOAP 1.1 regardless
> > of the Accept header, right?
>
> That's my understanding. I believe this is addressed in the SOAP 1.2 spec
> as to what constitutes a mismatch error and what kinds of responses can go
> back.
>
> Would this leave the existing behavior unchanged for services that declare
> an explicit SOAP binding in a WSDL? In other words, does this just apply to
> endpoints choosing to leverage a RESTful pattern/API, or will all
> applications be subject to negotiation?
>
> -Nick
>
>
>
> [image: Inactive hide details for Glen Daniels <gl...@thoughtcraft.com>]Glen
> Daniels <gl...@thoughtcraft.com>
>
>
>
>     *Glen Daniels <gl...@thoughtcraft.com>*
>
>             10/18/2007 05:41 AM Please respond to
>             axis-dev@ws.apache.org
>
>
> To
>
> axis-dev@ws.apache.org
> cc
>
>
> Subject
>
> Re: [AXIS2] Proposal to implement http content negotiation
>
>
> Hi folks:
>
> +1 from me *if* we make sure there's a flag to allow people to control
> whether a given operation supports POX or not.  Essentially I'm just
> saying we should backport the SOAP-Response MEP to SOAP 1.1, and allow
> the user to specify.  By default the behavior should be as in Keith's
> proposal, but if they indicate that a particular operation is using the
> SOAP-Response MEP (this could also be a disablePOX flag or whatever), it
> should always return SOAP on a GET.
>
> Also...
>
> >> a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> >> response will be went only when the request is SOAP 1.1 and there is
> >> no matching value in the Accept header).
>
> If the request is SOAP 1.1, we should always return SOAP 1.1 regardless
> of the Accept header, right?
>
> --Glen
>
> Sanjiva Weerawarana wrote:
> > +1 from me.
> >
> > For some further discussion on this see [1]. In particular [2] gives
> > rationale for why its ok to give more weight to POX over SOAP 1.1.
> >
> > Sanjiva.
> > [1]
> http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> > [2] http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
> >
> > keith chapman wrote:
> >> Hi Devs,
> >>
> >> There have been some thought on http content negotiation. With the
> >> concept of builders and formatters we have now this could be
> >> implemented trivially. The idea is to use the "Accept" http header to
> >> serve the response requested by the client. While going through this
> >> though I came across a issue though. This occurs when a request is
> >> sent via a GET using a browser (Cause the browser automatically adds
> >> the Accept http header). The Accept header sent by firefox is "Accept:
> >> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> ,text/plain;q=0.8,image/png,*/*;q=0.5".
> >> The confusion comes in because text/xml is used for both SOAP and REST
> >> responses.
> >>
> >> I believe having http content negotiation as a feature will be a nice
> >> addition to Axis2. And I propose that we treat text/xml as a REST
> >> response in implementing this. This would mean that you cannot ask for
> >> a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
> >> response will be went only when the request is SOAP 1.1 and there is
> >> no matching value in the Accept header).
> >>
> >> What do u think? Should we go ahead and implement this proposal?
> >>
> >> Thanks,
> >> Keith.
> >>
> >> --
> >> Keith Chapman
> >> WSO2 Inc.
> >> Oxygen for Web Services Developers.
> >> http://wso2.org/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: [AXIS2] Proposal to implement http content negotiation

Posted by Nicholas L Gallardo <nl...@us.ibm.com>.
Glen,

> If the request is SOAP 1.1, we should always return SOAP 1.1 regardless
> of the Accept header, right?

That's my understanding.  I believe this is addressed in the SOAP 1.2 spec
as to what constitutes a mismatch error and what kinds of responses can go
back.

Would this leave the existing behavior unchanged for services that declare
an explicit SOAP binding in a WSDL?  In other words, does this just apply
to endpoints choosing to leverage a RESTful pattern/API, or will all
applications be subject to negotiation?

-Nick





                                                                           
             Glen Daniels                                                  
             <glen@thoughtcraf                                             
             t.com>                                                     To 
                                       axis-dev@ws.apache.org              
             10/18/2007 05:41                                           cc 
             AM                                                            
                                                                   Subject 
                                       Re: [AXIS2] Proposal to implement   
             Please respond to         http content negotiation            
             axis-dev@ws.apach                                             
                   e.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           





Hi folks:

+1 from me *if* we make sure there's a flag to allow people to control
whether a given operation supports POX or not.  Essentially I'm just
saying we should backport the SOAP-Response MEP to SOAP 1.1, and allow
the user to specify.  By default the behavior should be as in Keith's
proposal, but if they indicate that a particular operation is using the
SOAP-Response MEP (this could also be a disablePOX flag or whatever), it
should always return SOAP on a GET.

Also...

 >> a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
 >> response will be went only when the request is SOAP 1.1 and there is
 >> no matching value in the Accept header).

If the request is SOAP 1.1, we should always return SOAP 1.1 regardless
of the Accept header, right?

--Glen

Sanjiva Weerawarana wrote:
> +1 from me.
>
> For some further discussion on this see [1]. In particular [2] gives
> rationale for why its ok to give more weight to POX over SOAP 1.1.
>
> Sanjiva.
> [1] http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> [2] http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
>
> keith chapman wrote:
>> Hi Devs,
>>
>> There have been some thought on http content negotiation. With the
>> concept of builders and formatters we have now this could be
>> implemented trivially. The idea is to use the "Accept" http header to
>> serve the response requested by the client. While going through this
>> though I came across a issue though. This occurs when a request is
>> sent via a GET using a browser (Cause the browser automatically adds
>> the Accept http header). The Accept header sent by firefox is "Accept:
>> text/xml,application/xml,application/xhtml
+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5".
>> The confusion comes in because text/xml is used for both SOAP and REST
>> responses.
>>
>> I believe having http content negotiation as a feature will be a nice
>> addition to Axis2. And I propose that we treat text/xml as a REST
>> response in implementing this. This would mean that you cannot ask for
>> a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
>> response will be went only when the request is SOAP 1.1 and there is
>> no matching value in the Accept header).
>>
>> What do u think? Should we go ahead and implement this proposal?
>>
>> Thanks,
>> Keith.
>>
>> --
>> Keith Chapman
>> WSO2 Inc.
>> Oxygen for Web Services Developers.
>> http://wso2.org/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [AXIS2] Proposal to implement http content negotiation

Posted by Glen Daniels <gl...@thoughtcraft.com>.
Hi folks:

+1 from me *if* we make sure there's a flag to allow people to control 
whether a given operation supports POX or not.  Essentially I'm just 
saying we should backport the SOAP-Response MEP to SOAP 1.1, and allow 
the user to specify.  By default the behavior should be as in Keith's 
proposal, but if they indicate that a particular operation is using the 
SOAP-Response MEP (this could also be a disablePOX flag or whatever), it 
should always return SOAP on a GET.

Also...

 >> a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1
 >> response will be went only when the request is SOAP 1.1 and there is
 >> no matching value in the Accept header).

If the request is SOAP 1.1, we should always return SOAP 1.1 regardless 
of the Accept header, right?

--Glen

Sanjiva Weerawarana wrote:
> +1 from me.
> 
> For some further discussion on this see [1]. In particular [2] gives 
> rationale for why its ok to give more weight to POX over SOAP 1.1.
> 
> Sanjiva.
> [1] http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
> [2] http://wso2.org/mailarchive/registry-dev/2007-October/000540.html
> 
> keith chapman wrote:
>> Hi Devs,
>>
>> There have been some thought on http content negotiation. With the 
>> concept of builders and formatters we have now this could be 
>> implemented trivially. The idea is to use the "Accept" http header to 
>> serve the response requested by the client. While going through this 
>> though I came across a issue though. This occurs when a request is 
>> sent via a GET using a browser (Cause the browser automatically adds 
>> the Accept http header). The Accept header sent by firefox is "Accept: 
>> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5".  
>> The confusion comes in because text/xml is used for both SOAP and REST 
>> responses.
>>
>> I believe having http content negotiation as a feature will be a nice 
>> addition to Axis2. And I propose that we treat text/xml as a REST 
>> response in implementing this. This would mean that you cannot ask for 
>> a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1 
>> response will be went only when the request is SOAP 1.1 and there is 
>> no matching value in the Accept header).
>>
>> What do u think? Should we go ahead and implement this proposal?
>>
>> Thanks,
>> Keith.
>>
>> -- 
>> Keith Chapman
>> WSO2 Inc.
>> Oxygen for Web Services Developers.
>> http://wso2.org/
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [AXIS2] Proposal to implement http content negotiation

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
+1 from me.

For some further discussion on this see [1]. In particular [2] gives 
rationale for why its ok to give more weight to POX over SOAP 1.1.

Sanjiva.
[1] http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473
[2] http://wso2.org/mailarchive/registry-dev/2007-October/000540.html

keith chapman wrote:
> Hi Devs,
> 
> There have been some thought on http content negotiation. With the 
> concept of builders and formatters we have now this could be implemented 
> trivially. The idea is to use the "Accept" http header to serve the 
> response requested by the client. While going through this though I came 
> across a issue though. This occurs when a request is sent via a GET 
> using a browser (Cause the browser automatically adds the Accept http 
> header). The Accept header sent by firefox is "Accept: 
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5".  
> The confusion comes in because text/xml is used for both SOAP and REST 
> responses.
> 
> I believe having http content negotiation as a feature will be a nice 
> addition to Axis2. And I propose that we treat text/xml as a REST 
> response in implementing this. This would mean that you cannot ask for a 
> SOAP 1.1 response uaing http content negotiation (A SOAP 1.1 response 
> will be went only when the request is SOAP 1.1 and there is no matching 
> value in the Accept header).
> 
> What do u think? Should we go ahead and implement this proposal?
> 
> Thanks,
> Keith.
> 
> -- 
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.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/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [AXIS2] Proposal to implement http content negotiation

Posted by Paul Fremantle <pz...@gmail.com>.
Keith

I agree that if I do a GET I  want to get back plain ole XML and not SOAP1.1.
Since the model you are proposing also supports GET returning SOAP 1.2 (with
the appropriate Accept header), I think this works just fine.

+1

Paul

On 10/17/07, keith chapman <ke...@gmail.com> wrote:
>
> Hi Devs,
>
> There have been some thought on http content negotiation. With the concept
> of builders and formatters we have now this could be implemented trivially.
> The idea is to use the "Accept" http header to serve the response requested
> by the client. While going through this though I came across a issue though.
> This occurs when a request is sent via a GET using a browser (Cause the
> browser automatically adds the Accept http header). The Accept header sent
> by firefox is "Accept:
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> ,text/plain;q=0.8,image/png,*/*;q=0.5".  The confusion comes in because
> text/xml is used for both SOAP and REST responses.
>
> I believe having http content negotiation as a feature will be a nice
> addition to Axis2. And I propose that we treat text/xml as a REST response
> in implementing this. This would mean that you cannot ask for a SOAP 1.1response uaing http content negotiation (A SOAP
> 1.1 response will be went only when the request is SOAP 1.1 and there is
> no matching value in the Accept header).
>
> What do u think? Should we go ahead and implement this proposal?
>
> Thanks,
> Keith.
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/




-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com