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



    <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.*">
        <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?



Thanks

Sylvain Legault

Reply via email to