On Tue, Jul 14, 2009 at 10:46 AM, Coulombe, Greg <[email protected]>wrote:
> Sure. Here is the synapse.xml, axis2.xml is below: > > <definitions xmlns="http://ws.apache.org/ns/synapse"> > <endpoint name="myEndPoint"> > <address uri="http://localhost:8080/myendpoint" > format="rest" /> > </endpoint> > > <proxy name="myProxy" transports="http" startOnLoad="true"> > <target> > <inSequence> > <send> > <endpoint key="myEndPoint" /> > </send> > </inSequence> > <outSequence> > <send/> > </outSequence> > </target> > </proxy> > <sequence name="errorHandler"> > <log level="full" /> > </sequence> > </definitions> > > Snippets from axis2.xml: > > <messageBuilder contentType="*/*" > class="org.apache.axis2.format.BinaryBuilder"/> > ... > <messageFormatter contentType="*/*" > class="org.apache.axis2.format.BinaryFormatter"/> Hi, I am not exactly sure, but I don't think axis2 supports wild cards for the content type when declaring the message builders and formatters :-( So you need to give the exact set of content types that you are expecting to receive. Thanks, Ruwan > > > What should I modify to enable plain text, JSON and binary data to pass > through without change? > > Thanks, > > --GKC > > -----Original Message----- > From: Andreas Veithen [mailto:[email protected]] > Sent: Tuesday, July 14, 2009 12:45 AM > To: [email protected] > Subject: Re: Passing non-XML body content for REST services > > That should be possible. Can you post your synapse.xml file? > > Andreas > > On Mon, Jul 13, 2009 at 13:23, Coulombe, Greg<[email protected]> > wrote: > > Hello, > > > > I am developing some REST services (using the a 1.3 snapshot build of > > synapse) and I'd like to use Synapse to proxy REST service calls that > > return (or accept) non-XML content. How do I configure Synapse to > proxy > > that content without wrapping it in an XML element? The content types > > that I am interested in proxying are JSON and Binary. I have been > > playing with the Axis2 BinaryFormatter and BinaryBuilder and it seems > > close to what I am looking for but not exactly correct: when I call > GET > > against a service that returns a content type of > > application/octet-stream, I get back the binary content but it is MIME > > encoded (I think) in a <binary/> element. Is there a way to configure > > synapse/axis2 to simply pass that binary data through untouched? > > Similarly, I would like to do this with plain text and/or JSON data > too. > > > > Thanks, > > > > Greg Coulombe > > > > > > > -- Ruwan Linton Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb WSO2 Inc.; http://wso2.org email: [email protected]; cell: +94 77 341 3097 blog: http://ruwansblog.blogspot.com
