Paul, Are you proposing to modify the axis configuration at the proxy build time to add this entry to the builder and formatter maps? I couldn't think of any other way. Even then we will have to ask user to specify the Builder and Formatter impl to be used with the ContentType they configure. If not provided we can take it as ApplicationXML?
Is that what you mean? Thanks, Ruwan. On Sat, May 10, 2008 at 1:33 PM, Paul Fremantle <[EMAIL PROTECTED]> wrote: > Folks > > What do you think about us adding this into the proxy definition (the > XML type) and automatically configuring Axis2 so that the user doesn't > need to modify the axis2.xml? > > Paul > > > ---------- Forwarded message ---------- > From: Ruwan Linton <[EMAIL PROTECTED]> > Date: Sat, May 10, 2008 at 2:30 AM > Subject: Re: POX proxy with custom Content-Type > To: [EMAIL PROTECTED] > > > Hi Sylvain, > > I am afraid, the property name contentType has to be modified as > ContentType. [first letter capitalized] messageType remains as it is. > > Thanks, > Ruwan > > On Sat, May 10, 2008 at 6:51 AM, Ruwan Linton <[EMAIL PROTECTED]> > wrote: > > > Hi Sylvain, > > > > Please see my comments in-line; > > > > On Fri, May 9, 2008 at 11:55 PM, Sylvain Legault <[EMAIL PROTECTED]> > > wrote: > > > >> Hi, > >> > >> I'm trying to do a simple XML proxy were the contenttype is not > >> application/xml but rather application/vnd.xyz.xml where is xyz may be > few > >> different values but in this case let's assume it is xyz. > >> > >> First I found that I needed to modify my axis2.xml (is there another > >> way?), > >> otherwise I get that the incoming HTTP post is not SOAP and there is no > >> Envelope > > > > > > No there is no other way to tell Synapse that this message has to be > built > > using this message builder. So you have to have that mapping. > > > > > >> <messageFormatters> > >> ::: > >> <messageFormatter contentType="application/vnd.xyzxml" > >> class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/> > >> </messageFormatters> > >> <messageBuilders> > >> ::: > >> <messageBuilder contentType="application/vnd.xyz.xml" > >> class="org.apache.axis2.builder.ApplicationXMLBuilder"/> > >> </messageBuilders> > >> > >> I'm also using the following definition > >> > >> <definitions xmlns="http://ws.apache.org/ns/synapse"> > >> <!-- filtering of messages with XPath and regex matches --> > >> <filter source="get-property('To')" regex=".*/xyz.*"> > > > > <property name="messageType" value="application/vnd.xyzxml" > > scope="axis2"/> > > <property name="contentType" value="application/vnd.xyzxml" > > scope="axis2"/> > > > >> > >> <send> > >> <endpoint> > >> <address uri="*http://10.4.3.110:1563/xyz*" > format="pox"/> > >> </endpoint> > >> </send> > >> <drop/> > >> </filter> > >> <send/> > >> </definitions> > >> > >> My problem is that the message goes thru but ended up on the other side > >> with > >> application/xml. > >> > >> I have also try to create my own java mediator with another definition > but > >> still fails to change the content type and before I go too far I would > >> like > >> to know if anyone had tried it before and how? > > > > > > I have modified the above configuration, and you can try that > > configuration. I think it will work. > > > > Thanks, > > Ruwan > > > > -- > > Ruwan Linton > > http://www.wso2.org - "Oxygenating the Web Services Platform" > > > > > -- > Ruwan Linton > http://www.wso2.org - "Oxygenating the Web Services Platform" > > > > -- > Paul Fremantle > Co-Founder and CTO, WSO2 > Apache Synapse PMC Chair > OASIS WS-RX TC Co-chair > > blog: http://pzf.fremantle.org > [EMAIL PROTECTED] > > "Oxygenating the Web Service Platform", www.wso2.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Ruwan Linton http://www.wso2.org - "Oxygenating the Web Services Platform"
