Hi, What exact error message do you have? Also please try to send JSON request using Poster plugin in firefox (specify content-type application/json/badgerfish)
From: Hans De Clercq [mailto:[email protected]] Sent: Monday, October 03, 2011 12:41 PM To: [email protected] Subject: Re: [AXIS2] Problem: Sending JSON messages to a SOAP Web service using Axis2 Hi, thanks for the answer. I've built the source file you attached and added it to axis2.xml, but still, the problem remains! Op 29/09/2011 12:06, Hodchenkov, Paul schreef: Hi, Please find the source attached. Compile it and add to axis2.xml instead of default badgerfish builder. From: Hans De Clercq [mailto:[email protected]] Sent: Thursday, September 29, 2011 12:43 PM To: [email protected]<mailto:[email protected]> Subject: Re: [AXIS2] Problem: Sending JSON messages to a SOAP Web service using Axis2 Hi, I suppose you mean JSONBadgerfishOMBuilder ? is it possible to send me a modified jar ? Or explain how I can modify JSONBadgerfishOMBuilder and what the whole processDocument method looks like? Thanks! Op 28/09/2011 15:21, Hodchenkov, Paul schreef: Hi, According to this [1], you can't use JSON with RPCMessageReceiver. I modified JSONBadgerfishBuilder to handle this case by converting JSON/Badgerfish explicitly to SOAP: public OMElement processDocument(InputStream inputStream, String contentType, MessageContext messageContext) throws AxisFault { .... AbstractXMLInputFactory inputFactory = createFactory(); XMLStreamReader xmlReader = inputFactory.createXMLStreamReader( new JSONTokener(IOUtils.toString(reader))); OMNodeEx document = (OMNodeEx) new StAXOMBuilder(xmlReader).getDocumentElement(); //removing parent document.setParent(null); //wrapping document with envelope SOAPFactory soapFactory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope soapEnvelope = soapFactory.getDefaultEnvelope(); SOAPBody body = soapEnvelope.getBody(); body.addChild(document); soapEnvelope.build(); ... } [1] http://isurues.wordpress.com/2009/10/06/how-to-use-axis2-json/ -- [cid:[email protected]] Met vriendelijke groeten I Hans De Clercq I R&D Aristo Music NV I Interleuvenlaan 15 F I B - 3001 Heverlee I + 32 498 301007 I www.tunify.com<http://www.tunify.com/> FOLLOW US ON : [cid:[email protected]]<http://www.twitter.com/tunify> [cid:[email protected]]<http://www.facebook.com/tunify> CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited. If you received this email in error, please notify the sender and delete this email from your system --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected]<mailto:[email protected]> For additional commands, e-mail: [email protected]<mailto:[email protected]> -- [cid:[email protected]] Met vriendelijke groeten I Hans De Clercq I R&D Aristo Music NV I Interleuvenlaan 15 F I B - 3001 Heverlee I + 32 498 301007 I www.tunify.com<http://www.tunify.com/> FOLLOW US ON : [cid:[email protected]]<http://www.twitter.com/tunify> [cid:[email protected]]<http://www.facebook.com/tunify> CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited. If you received this email in error, please notify the sender and delete this email from your system
<<inline: image001.jpg>>
<<inline: image002.gif>>
<<inline: image003.gif>>
