IllegalArgumentException with XMLStreamReader2JSON transformer --------------------------------------------------------------
Key: TUSCANY-3908 URL: https://issues.apache.org/jira/browse/TUSCANY-3908 Project: Tuscany Issue Type: Bug Components: Java SCA Integration Tests Affects Versions: Java-SCA-2.x Reporter: Scott Kurz I get this error on what seems like a relatively simple path through the XMLStreamReader2JSON: java.lang.IllegalArgumentException: org.codehaus.jettison.json.JSONException: A JSONObject text must begin with '{' at character 0 of This happens on line 67 of XMLStreamReader2JSON which looks like: return JSONHelper.toJSON(writer.toString(), type); I can see that writer.toString() is returning the empty string. Not sure why. Here is the payload (including wrapper) coming in via binding.ws. Since it's Axis2, we load it as AXIOM and first do an OMElement2XMLStreamReader: <ns2:greetJSON xmlns:ns2="http://intf.privatecopy.itest/"><arg0><firstName>Jason</firstName><lastName>Nosaj</lastName></arg0></ns2:greetJSON> Since JSONDataBinding doesn't provide a wrapper handler, we unwrap first (on the source side), and so the XML being passed to XMLStreamReader2JSON corresponds to: <arg0><firstName>Jason</firstName><lastName>Nosaj</lastName></arg0> Could the problem be that <arg0> is not a schema-declared global element? I'm not too familiar with JSON<->XML. so figured I'd just write this up. not sure when I'd get around to investigating more and maybe someone knows the answer. Thanks, Scott -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira