axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "keith chapman" <keithgchap...@gmail.com>
Subject Re: [AXIS2] Should JSON messages be considered as REST?
Date Sun, 21 Sep 2008 17:12:43 GMT
I'm not too familiar with YAML. For what sort of situations is YAML used
for? is it used widely?

Thanks,
Keith.
On Sun, Sep 21, 2008 at 8:25 PM, Martin Gainty <mgainty@hotmail.com> wrote:

>  curious as to when/if a YAML2XML plugin will be available  **?*
> *thanks,*
> *Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>
> ------------------------------
> Date: Sun, 21 Sep 2008 19:31:42 +0530
> From: keithgchapman@gmail.com
> To: axis-dev@ws.apache.org
> Subject: Re: [AXIS2] Should JSON messages be considered as REST?
>
>
> Hi Chinthaka,
>
> See comments inline,
>
> On Sun, Sep 21, 2008 at 12:43 AM, Eran Chinthaka <eran.chinthaka@gmail.com
> > wrote:
>
> Hi Keith and all,
>
> This argument is based on the following assumption ( You know about
> assumptions, if you've watched "Under Siege 2" ;) )
>
> Axis2 REST implementation is based on WSDL 2.0 HTTP Binding. At least this
> was the case, when I was implementing and sorry if the implementation is now
> changed.
>
>
> Nothing has changed with this regard.  ;).
>
>
>
> In the spec, it says, if we have our own custom content-type, then it
> should be compatible with application/xml (
> http://www.w3.org/TR/wsdl20-adjuncts/#_http_ser_xml).
>
>
> I don't think that thats the case. The WSDL 2.0 spec specifies three
> serializations, they are application/x-www-form-urlencoded<http://www.w3.org/TR/wsdl20-adjuncts/#_http_x-www-form-urlencoded>,
> application/xml<http://www.w3.org/TR/wsdl20-adjuncts/#_http_operation_xml_encoding>and
> multipart/form-data<http://www.w3.org/TR/wsdl20-adjuncts/#_http_operation_multipart_encoding>.
> And the area in the spec you have referred to is talking about these three.
> I the section you have referred to the spec says,
>
> "[Definition: The *serialization format* is a media type token
> ("type/subtype"). It identifies rules to serialize the payload in an HTTP
> message. Its value is defined by the following rules. The HTTP request
> serialization format MUST be in the media type range specified by the {http
> input serialization<http://www.w3.org/TR/wsdl20-adjuncts/#property-BindingOperation.httpinputserialization>}
> property. "
>
> So it basically supports any media-Type. Its just that the working group
> took the trouble in describing the three serializations above in detail.
>
>
> Do you think application/json is compatible with application/xml?
>
>
> As long as application/json is a standard I dont see any issues with it.
>
>
>
> I don't think so because in the spec once again it says the following here
> : http://www.w3.org/TR/wsdl20-adjuncts/#_http_operation_xml_encoding
> "The instance data <http://www.w3.org/TR/wsdl20-adjuncts/#instance_data>of the
input, output or fault message is serialized as an
> *XML document* in the message body of the HTTP message" Since JSON
> serialization is not XML, rather name/value pair, application/xml is not
> compatible with application/json.
>
>
> Answered that too above.
>
> Thanks,
> Keith.
>
>
>
>
> So considering JSON messages as REST messages seems to be fundamentally
> wrong.
>
> But since we think (at least I think) JSON is something we should support,
> we should think about supporting content-types which are not compatible with
> SOAP or REST.
>
> Thanks,
> Chinthaka
>
>
> On Wed, Sep 3, 2008 at 11:10 PM, keith chapman <keithgchapman@gmail.com>wrote:
>
> Hi devs,
>
> This idea came up because of the following scenario.
>
> Currently the logic for creating a AxisFault  for a fault received lies in
> org.apache.axis2.util.Utils.java (lines 507 - 530). This works perfectly
> when the received fault is SOAP or REST. But it does not work as expected
> when the response is JSON ( rather a exception is thrown saying "The
> MessageContext does not have an associated SOAPFault."). The reason is the
> logic we use to build the AxisFault. If the fault message is not a SOAP
> message we check for the flag messageContext.isDoingREST() and get the first
> element of the SOAPBody as the fault message.
>
> When the fault message is JSON its neither SOAP and the
> messageContext.isDoingREST() returns false. Should we consider  JSON
> messages as REST messages? I believe so.
>
> WDYT?
>
> Thanks,
> Keith.
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>
>
>
>
> --
> 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
>
> ------------------------------
> See how Windows connects the people, information, and fun that are part of
> your life. See Now<http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/>
>



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

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

Mime
View raw message