[Registry-dev] Accept types and dynamic response formulation
Glen Daniels
glen at wso2.com
Wed Oct 17 12:49:42 PDT 2007
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
More information about the Registry-dev
mailing list