wso2 - Can we get Class return Property in Proxy sequence -


i written custom mediator , working fine passing values class mediator using insequence this

<?xml version="1.0" encoding="utf-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse"        name="treadingmobile_5"        transports="https http"        startonload="true"        trace="disable">    <description/>    <target>       <insequence onerror="fault">          <property name="force_error_on_soap_fault" value="true"/>          <property name="reading"                    expression="//readings"                    scope="default"                    type="string"/>          <property name="actiondetailid"                    expression="//actiondetailid/text()"                    scope="default"                    type="string"/>          <property name="actionid"                    expression="//actionid/text()"                    scope="default"                    type="string"/>          <property name="userid"                    expression="//userid/text()"                    scope="default"                    type="string"/>          <property name="assetid"                    expression="//assetid/text()"                    scope="default"                    type="string"/>          <property name="partybranchid"                    expression="//partybranchid/text()"                    scope="default"                    type="string"/>          <property name="activityid"                    expression="//activityid/text()"                    scope="default"                    type="string"/>          <property name="clientid"                    expression="//clientid/text()"                    scope="default"                    type="string"/>          <property name="ouid"                    expression="//ouid/text()"                    scope="default"                    type="string"/>          <log level="custom">             <property name="fff" expression="get-property('reading')"/>             <property name="ggggg" expression="get-property('actiondetailid')"/>             <property name="hhhh" expression="get-property('actionid')"/>             <property name="partybranchid" expression="get-property('partybranchid')"/>          </log>          <iterate continueparent="true"                   id="readings"                   expression="//readingslitetaildto">             <target>                <sequence>                   <property name="actiondetailid" expression="get-property('actiondetailid')"/>                   <property name="parameterid" expression="//parameterid/text()"/>                   <property name="slno" expression="//slno/text()"/>                   <property name="inputvalue" expression="//inputvalue/text()"/>                   <property name="inputtext" expression="//inputtext/text()"/>                   <property name="finalvalue" expression="//finalvalue/text()"/>                   <payloadfactory>                      <format>                         <p:insert_treadings_operation xmlns:p="http://ws.wso2.org/dataservice">                            <xs:actiondetailid xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:actiondetailid>                            <xs:slno xmlns:xs="http://ws.wso2.org/dataservice">$2</xs:slno>                            <xs:parameterid xmlns:xs="http://ws.wso2.org/dataservice">$3</xs:parameterid>                            <xs:inputvalue xmlns:xs="http://ws.wso2.org/dataservice">$4</xs:inputvalue>                            <xs:inputtext xmlns:xs="http://ws.wso2.org/dataservice">$5</xs:inputtext>                            <xs:finalvalue xmlns:xs="http://ws.wso2.org/dataservice">$6</xs:finalvalue>                         </p:insert_treadings_operation>                      </format>                      <args>                         <arg expression="get-property('actiondetailid')"/>                         <arg expression="get-property('slno')"/>                         <arg expression="get-property('parameterid')"/>                         <arg expression="get-property('inputvalue')"/>                         <arg expression="get-property('inputtext')"/>                         <arg expression="get-property('finalvalue')"/>                      </args>                   </payloadfactory>                   <send receive="treadingsid_seq">                      <endpoint>                         <address uri="http://localhost:9764/services/treadings_dataservice/"                                  format="soap11"/>                      </endpoint>                   </send>                </sequence>             </target>          </iterate>         <property name="force_sc_accepted" value="true" scope="axis2"/> <property xmlns:ns="http://org.apache.synapse/xsd"              name="time"              expression="get-property('system_time')"              scope="default"              type="string"/>          <property name="actiondetailid"                    expression="get-property('actiondetailid')"                    scope="default"                    type="string"/>          <property name="out_only" value="true"/>          <property name="dbconnectionurl"                    value="jdbc:postgresql://$$$$$$$$$$/*****"/>          <property name="dbuser" value="##########"/>          <property name="dbpassword" value="*******"/>          <class name="in.youtility.esb.custommediators.readingalertmediator"/> <property name="message"                    expression="get-property('message')"                    scope="default"                    type="string"/>       </insequence>       <outsequence onerror="fault"/>    </target> </proxy> 

the message property define inside class wish retrieve out side class means insequence possible in wso2esb or not if property out of class scenario

yes. possible. work normal property can refer @ place after return value class mediator. can property 'message' have mentioned before need assign result property 'message'.

see following sample of assign result,

        <class name="in.youtility.esb.custommediators.readingalertmediator">                         <property name="target" value="message"/>         </class> 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -