Actually there is something funny going wrong with the JSON
emitted by the JAXRS process. This was just a dummy service to
see the output format:
@GET
@Path("get/{clientId}")
@ProduceMime("application/json")
public CrystalParameters dummy(@UriParam("clientId") String id, @HttpContext
UriInfo info) {
CrystalParameters cpn = new CrystalParameters();
MachineData md = new MachineData();
md.setWavelength(0.7);
md.setD2x(new double[] {1.0,0,0,0,1.0,0,0,0,1.});
md.setBottomOffset(50.);md.setUpperOffset(50.);
md.setLeftOffset(50.); md.setRightOffset(50.);
cpn.setMachineData(md);
return cpn;
}
When I did a wget on this service it gave me JSON:
{"CrystalParameters":{"machineData":{"bottomOffset":50,"d2x":
[1,0,0,0,1,0,0,0,1,50,50,50,0.7]}}}
the XML precursor was, from my previous email:
<machineData><bottomOffset>50.0</bottomOffset>
<d2x>1.0</d2x><d2x>0.0</d2x><d2x>0.0</d2x><d2x>0.0</d2x><d2x>1.0</d2x>
<d2x>0.0</d2x><d2x>0.0</d2x><d2x>0.0</d2x><d2x>1.0</d2x>
<leftOffset>50.0</leftOffset><rightOffset>50.0</rightOffset>
<upperOffset>50.0</upperOffset><wavelength>0.7</wavelength>
</machineData>
i.e., the d2x array soaked up all trailing MachineData bean parameters
in the emitted JSON representation.
So unless there is some JAXB annotation stuff for arrays in java beans,
I'm guessing both the in and out JSON to XML JAXRS convertors may be broken?
Thanks for any info.
Doug