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"

Reply via email to