[ 
https://issues.apache.org/jira/browse/AXIS2-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Isuru Eranga Suriarachchi updated AXIS2-2037:
---------------------------------------------

    Attachment: patch.txt

This is a new patch which is an improved version of implementing support for 
both Badgerfish and Mapped conventions in Axis2. This includes two separate 
integration tests for each of the conventions.

I have kept the Mapped convention as the default json convention in Axis2.

If a user wants to use the Mapped convention, user has to set the message type 
option in message context with the content type he is using.

Eg: options.setProperty(Constants.Configuration.MESSAGE_TYPE, 
"application/json");

Other than this, he has to map that content type with JSONOMBuilder which is 
the OM builder for Mapped convention, in the axis2.xml file.

Eg: <messageBuilder contentType="application/json" 
class="org.apache.axis2.json.JSONOMBuilder"/>

In using Badgerfish, user has to set the message type option in message context 
with the content type he is using.

Eg: options.setProperty(Constants.Configuration.MESSAGE_TYPE, 
"application/json/badgerfish");

Other than this, he has to map that content type with JSONBadgerfishOMBuilder 
which is the OM builder for Badgerfish convention, in the axis2.xml file.

Eg: <messageBuilder contentType="application/json/badgerfish" 
class="org.apache.axis2.json.JSONBadgerfishOMBuilder"/>                 

> Improvement in json support for Axis2
> -------------------------------------
>
>                 Key: AXIS2-2037
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2037
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Isuru Eranga Suriarachchi
>             Fix For: 1.2
>
>         Attachments: patch.txt, patch.txt
>
>
> There are 2 major json conventions available as Badgerfish and Mapped. So far 
> Axis2 supported only Badgerfish. It is bit inconvenient for the javascript 
> users to use Badgerfish formatted json strings. Mapped convention is a good 
> solution for this matter. So in this patch I have implemented support for 
> Mapped convention as well. Here I have used 2 different JSONBuilders and the 
> default one is using Mapped convention.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to