Hi Melodies,
As per my knowledge, this config should work by sending the text/xml to the
backend. However, this could happen while rebuilding the message by the
PayloadFactory.

You can overcome your issue by setting the messageType property to text/xml.

<property name="messageType" value="text/xml" scope="axis2"/>.

Since this worked fine in 4.8.1 for you, please report a bug in [1] with
config and logs if you have, then we can fix this if there is an issue.

[1] - https://github.com/wso2/product-ei/issues

Regards,
Vinod

On Tue, Jul 25, 2017 at 1:48 PM, Melodias <[email protected]> wrote:

> Hi Vinod Kavinda,
> Thanks for replay.
> My inSeq:
>
> <inSequence>
>    <log>
>       <property xmlns:ns="http://org.apache.synapse/xsd";
> expression="get-property('transport', 'Content-Type')" name="LOG1" />
>    </log>
>    <property name="FORCE_ERROR_ON_SOAP_FAULT" scope="default"
> type="STRING"
> value="true" />
>    <property description="" expression="$header/RequestHeaderEBM"
> name="headerSave" scope="default" type="OM" />
>    <enrich>
>       <source clone="true" type="body" />
>       <target property="bodyCopy" type="property" />
>    </enrich>
>    <filter description="" regex="SP" source="$body/Policy/ProductCode">
>       <then>
>          <payloadFactory media-type="xml">
>             <format>
>                <pl:getDictionary xmlns:pl="http://pl.esp.ws/";>
>                   <DictionaryKey>CODE_$1</DictionaryKey>
>                   <Language>pl</Language>
>                </pl:getDictionary>
>             </format>
>             <args>
>                <arg evaluator="xml" expression="$body/Policy/ProductCode"
> />
>             </args>
>          </payloadFactory>
>       </then>
>       <else>
>          <log>
>             <property xmlns:ns="http://org.apache.synapse/xsd";
> expression="get-property('transport', 'Content-Type')" name="LOG2" />
>          </log>
>          <payloadFactory media-type="xml">
>             <format>
>                <pl:getDictionary xmlns:pl="http://pl.esp.ws/";>
>                   <DictionaryKey>SIMPLE_CODE_$1</DictionaryKey>
>                   <Language>pl</Language>
>                </pl:getDictionary>
>             </format>
>             <args>
>                <arg evaluator="xml" expression="$body/Policy/ProductCode"
> />
>             </args>
>          </payloadFactory>
>          <log>
>             <property xmlns:ns="http://org.apache.synapse/xsd";
> expression="get-property('transport', 'Content-Type')" name="LOG3" />
>          </log>
>       </else>
>    </filter>
>    <log>
>       <property xmlns:ns="http://org.apache.synapse/xsd";
> expression="get-property('transport', 'Content-Type')" name="LOG4" />
>    </log>
>    <call>
>       <endpoint key="gov:Endpoints/AL/Dictionary.xml" />
>    </call>
>    <loopback />
> </inSequence>
>
> OS: Ubuntu 14.04.2 LTS
> Java: oracle jdk1.8.0_141
>
> I attached axis2.xml and carbon.xml
> axis2.xml
> <http://wso2-oxygen-tank.10903.n7.nabble.com/file/n150571/axis2.xml>
> carbon.xml
> <http://wso2-oxygen-tank.10903.n7.nabble.com/file/n150571/carbon.xml>
>
>
>
> --
> View this message in context: http://wso2-oxygen-tank.10903.
> n7.nabble.com/WSO2-EI-6-1-1-PayloadFactory-mediator-tp150568p150571.html
> Sent from the WSO2 Development mailing list archive at Nabble.com.
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
Vinod Kavinda
Senior Software Engineer
*WSO2 Inc. - lean . enterprise . middleware <http://www.wso2.com>.*
Mobile : +94 (0) 712 415544
Blog : http://soatechflicks.blogspot.com/
[image: http://wso2.com/signature]
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to