axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sagara Gunathunga <>
Subject Re: [GSoC 2012] XML to JSON convention using XMLStreamWriter API and Schemas with google-gson
Date Sat, 14 Jul 2012 07:44:21 GMT
On Sat, Jul 14, 2012 at 12:42 PM, Shameera Rathnayaka
<> wrote:
> Hi devs,
> As Amila(Project mentor) suggested in previous thread[0] , I have
> implemented
> XMLStreamWriter API to use schema of the processing xml and gson together
> to convert XML ---> JSON. I have made my progress up to support xml which
> don't have complex type elements with maxOccur >1,  but may have simple
> type elements with maxOccur >=1 . That means In the JSON point of view, my
> present implementation supports XML --> JSON where there is not any JSON
> Arrays which has JSON objects in the converted JSON String.
> Here is a summary of the implementation.
> GsonXmlStreamWriter which implements XMLStreamWriter has a constructor
> to get JsonWriter and XmlSchema object. Then it process XmlSchema and

Are you plan to process  XmlSchema object with every response ? If so
processing  XmlSchema object will add some overhead and result into
performance.  Axis2 already has JSON support main objective of this
project is to provide a high performance JSON implementation,
processing  XmlSchema object with every response does not help to meet
your expectations. Instead I suggest to process  XmlSchema object only
one-time during the deployment after the AxisService creation and
store result of  XmlSchema processing  with AxisService object as  a
light-weight object ( Let's say a map)   and use this light weight map
with response. In this approach overhead if relatively low.

Thanks !

> use a queue to keep the schema structure. At the moment i have only
> implemented
> writeStartElement(String localName) , writeCharaters(String text) ,
> writeEndElement()
> and writeEndDocument() functions. I am processing the queue which has
> the schema structure and put it to another stack to identify the scope of
> end elements.
> I am now working on, improving this to support xml which has complex type
> elements
>  with maxOccour > 1 . I'll keep updating my progress mean while.
> Thanks,
> Shameera.
> --
> Shameera Rathnayaka
> Undergraduate
> Department of Computer Science and Engineering
> University of Moratuwa.
> Sri Lanka.
> Blog :

Sagara Gunathunga

Blog      -
Web      -
LinkedIn -

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message