| Issue 19: | Problem parsing JSON request | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Sending JSON Object
{"result":{"request":{"Instrument":"instrument1","Results":[{"ID":"08970001","MethodID":"08970001","OperationNo":1,"OrderID":"000000052","ReplicationNo":1,"SampleNo":1,"Unit":"","Value":"farblos"},{"ID":"08970002","MethodID":"08970001","OperationNo":1,"OrderID":"000000052","ReplicationNo":1,"SampleNo":1,"Unit":"","Value":"ohne Geruch"},{"ID":"08970021","MethodID":"08970001","OperationNo":1,"OrderID":"000000052","ReplicationNo":1,"SampleNo":1,"Unit":"","Value":"10.150000"},{"ID":"08970022","MethodID":"08970001","OperationNo":1,"OrderID":"000000052","ReplicationNo":1,"SampleNo":1,"Unit":"°C","Value":"42.000000"},{"ID":"08970023","MethodID":"08970001","OperationNo":1,"OrderID":"000000052","ReplicationNo":1,"SampleNo":1,"Unit":"%","Value":"9.900000"},{"ID":"08970091","MethodID":"08970001","OperationNo":1,"OrderID":"000000052","ReplicationNo":1,"SampleNo":1,"Unit":"","Value":"n.b."}],"SessionID":"6db17089b6f44deaf6fd8508b3748b7c"}}}
2. getting 500 ERROR
{"statusFlag":false,"fault":{"code":"CLIENT","detail":{},"localizedMessage":"Couldn't create SOAP message due to exception: com.jaxws.json.codec.JSONFault: Failed to create message body.null","message":"Couldn't create SOAP message due to exception: com.jaxws.json.codec.JSONFault: Failed to create message body.null"}}
3. the problem might be that "Results" and "Instrument" are mapped to the same HashValue
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
version 0.7, Windows XP
Please provide any additional information below.
The Exception is thrown in JSONDecoder line 196
Aug 26, 2011
Project Member
#1
sundaram...@gmail.com
Aug 26, 2011
Hi, You do a great job with json transporting jax-ws webservices, Thanx a lot. Attached you will find the wsdl and xsd file used to generate the Java Objects with ws-import.
Aug 26, 2011
some more information:
all the other four methods work fine, only the result method gets a null
pointer Exception in MessageBodyBuilder line 139.
The other methods have a simple list of parameters, but this method has one
parameter ("Results") that is an Array of Objects. I attach you the JSON
objects exchanged with all the methods. By the way - the soap junit test
works fine
Aug 26, 2011
Can you please attach the xsd or add the extract from xsd. I don't find it in previous reply. Thanks for reporting and helping to improve the project.
Aug 28, 2011
sorry, the e-mail attached files did not find their way into this issue. Here they are
Aug 29, 2011
Caused by using camelCase xml element with list. Bug accepted.
Aug 29, 2011
(No comment was entered for this change.)
Status:
Accepted
Aug 29, 2011
unitTest 53 added. |