WSO2 Amazonsns connector issues publishing json message -


i trying publish json message using amazonsns connector in wso2 esb 4.9. able publish simple string message when set messagestructure json in order send different messages different platforms , attempting send json value of message not work. using simple transaction looks documentation sample. transaction:

content-type: application/json;charset=utf-8  {   "region":"us-west-2",   "accesskeyid":"myaccesskey",   "secretaccesskey":"mysecretaccesskey",   "version":"",   "messagestructure":"json",   "subject":"test",   "message": {"default":"mess","email":"message"},   "targetarn":"arn:aws:sns:us-west-2:977102061874:endpoint/apns_sandbox/mobile_ios_sandbox/34ed4324e6-1119-67sd-b7dd-f413c88e4e25",   "topicarn":""   } 

my result unexpected error sending message out.

caused by: javax.xml.stream.xmlstreamexception: parseerror @ [row,col]:[1,73]message: illegal character: <d> 

my service example:

<amazonsns.init>         <region>{$ctx:region}</region>         <accesskeyid>{$ctx:accesskeyid}</accesskeyid>         <secretaccesskey>{$ctx:secretaccesskey}</secretaccesskey>         <version>{$ctx:version}</version>      </amazonsns.init>      <amazonsns.publish>         <message>{$ctx:message}</message>         <subject>{$ctx:subject}</subject>         <messagestructure>{$ctx:messagestructure}</messagestructure>         <topicarn>{$ctx:topicarn}</topicarn>         <targetarn>{$ctx:targetarn}</targetarn>      </amazonsns.publish> 

i did not expect success started trying different things....i attempted xml encoding json message , same message on '&'. using wire logs found content type of successful messages going amazon application/x-www-form-urlencoded tried url encoding , same message on '%'.

i'm running out of ideas. double checked connector documentation make sure did not miss anything. can use json transaction publish , gives sample transaction not discuss special/different need set in order make work. there missing?

update: can see using builder application/x-www-form-urlencoded stumbling on json. have tried setting messagetype , contenttype properties application/json. json builder enabled. seems connector wants send out application/x-www-form-urlencoded, there not setting tell connector json?

update: publish template comes connector setting messagetype applicaiton/x-www-form-urlencoded overriding of settings making in proxy service. going @ changing template in connector use different messagetype and/or allow me set in proxy dynamically trying again.

joe

we have created public jira issue. please follow that.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -