[Registry-dev] Accept types and dynamic response formulation
Sanjiva Weerawarana
sanjiva at wso2.com
Sat Oct 20 01:41:07 PDT 2007
Yes.
Sanjiva.
Jonathan Marsh wrote:
> Does Axis2 currently ignore the Accept header when receiving a message
> without a SOAP envelope? (SOAP Response MEP)
>
> Jonathan Marsh - http://www.wso2.com - http://auburnmarshes.spaces.live.com
>
>
>> -----Original Message-----
>> From: registry-dev-bounces at wso2.org [mailto:registry-dev-
>> bounces at wso2.org] On Behalf Of Keith Chapman
>> Sent: Wednesday, October 17, 2007 7:49 PM
>> To: registry-dev at wso2.org
>> Subject: Re: [Registry-dev] Accept types and dynamic response
>> formulation
>>
>> Sanjiva Weerawarana wrote:
>>> :) I like the penalty box model .. please help Keith out on axis-dev
>>> when he posts it there! (Or Keith you can point to this thread ..
>>> might be a better way!)
>> I already dropped a proposal to the axis-dev list...
>>
>> Thanks,
>> Keith.
>>> Sanjiva.
>>>
>>> Jonathan Marsh wrote:
>>>> If we have to, though I don't like it much and it weakens the
>> principle
>>>> involved, which is to use the media type system in the most simple
>> and
>>>> direct way we can when we're playing REST. The ambiguity that
>> text/xml
>>>> could describe either an XML document or that XML document wrapped
>> in
>>>> a SOAP
>>>> 1.1 envelope (or any other kind of wrapper) makes the solution
>> tricky.
>>>> Occam's razor would suggest that text/xml represents the simplest
>>>> alternative - the bare payload. If in some circumstances it
>> represents
>>>> something else (SOAP 1.1) and the fact that those circumstances
>> aren't
>>>> externally visible, loses some of the simplicity of the proposal.
>>>>
>>>> In the end, we're trying to use (not abuse) media types. If SOAP
>> 1.1
>>>> wanted
>>>> special treatment within the media type system it should have
>> defined a
>>>> separate media type. I think it's reasonable to send SOAP 1.1 to
>> the
>>>> penalty box for that violation when we're playing a REST tournament.
>> I
>>>> think the overlap between the community of SOAP 1.1 groupies and
>> REST
>>>> groupies is necessarily small (those who can live happily with
>> cognitive
>>>> dissonance) and therefore don't see much hope of keeping both sets
>>>> happy.
>>>>
>>>> Jonathan Marsh - http://www.wso2.com -
>>>> http://auburnmarshes.spaces.live.com
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: registry-dev-bounces at wso2.org [mailto:registry-dev-
>>>>> bounces at wso2.org] On Behalf Of Glen Daniels
>>>>> Sent: Wednesday, October 17, 2007 12:50 PM
>>>>> To: registry-dev at wso2.org
>>>>> Subject: Re: [Registry-dev] Accept types and dynamic response
>>>>> formulation
>>>>>
>>>>> Sanjiva Weerawarana wrote:
>>>>>> You'll have to ask on axis-dev and see whether people object. IMO
>> its
>>>>> a
>>>>>> decent compromise but there are more SOAP 1.1 fans on that list
>> than
>>>>> here!
>>>>>
>>>>> +1 from me for both the proposed solution and asking about it on
>>>>> axis-dev first.
>>>>>
>>>>> There is still a switch I can use in service.xml to disable POX for
>> a
>>>>> service/operation, right? So if I set that then I always get SOAP
>> on a
>>>>> GET?
>>>>>
>>>>> --Glen
>>>>>
>>>>>> Keith Chapman wrote:
>>>>>>> Sanjiva Weerawarana wrote:
>>>>>>>> +1 for forgetting SOAP 1.1 and doing it .. .
>>>>>>> Great... Is this solution valid for Axis2 as well? If so I'll go
>>>>> ahead
>>>>>>> and implement this in Axis2. If there are multiple accept headers
>>>>> will
>>>>>>> use the first matching header.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Keith.
>>>>>>>> Sanjiva.
>>>>>>>>
>>>>>>>> Jonathan Marsh wrote:
>>>>>>>>> I'll throw out an idea - text/xml and application/xml would map
>> to
>>>>> POX,
>>>>>>>>> application/soap+xml maps to SOAP 1.2, and we don't provide a
>> way
>>>>> to
>>>>>>>>> do SOAP
>>>>>>>>> 1.1 at this point in the browser. Eventually we could register
>>>>>>>>> "application/data-format+xml" and a request of
>>>>>>>>> "application/data-
>>>>> format+xml;rddl=http://schemas.xmlsoap.org/soap/envelope/r
>>>>>>>>> ddl.html" (is that actually allowed in an accept header?) might
>>>>>>>>> identify
>>>>>>>>> soap 1.1.
>>>>>>>>>
>>>>>>>>> Jonathan Marsh - http://www.wso2.com -
>>>>>>>>> http://auburnmarshes.spaces.live.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: registry-dev-bounces at wso2.org [mailto:registry-dev-
>>>>>>>>>> bounces at wso2.org] On Behalf Of Keith Chapman
>>>>>>>>>> Sent: Wednesday, October 10, 2007 7:31 PM
>>>>>>>>>> To: registry-dev at wso2.org
>>>>>>>>>> Subject: Re: [Registry-dev] Accept types and dynamic response
>>>>>>>>>> formulation
>>>>>>>>>>
>>>>>>>>>> Paul Fremantle wrote:
>>>>>>>>>>> A while back Glen suggested we use Accept headers to
>>>>> automatically
>>>>>>>>>>> send the right thing back to the browser / requester. I was a
>>>>> bit
>>>>>>>>>>> scared of this at the time :)
>>>>>>>>>> While trying to implement content negotiation in Axis2 using
>> the
>>>>>>>>>> Accept
>>>>>>>>>> header I came across the follllowing issue. When a REST call
>>>>> (GET) is
>>>>>>>>>> sent using the browser the Accept header is
>>>>>>>>>>
>>>>>>>>>> "Accept:
>>>>>>>>>>
>> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla
>>>>>>>>>> in;q=0.8,image/png,*/*;q=0.5".
>>>>>>>>>>
>>>>>>>>>> Now what should the response be POX or soap11?
>>>>>>>>>>
>>>>>>>>>> Obviously I'd like to map text/xml to SOAP1.1 and
>> application/xml
>>>>> to
>>>>>>>>>> POX
>>>>>>>>>> but then the above request using the browser would return SOAP
>>>>> 1.1.
>>>>>>>>>> (Which might not be user friendly and may mislead the user).
>>>>>>>>>>
>>>>>>>>>> Due to the above I haven't yet implemented this feature in
>> Axis2.
>>>>> Any
>>>>>>>>>> suggested workarounds or just drop the feature?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Keith.
>>>>>>>>>>> However, I think I'm coming round to this. I guess one of the
>>>>> key
>>>>>>>>>>> RESTful design patterns is to have the web UI the *same*
>> thing
>>>>> as the
>>>>>>>>>>> machine interface. I don't think we are there yet though I
>> guess
>>>>> we
>>>>>>>>>>> are getting closer. I suggest that we bash back and forth
>> some
>>>>> ideas
>>>>>>>>>>> about the exact URI design - in other words, what you see if
>> you
>>>>> go
>>>>>>>>>> to
>>>>>>>>>>> each different URI and what those patterns are. Glen - I
>> think
>>>>> you
>>>>>>>>>>> need to look at the APP spec in detail first.
>>>>>>>>>>>
>>>>>>>>>>> Paul
>>>>> _______________________________________________
>>>>> Registry-dev mailing list
>>>>> Registry-dev at wso2.org
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
>>>>
>>>> _______________________________________________
>>>> Registry-dev mailing list
>>>> Registry-dev at wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
>>>>
>>
>> _______________________________________________
>> Registry-dev mailing list
>> Registry-dev at wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
>
>
> _______________________________________________
> Registry-dev mailing list
> Registry-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/registry-dev
>
--
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
email: sanjiva at wso2.com; cell: +1 650 265 8311 | +94 77 787 6880
"Oxygenating the Web Service Platform."
More information about the Registry-dev
mailing list