NexJ Server Express: JSON Adapter

So my project has now been defined.
I will be working on extending the capabilities of NexJ Express Server: a J2EE server software that provides cost effective services for deploying highly-scalable, fault tolerant, distributed enterprise solutions. The server framework commonly referred to as “OpenCore” makes use of several open source projects like: Jboss, Apache Xalan, Apache Xerces, JavaMail, JMS and others.

So for my project, for the reminder of the summer, I am to develop a JSON Adapter to expose NexJ server Objects in JSON via a RESTful web service. Have a look at the project landing page on CDOT’s wiki.

current implementation:
server/nexj/xml/Person/104C083E8A4E8A4AD2BAF3011B6A393C97

<?xml version="1.0" encoding="utf-8"?>
<_Collection xmlns="http://www.nexj.com/xml" xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns:xi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="http://www.nexj.com/xml">
 xi:type="Person">
 <_version>0</_version>
 <_oid>104C083E8A4E8A4AD2BAF3011B6A393C97</_oid>
 <_keys>primaryTelcom</_keys>
 <_keys>primaryLanguage</_keys>
 <_keys>initials</_keys>
 <_values xi:nil="true"/>
 <_values xi:nil="true"/>
 <_values xi:nil="true"/>
 <lastName>Bar
 <locking>0</locking>
 <firstName>Foo
 <company>
 <_version>0</_version>
 <_oid>10209394A0D92641BC9E0FCF36DDAD1C23</_oid>
 </company>
 </item>
</_Collection>

JSON implementation:
server/nexj/json/Person/104C083E8A4E8A4AD2BAF3011B6A393C97

{
“_Collection”: {
“item”: {
“_keys”: [“primaryTelcom”, “primaryLanguage”, “initials”],
“type”: “Person”,
“locking”: 0,
“_oid”: “104C083E8A4E8A4AD2BAF3011B6A393C97”,
“_version”: 0,
“_values”: [
{“nil”: true},
{“nil”: true},
{“nil”: true}
],
“firstName”: “Foo”,
“company”: {
“_oid”: “10209394A0D92641BC9E0FCF36DDAD1C23”,
“_version”: 0
},
“lastName”: “Bar”
},
}
}

Advertisements
Tagged ,

One thought on “NexJ Server Express: JSON Adapter

  1. […] of my first project at CDOT during which I was first introduced to JSON as I developed the JSON RPC adapter. Some of my earlier work on classes from the RPC adapter in  particular: JSONWriter and JSONParser […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: