I'm trying to create a eventbrite connector for WSO2 ESB. After creating the connector I have added the connector to ESB. Then I want to test it. My file look like this
<?xml version="1.0" encoding="UTF-8"?> <template name="eventAttendees" xmlns="http://ws.apache.org/ns/synapse"> <parameter name="EventID" description="Full-text search query string." /> <parameter name="status" description="status" /> <parameter name="changedSince" description="changed_since." /> <parameter name="expand" description=" expand." /> <parameter name="parameters" description=" parameters." /> <sequence> <property name="uri.var.EventID" expression="$func:EventID" /> <property name="uri.var.accessToken" expression="$func:accessToken" /> <property name="uri.var.status" expression="$func:status" /> <property name="uri.var.changed_since" expression="$func:changed_since" /> <property name="uri.var.expand" expression="$func:expand" /> <property name="eventbrite.parameters" value=""/> <filter xpath="get-property('uri.var.status') = '' or not(string(get- property('uri.var.status')))" > <then> <property name="uri.var.status" value=""/> </then> <else> <property name="eventbrite.parameters" expression="fn:concat(get-property('eventbrite.parameters'), '&status=', get-property('uri.var.status'))"/> </else> </filter> <filter xpath="get-property('uri.var.changed_since') = '' or not(string(get-property('uri.var.changed_since')))" > <then> <property name="uri.var.changed_since" value=""/> </then> <else> <property name="eventbrite.parameters" expression="fn:concat(get-property('eventbrite.parameters'), '&changed_since=', get-property('uri.var.changed_since'))"/> </else> </filter> <filter xpath="get-property('uri.var.expand') = '' or not(string(get- property('uri.var.expand')))" > <then> <property name="uri.var.expand" value=""/> </then> <else> <property name="eventbrite.parameters" expression="fn:concat(get-property('eventbrite.parameters'), '&expand=', get-property('uri.var.expand'))"/> </else> </filter> <property name="uri.var.parameters" expression="get-property('eventbrite.parameters')" /> <call> <endpoint> <http method="get" uri-template="https://www.eventbriteapi.com/v3/events/{uri.var.EventID}/attendees/?{uri.var.parameters}&token={uri.var.eventbrite.accessToken}" /> </endpoint> </call> </sequence> </template> After I have configured a custom proxy service within the ESB like this: <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="eventAttendees" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <event_brite.init> <accessToken>NDYKPVXF2E36W57EB5B2</accessToken> </event_brite.init> <property name="EventID" expression="json-eval($.EventID)"/> <property name="status" expression="json-eval($.status)"/> <property name="changed_since" expression="json-eval($.changed_since)"/> <property name="expand" expression="json-eval($.expand)"/> <event_brite.eventAttendees> <EventID>{$ctx:EventID}</EventID> <status>{$ctx:status}</status> <changed_since>{$ctx:changed_since}</changed_since> <expand>{$ctx:expand}</expand> </event_brite.eventAttendees> <respond/> </inSequence> <outSequence> <log/> <send/> </outSequence> </target> <description/> </proxy> then whn i test it in postman http://elilmathas-MacBook-Pro.local:8280/services/eventAttendees <http://elilmathas-macbook-pro.local:8280/services/eventAttendees> with parameters {"EventID":"12792941031","status":"Attending", } it works ,But the out put i get gives all the vales ie if i give the parameters as {"EventID":"12792941031","status":"Not_Attending", } i get the same out put which i got for the first one IT IS NOT FILTERED. What can be the problem? -- *S.Elilmatha* Associative Software Engineer, WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mobile 0779842221.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
