Did you set the scope of the property 'Action' as transport? On Mon, Mar 16, 2015 at 11:36 AM, Keerthika Mahendralingam < keerth...@wso2.com> wrote:
> Hi All, > I am using switch mediator in the following proxy. When I invoking the > proxy I am getting the warning: *"SwitchCase Provided character sequence > for switch case condition is 'null'. Switch case will not be executed*." > *Proxy:* > <?xml version="1.0" encoding="UTF-8"?> > <proxy xmlns="http://ws.apache.org/ns/synapse" > name="marketo" > transports="https,http" > statistics="disable" > trace="disable" > startOnLoad="true"> > <target> > <inSequence> > <property name="marketoInstanceURL" > expression="json-eval($.marketoInstanceURL)"/> > <property name="clientId" expression="json-eval($.clientId)"/> > <property name="clientSecret" > expression="json-eval($.clientSecret)"/> > <property name="input" expression="json-eval($.input)"/> > <property name="action" expression="json-eval($.action)"/> > <property name="lookupField" > expression="json-eval($.lookupField)"/> > <property name="asyncProcessing" > expression="json-eval($.asyncProcessing)"/> > <property name="partitionName" > expression="json-eval($.partitionName)"/> > <property name="leadId" expression="json-eval($. leadId)"/> > <property name="fields" expression="json-eval($. fields)"/> > <marketo.init> > > <marketoInstanceURL>{$ctx:marketoInstanceURL}</marketoInstanceURL> > <clientId>{$ctx:clientId}</clientId> > <clientSecret>{$ctx:clientSecret}</clientSecret> > </marketo.init> > <switch source="get-property('transport','Action')"> > <case regex="urn:createAndUpdateLeads"> > <marketo.createAndUpdateLeads> > <input>{$ctx:input}</input> > <action>{$ctx:action}</action> > <lookupField>{$ctx:lookupField}</lookupField> > > <asyncProcessing>{$ctx:asyncProcessing}</asyncProcessing> > <partitionName>{$ctx:partitionName}</partitionName> > </marketo.createAndUpdateLeads> > </case> > <case regex="urn:getLeadById"> > <marketo.getLeadById> > <leadId>{$ctx:leadId}</leadId> > <fields>{$ctx:fields}</fields> > </marketo.getLeadById> > </case> > </switch> > <respond/> > </inSequence> > <outSequence> > <log/> > <send/> > </outSequence> > </target> > <description/> > </proxy> > > init method works fine. But createAndUpdateLeads method is not executed. > Am I missing anything? > -- > <dev-requ...@wso2.org> > Keerthika Mahendralingam > Associate Software Engineer > Mobile :+94 (0) 776 121144 > keerth...@wso2.com > WSO2, Inc. > lean . enterprise . middleware > -- Shakila Sivagnanarajah Associate Software Engineer Mobile :+94 (0) 770 760240 shak...@wso2.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev