Thank you Vanji for your quick response. I tried your suggested method. But
when I hardcoded the value for chageId and send the post request with the
payload from the rest client the empty payload was removed and correct
request was sent.
But when I try to get the chargeId from the payload removes the message
context also *<property name="FORCE_POST_PUT_NOBODY" value="true"
scope="axis2" type="BOOLEAN"/>* removes the message context also.
Please find the wire log:
[2014-12-11 11:01:03,568] DEBUG - wire >> "POST /strip HTTP/1.1[\r][\n]"
[2014-12-11 11:01:03,568] DEBUG - wire >> "Host: 10.100.5.169:8280[\r][\n]"
[2014-12-11 11:01:03,568] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
[2014-12-11 11:01:03,568] DEBUG - wire >> "Content-Length: 44[\r][\n]"
[2014-12-11 11:01:03,568] DEBUG - wire >> "Cache-Control: no-cache[\r][\n]"
[2014-12-11 11:01:03,568] DEBUG - wire >> "Origin:
chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]" [2014-12-11
11:01:03,568] DEBUG - wire >> "User-Agent: Mozilla/5.0 (Macintosh; Intel
Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71
Safari/537.36[\r][\n]" [2014-12-11 11:01:03,568] DEBUG - wire >>
"Content-Type: application/json[\r][\n]" [2014-12-11 11:01:03,568] DEBUG -
wire >> "Accept: */*[\r][\n]" [2014-12-11 11:01:03,568] DEBUG - wire >>
"Accept-Encoding: gzip, deflate[\r][\n]" [2014-12-11 11:01:03,569] DEBUG -
wire >> "Accept-Language: en-US,en;q=0.8[\r][\n]" [2014-12-11 11:01:03,569]
DEBUG - wire >> "[\r][\n]" [2014-12-11 11:01:03,569] DEBUG - wire >>
"{[\n]" [2014-12-11 11:01:03,569] DEBUG - wire >> "
*"chargeId":"ch_158NuEDpl35Wu2ui6atArh0E"*[\n]" [2014-12-11 11:01:03,570]
DEBUG - wire >> "}" [2014-12-11 11:01:03,571] DEBUG - headers
http-incoming-2 >> POST /strip HTTP/1.1 [2014-12-11 11:01:03,571] DEBUG -
headers http-incoming-2 >> Host: 10.100.5.169:8280 [2014-12-11
11:01:03,571] DEBUG - headers http-incoming-2 >> Connection: keep-alive
[2014-12-11 11:01:03,571] DEBUG - headers http-incoming-2 >>
Content-Length: 44 [2014-12-11 11:01:03,571] DEBUG - headers
http-incoming-2 >> Cache-Control: no-cache [2014-12-11 11:01:03,571] DEBUG
- headers http-incoming-2 >> Origin:
chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm [2014-12-11
11:01:03,572] DEBUG - headers http-incoming-2 >> User-Agent: Mozilla/5.0
(Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/39.0.2171.71 Safari/537.36 [2014-12-11 11:01:03,572] DEBUG - headers
http-incoming-2 >> Content-Type: application/json [2014-12-11 11:01:03,572]
DEBUG - headers http-incoming-2 >> Accept: */* [2014-12-11 11:01:03,572]
DEBUG - headers http-incoming-2 >> Accept-Encoding: gzip, deflate
[2014-12-11 11:01:03,572] DEBUG - headers http-incoming-2 >>
Accept-Language: en-US,en;q=0.8 [2014-12-11 11:01:03,572] DEBUG - headers
http-incoming-2 >> Cookie: MSG14178730176680.29427175505634384=true;
MSG14178733498110.13085054063584778=true;
MSG14178733599110.6219386089528006=true;
MSG14178737859670.9529352123700151=true;
MSG14178737969220.7098197557439472=true;
MSG14178742229450.11304979617306088=true;
MSG14178742459580.08636783896345823=true;
MSG14178743775100.8277019213681849=true;
MSG14178744009480.1176885444149115=true;
MSG14178744961220.12665969302078872=true;
MSG14178745125470.7059473583386973=true;
MSG14178746301280.5421815401876321=true;
MSG14178749920270.16922145677337863=true;
MSG14178750099790.9279498346279079=true;
MSG14178752074000.7968266996983095=true;
MSG14178752284520.3200580037079722=true;
MSG14178759605060.21670383101954604=true;
MSG14178759719000.4556431273477163=true;
MSG14178760965150.9435498284164892=true;
MSG14178761060100.2838820086933652=true;
MSG14179410733150.9565482556718199=true;
MSG14179410950800.04846375334425135=true;
MSG14179455481590.07412600774150879=true;
MSG14179455562460.4402089613229584=true;
MSG14179456372820.13647268855455874=true;
MSG14179456467490.9615653270227574=true;
MSG14179457888170.3561121989855156=true;
MSG14179458087970.32722224270139955=true;
MSG14179458931480.43382225798195906=true;
MSG14179459297600.020534603827859765=true;
MSG14179459966390.6664658852131142=true;
MSG14179460204050.14013169399751735=true;
MSG14179489015150.06760873851129723=true;
MSG14179489099060.5499165139086787=true;
MSG14179491204370.12483201997664095=true;
MSG14179491378060.04953538185644113=true;
MSG14179495124730.1470145124103216=true;
MSG14179495216360.5932151724208592=true;
MSG14180160515350.3206177291762258=true;
MSG14180160586290.21535470793461686=true;
MSG14180180629350.34373419260761984=true;
MSG14180180771320.43280719820494484=true;
MSG14180183718290.7533101304562387=true;
MSG14180183793000.3531918009854791=true;
MSG14180187292670.3233565871754088=true;
MSG14180187481570.19749683627420767=true;
MSG14180188821080.7404282564701233=true;
MSG14180188986720.5087172081446473=true;
MSG14180195868500.9925920539609546=true;
MSG14180196038340.36159794798652867=true;
MSG14180196296280.7191546107618206=true;
MSG14180200404930.846025712109372=true;
MSG14180200498980.3576538787263849=true;
MSG14180211287070.6981240320779332=true;
MSG14180211450970.5470375709333585=true;
MSG14180211539830.14147011592354464=true;
MSG14180267286990.752355358528602=true;
MSG14180267401400.4391949489047038=true;
MSG14180269665840.8913259545479926=true;
MSG14180269827080.3456174173053478=true;
MSG14180272395060.7216980175581956=true;
MSG14180272467170.4247669626870154=true;
MSG14180273772550.9341467730565401=true;
MSG14180273862640.9302642266320996=true;
MSG14180275383250.9209788173264789=true;
MSG14180275459000.1743975422834586=true;
MSG14180277033930.9165432546873638=true;
MSG14180277276290.22107829182494843=true;
MSG14180280156710.8360745314324631=true;
MSG14180280227300.8761885984847069=true;
MSG14180281513500.1317914795124393=true;
MSG14180281653880.5533615374450929=true;
MSG14180286101320.17278300477447406=true;
MSG14180286182860.9667555518467619=true;
MSG14180288571610.6365686750883666=true;
MSG14180288709340.5535725960465719=true;
MSG14180293552010.7459996280981878=true;
MSG14180293912410.033190570530765795=true;
MSG14180296612780.9253904274621996=true;
MSG14180296810410.8585802722104362=true;
MSG14180299429260.47076843865522855=true;
MSG14180299528580.5573748432951399=true;
MSG14180300685950.5071724333477381=true;
MSG14180300875060.19283713836897742=true;
MSG14180301679030.3091872742234012=true;
MSG14180301763280.09853717681181429=true;
MSG14180303609390.9658586469932768=true;
MSG14180303710300.7497150783687837=true;
MSG14180322332990.16392709094714963=true;
MSG14180322474540.05549410318988568=true;
MSG14180333330590.4918613857483687=true;
MSG14180333433290.001652692804246958=true;
MSG14180334158290.8315629557034984=true;
MSG14180334289700.18039744518225187=true;
MSG14180335791880.4457112246866386=true;
MSG14180335984270.8426995602058203=true;
MSG14180336826490.02792829955436127=true;
MSG14180337061770.9391664218214617=true;
MSG14180345040810.42403730146794827=true;
MSG14180345139890.08715006200416353=true;
MSG14180390721680.73799617786196=true;
MSG14180390820880.9308552480252833=true;
MSG14181004753540.7118402841897127=true;
MSG14181004988910.5219672672265185=true;
MSG14181007274960.08898162841644508=true;
MSG14181007756400.299318123075345=true;
MSG14181009672860.28844206971216846=true;
MSG14181009908760.31436734295407154=true;
MSG14181013985750.7550552155397865=true;
MSG14181014135770.40159069407755643=true;
MSG14181024888510.3647204226247531=true;
MSG14181376099640.1321995667386784=true;
MSG14181376191470.4578451581595344=true;
MSG14181378885200.580921113187427=true;
MSG14181379113540.9070443319119966=true;
MSG14181861148520.38353609920616993=true;
MSG14181861247110.9655132084406128=true;
MSG14181975961890.30215553428519115=true; region1_configure_menu=none;
region3_registry_menu=none; region4_monitor_menu=none;
region5_tools_menu=none; MSG14181976039810.46128504567736506=true;
MSG14181987584540.22673106752627692=true;
MSG14181989421760.6889284594494142=true;
MSG14182007273310.3146866766452121=true;
MSG14182037157900.5257809117784512=true;
MSG14182037275600.881640817859891=true;
MSG14182050282660.18771949890765893=true;
MSG14182050410300.9647234822686798=true;
MSG14182056257770.13261785682599847=true;
MSG14182056382860.1916066432915492=true;
MSG14182059454620.3301668039944521=true;
MSG14182059645870.7152822525418463=true;
MSG14182062166130.37989709714751774=true;
MSG14182062386660.47894642351840944=true;
MSG14182066883840.2031493429197354=true;
MSG14182067049000.7357599918415271=true;
MSG14182070835870.7090707057273631=true;
MSG14182070916340.35768151174910967=true;
MSG14182073522720.6617867028751292=true;
MSG14182073784510.4325755594213243=true;
MSG14182144875280.2386169132524869=true;
MSG14182144995590.019769755408403755=true;
MSG14182149836730.8548404964883237=true;
MSG14182149956370.7888860942840399=true;
MSG14182155297800.8767629161912102=true;
MSG14182155508090.03881305927858536=true;
MSG14182157377520.9039170868755749=true;
MSG14182157607000.33224407153463387=true;
MSG14182163253400.5138887657241435=true;
MSG14182163486770.425359592047316=true;
MSG14182197559210.7927968054138192=true;
MSG14182197669840.1988776181165619=true;
MSG14182208671770.06449778803041617=true;
MSG14182702614920.5362669311205923=true;
MSG14182702700220.3006583196935092=true;
MSG14182706903400.07046476155180559=true;
MSG14182707082550.7951198511727071=true;
MSG14182734423420.4829581585637919=true;
MSG14182734556340.852734225898637=true;
requestedURI=../../carbon/api/index.jsp;
current-breadcrumb=%23api+manageAPI.jsp*+index.jsp* [2014-12-11
11:01:04,613] DEBUG - headers http-outgoing-2 >> *POST
/v1/charges/{uri.var.chargeId}/refunds HTTP/1.1* [2014-12-11 11:01:04,614]
DEBUG - headers http-outgoing-2 >> Accept-Language: en-US,en;q=0.8
[2014-12-11 11:01:04,614] DEBUG - headers http-outgoing-2 >> Cookie:
MSG14178730176680.29427175505634384=true;
MSG14178733498110.13085054063584778=true;
MSG14178733599110.6219386089528006=true;
MSG14178737859670.9529352123700151=true;
MSG14178737969220.7098197557439472=true;
MSG14178742229450.11304979617306088=true;
MSG14178742459580.08636783896345823=true;
MSG14178743775100.8277019213681849=true;
MSG14178744009480.1176885444149115=true;
MSG14178744961220.12665969302078872=true;
MSG14178745125470.7059473583386973=true;
MSG14178746301280.5421815401876321=true;
MSG14178749920270.16922145677337863=true;
MSG14178750099790.9279498346279079=true;
MSG14178752074000.7968266996983095=true;
MSG14178752284520.3200580037079722=true;
MSG14178759605060.21670383101954604=true;
MSG14178759719000.4556431273477163=true;
MSG14178760965150.9435498284164892=true;
MSG14178761060100.2838820086933652=true;
MSG14179410733150.9565482556718199=true;
MSG14179410950800.04846375334425135=true;
MSG14179455481590.07412600774150879=true;
MSG14179455562460.4402089613229584=true;
MSG14179456372820.13647268855455874=true;
MSG14179456467490.9615653270227574=true;
MSG14179457888170.3561121989855156=true;
MSG14179458087970.32722224270139955=true;
MSG14179458931480.43382225798195906=true;
MSG14179459297600.020534603827859765=true;
MSG14179459966390.6664658852131142=true;
MSG14179460204050.14013169399751735=true;
MSG14179489015150.06760873851129723=true;
MSG14179489099060.5499165139086787=true;
MSG14179491204370.12483201997664095=true;
MSG14179491378060.04953538185644113=true;
MSG14179495124730.1470145124103216=true;
MSG14179495216360.5932151724208592=true;
MSG14180160515350.3206177291762258=true;
MSG14180160586290.21535470793461686=true;
MSG14180180629350.34373419260761984=true;
MSG14180180771320.43280719820494484=true;
MSG14180183718290.7533101304562387=true;
MSG14180183793000.3531918009854791=true;
MSG14180187292670.3233565871754088=true;
MSG14180187481570.19749683627420767=true;
MSG14180188821080.7404282564701233=true;
MSG14180188986720.5087172081446473=true;
MSG14180195868500.9925920539609546=true;
MSG14180196038340.36159794798652867=true;
MSG14180196296280.7191546107618206=true;
MSG14180200404930.846025712109372=true;
MSG14180200498980.3576538787263849=true;
MSG14180211287070.6981240320779332=true;
MSG14180211450970.5470375709333585=true;
MSG14180211539830.14147011592354464=true;
MSG14180267286990.752355358528602=true;
MSG14180267401400.4391949489047038=true;
MSG14180269665840.8913259545479926=true;
MSG14180269827080.3456174173053478=true;
MSG14180272395060.7216980175581956=true;
MSG14180272467170.4247669626870154=true;
MSG14180273772550.9341467730565401=true;
MSG14180273862640.9302642266320996=true;
MSG14180275383250.9209788173264789=true;
MSG14180275459000.1743975422834586=true;
MSG14180277033930.9165432546873638=true;
MSG14180277276290.22107829182494843=true;
MSG14180280156710.8360745314324631=true;
MSG14180280227300.8761885984847069=true;
MSG14180281513500.1317914795124393=true;
MSG14180281653880.5533615374450929=true;
MSG14180286101320.17278300477447406=true;
MSG14180286182860.9667555518467619=true;
MSG14180288571610.6365686750883666=true;
MSG14180288709340.5535725960465719=true;
MSG14180293552010.7459996280981878=true;
MSG14180293912410.033190570530765795=true;
MSG14180296612780.9253904274621996=true;
MSG14180296810410.8585802722104362=true;
MSG14180299429260.47076843865522855=true;
MSG14180299528580.5573748432951399=true;
MSG14180300685950.5071724333477381=true;
MSG14180300875060.19283713836897742=true;
MSG14180301679030.3091872742234012=true;
MSG14180301763280.09853717681181429=true;
MSG14180303609390.9658586469932768=true;
MSG14180303710300.7497150783687837=true;
MSG14180322332990.16392709094714963=true;
MSG14180322474540.05549410318988568=true;
MSG14180333330590.4918613857483687=true;
MSG14180333433290.001652692804246958=true;
MSG14180334158290.8315629557034984=true;
MSG14180334289700.18039744518225187=true;
MSG14180335791880.4457112246866386=true;
MSG14180335984270.8426995602058203=true;
MSG14180336826490.02792829955436127=true;
MSG14180337061770.9391664218214617=true;
MSG14180345040810.42403730146794827=true;
MSG14180345139890.08715006200416353=true;
MSG14180390721680.73799617786196=true;
MSG14180390820880.9308552480252833=true;
MSG14181004753540.7118402841897127=true;
MSG14181004988910.5219672672265185=true;
MSG14181007274960.08898162841644508=true;
MSG14181007756400.299318123075345=true;
MSG14181009672860.28844206971216846=true;
MSG14181009908760.31436734295407154=true;
MSG14181013985750.7550552155397865=true;
MSG14181014135770.40159069407755643=true;
MSG14181024888510.3647204226247531=true;
MSG14181376099640.1321995667386784=true;
MSG14181376191470.4578451581595344=true;
MSG14181378885200.580921113187427=true;
MSG14181379113540.9070443319119966=true;
MSG14181861148520.38353609920616993=true;
MSG14181861247110.9655132084406128=true;
MSG14181975961890.30215553428519115=true; region1_configure_menu=none;
region3_registry_menu=none; region4_monitor_menu=none;
region5_tools_menu=none; MSG14181976039810.46128504567736506=true;
MSG14181987584540.22673106752627692=true;
MSG14181989421760.6889284594494142=true;
MSG14182007273310.3146866766452121=true;
MSG14182037157900.5257809117784512=true;
MSG14182037275600.881640817859891=true;
MSG14182050282660.18771949890765893=true;
MSG14182050410300.9647234822686798=true;
MSG14182056257770.13261785682599847=true;
MSG14182056382860.1916066432915492=true;
MSG14182059454620.3301668039944521=true;
MSG14182059645870.7152822525418463=true;
MSG14182062166130.37989709714751774=true;
MSG14182062386660.47894642351840944=true;
MSG14182066883840.2031493429197354=true;
MSG14182067049000.7357599918415271=true;
MSG14182070835870.7090707057273631=true;
MSG14182070916340.35768151174910967=true;
MSG14182073522720.6617867028751292=true;
MSG14182073784510.4325755594213243=true;
MSG14182144875280.2386169132524869=true;
MSG14182144995590.019769755408403755=true;
MSG14182149836730.8548404964883237=true;
MSG14182149956370.7888860942840399=true;
MSG14182155297800.8767629161912102=true;
MSG14182155508090.03881305927858536=true;
MSG14182157377520.9039170868755749=true;
MSG14182157607000.33224407153463387=true;
MSG14182163253400.5138887657241435=true;
MSG14182163486770.425359592047316=true;
MSG14182197559210.7927968054138192=true;
MSG14182197669840.1988776181165619=true;
MSG14182208671770.06449778803041617=true;
MSG14182702614920.5362669311205923=true;
MSG14182702700220.3006583196935092=true;
MSG14182706903400.07046476155180559=true;
MSG14182707082550.7951198511727071=true;
MSG14182734423420.4829581585637919=true;
MSG14182734556340.852734225898637=true;
requestedURI=../../carbon/api/index.jsp;
current-breadcrumb=%23api+manageAPI.jsp*+index.jsp* [2014-12-11
11:01:04,614] DEBUG - headers http-outgoing-2 >> Authorization: Bearer
sk_test_Gd3JGidPIzfPkMOC8ZGnPEdf [2014-12-11 11:01:04,614] DEBUG - headers
http-outgoing-2 >> Accept-Encoding: gzip, deflate [2014-12-11 11:01:04,615]
DEBUG - headers http-outgoing-2 >> Origin:
chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm [2014-12-11
11:01:04,615] DEBUG - headers http-outgoing-2 >> Content-Type:
application/x-www-form-urlencoded [2014-12-11 11:01:04,615] DEBUG - headers
http-outgoing-2 >> Accept: */* [2014-12-11 11:01:04,615] DEBUG - headers
http-outgoing-2 >> Cache-Control: no-cache [2014-12-11 11:01:04,615] DEBUG
- headers http-outgoing-2 >> Transfer-Encoding: chunked [2014-12-11
11:01:04,615] DEBUG - headers http-outgoing-2 >> Host: api.stripe.com:80
[2014-12-11 11:01:04,615] DEBUG - headers http-outgoing-2 >> Connection:
Keep-Alive [2014-12-11 11:01:04,615] DEBUG - headers http-outgoing-2 >>
User-Agent: Synapse-PT-HttpComponents-NIO [2014-12-11 11:01:04,617] DEBUG -
wire << "*POST /v1/charges/{uri.var.chargeId}/refunds HTTP/1.1*[\r][\n]"
[2014-12-11 11:01:04,617] DEBUG - wire << "Accept-Language:
en-US,en;q=0.8[\r][\n]" [2014-12-11 11:01:04,618] DEBUG - wire <<
"Authorization: Bearer sk_test_Gd3JGidPIzfPkMOC8ZGnPEdf[\r][\n]"
[2014-12-11 11:01:04,618] DEBUG - wire << "Accept-Encoding: gzip,
deflate[\r][\n]" [2014-12-11 11:01:04,618] DEBUG - wire << "Origin:
chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]" [2014-12-11
11:01:04,618] DEBUG - wire << "Content-Type:
application/x-www-form-urlencoded[\r][\n]" [2014-12-11 11:01:04,618] DEBUG
- wire << "Accept: */*[\r][\n]" [2014-12-11 11:01:04,618] DEBUG - wire <<
"Cache-Control: no-cache[\r][\n]" [2014-12-11 11:01:04,618] DEBUG - wire <<
"Transfer-Encoding: chunked[\r][\n]" [2014-12-11 11:01:04,618] DEBUG - wire
<< "Host: api.stripe.com:80[\r][\n]" [2014-12-11 11:01:04,619] DEBUG - wire
<< "Connection: Keep-Alive[\r][\n]" [2014-12-11 11:01:04,619] DEBUG - wire
<< "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" [2014-12-11
11:01:04,619] DEBUG - wire << "[\r][\n]" [2014-12-11 11:01:04,619] DEBUG -
wire << "0[\r][\n]" [2014-12-11 11:01:04,619] DEBUG - wire << "[\r][\n]"
[2014-12-11 11:01:05,295] DEBUG - wire >> "*HTTP/1.1 404 Not Found*[\r][\n]"
[2014-12-11 11:01:05,295] DEBUG - wire >> "Server: nginx[\r][\n]"
[2014-12-11 11:01:05,295] DEBUG - wire >> "Date: Thu, 11 Dec 2014 05:28:28
GMT[\r][\n]" [2014-12-11 11:01:05,296] DEBUG - wire >> "Content-Type:
application/json;charset=utf-8[\r][\n]" [2014-12-11 11:01:05,296] DEBUG -
wire >> "Content-Length: 142[\r][\n]" [2014-12-11 11:01:05,296] DEBUG -
wire >> "Connection: keep-alive[\r][\n]" [2014-12-11 11:01:05,296] DEBUG -
wire >> "Access-Control-Allow-Credentials: true[\r][\n]" [2014-12-11
11:01:05,296] DEBUG - wire >> "Access-Control-Allow-Methods: GET, POST,
HEAD, OPTIONS, DELETE[\r][\n]" [2014-12-11 11:01:05,296] DEBUG - wire >>
"Access-Control-Allow-Origin:
chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]" [2014-12-11
11:01:05,296] DEBUG - wire >> "Access-Control-Max-Age: 300[\r][\n]"
[2014-12-11 11:01:05,296] DEBUG - wire >> "Cache-Control: no-cache,
no-store[\r][\n]" [2014-12-11 11:01:05,296] DEBUG - wire >> "Request-Id:
req_6lTYcDGOo7pvGyat[\r][\n]" [2014-12-11 11:01:05,296] DEBUG - wire >>
"Stripe-Version: 2014-11-20[\r][\n]" [2014-12-11 11:01:05,297] DEBUG - wire
>> "[\r][\n]" [2014-12-11 11:01:05,297] DEBUG - wire >> "{[\n]" [2014-12-11
11:01:05,297] DEBUG - wire >> " "error": {[\n]" [2014-12-11 11:01:05,297]
DEBUG - wire >> " "type": "invalid_request_error",[\n]" [2014-12-11
11:01:05,297] DEBUG - wire >> " "message": "*There is no payment with ID
{uri.var.chargeId}*.",[\n]" [2014-12-11 11:01:05,297] DEBUG - wire >> "
"param": "id"[\n]" [2014-12-11 11:01:05,297] DEBUG - wire >> " }[\n]"
[2014-12-11 11:01:05,297] DEBUG - wire >> "}[\n]" [2014-12-11 11:01:05,297]
DEBUG - headers http-outgoing-2 << HTTP/1.1 404 Not Found


On Thu, Dec 11, 2014 at 10:12 AM, Vanjikumaran Sivajothy <[email protected]>
wrote:

> Hi Keerthika,
>
> I have tried your use-case and notice your request is going with a
> payload. However, your back-end is not expecting that.
> Therefore you need to drop your message body in the request mediation flow.
>
> In order to drop the message payload you need to perform two tasks in the
> wso2 ESB.
>
> Create empty payload using Payload mediator
> <https://docs.wso2.com/display/ESB481/PayloadFactory+Mediator>
> use the FORCE_POST_PUT_NOBODY
> <https://docs.wso2.com/display/ESB481/HTTP+Transport+Properties#HTTPTransportProperties-FORCE_POST_PUT_NOBODY>property
> to enforce.
>
> Example is given below that demonstrate the use case.
>
> <api xmlns="http://ws.apache.org/ns/synapse"; name="strip" context="/strip">
>    <resource methods="POST GET">
>       <inSequence>
>          <header name="Authorization" scope="transport" value="Bearer 
> XXXXXXXXXXXXXXXXXXXXX"></header>
>          <property name="uri.var.chargeId" expression="json-eval($.chargeId)" 
> scope="default" type="STRING"></property>
>        *  <payloadFactory media-type="json">
> *
> *            <format></format>
> *
> *            <args></args>
> *
> *         </payloadFactory>*
>          <property name="ContentType" 
> value="application/x-www-form-urlencoded" scope="axis2"></property>
>          <property name="messageType" 
> value="application/x-www-form-urlencoded" scope="axis2"></property>
>         * <property name="FORCE_POST_PUT_NOBODY" value="true" scope="axis2" 
> type="BOOLEAN"></property>*
>          <call>
>             <endpoint>
>                <address 
> uri="https://api.stripe.com/v1/charges/{uri.var.chargeId}/refunds";></address>
>             </endpoint>
>          </call>
>          <respond></respond>
>       </inSequence>
>    </resource>
> </api>
>
>
> On Thu, Dec 11, 2014 at 10:06 AM, Keerthika Mahendralingam <
> [email protected]> wrote:
>
>> Hi all,
>> I am trying to send a post request to https://api.stripe.com/v1/charges/
>> <https://www.google.com/url?q=https%3A%2F%2Fapi.stripe.com%2Fv1%2Fcharges%2F&sa=D&sntz=1&usg=AFQjCNFej5mTQCtPacoinYr0qTl7-XDUeg>
>> {CHARGE_ID}/refunds.
>> There are some optional parameters for this request. When I invoked the
>> endpoint through esb with the optional parameters I am able to get the
>> expected response. But if I invoked the endpoint without the optional
>> parameters, an additional body is sent with the request.
>> Please find the wire log for the both requests with optional parameters
>> and mandatory parameter :
>>
>> *Wire log for the request with optional parameter:*
>>
>> [2014-12-11 09:35:54,151] DEBUG - wire >> "POST
>> /services/stripe_createANewRefund HTTP/1.1[\r][\n]"
>>
>> [2014-12-11 09:35:54,151] DEBUG - wire >> "Host:
>> keerthikas-macbook-pro.local:8280[\r][\n]"
>>
>> [2014-12-11 09:35:54,151] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
>>
>> [2014-12-11 09:35:54,151] DEBUG - wire >> "Content-Length: 61[\r][\n]"
>>
>> [2014-12-11 09:35:54,151] DEBUG - wire >> "Cache-Control:
>> no-cache[\r][\n]"
>>
>> [2014-12-11 09:35:54,151] DEBUG - wire >> "Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"
>>
>> [2014-12-11 09:35:54,151] DEBUG - wire >> "User-Agent: Mozilla/5.0
>> (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko)
>> Chrome/39.0.2171.71 Safari/537.36[\r][\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "Content-Type:
>> application/json[\r][\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "Accept: */*[\r][\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "Accept-Encoding: gzip,
>> deflate[\r][\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "Accept-Language:
>> en-US,en;q=0.8[\r][\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "Cookie: SERVERID=djc19[\r][\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "[\r][\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "{[\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >>
>> ""chargeId":"ch_158NuEDpl35Wu2ui6atArh0E",[\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "  "amount":"50"[\n]"
>>
>> [2014-12-11 09:35:54,152] DEBUG - wire >> "}"
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >> POST
>> /services/stripe_createANewRefund HTTP/1.1
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >> Host:
>> keerthikas-macbook-pro.local:8280
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >> Connection:
>> keep-alive
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >>
>> Content-Length: 61
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >>
>> Cache-Control: no-cache
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >> Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >> User-Agent:
>> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML,
>> like Gecko) Chrome/39.0.2171.71 Safari/537.36
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >>
>> Content-Type: application/json
>>
>> [2014-12-11 09:35:54,153] DEBUG - headers http-incoming-4 >> Accept: */*
>>
>> [2014-12-11 09:35:54,154] DEBUG - headers http-incoming-4 >>
>> Accept-Encoding: gzip, deflate
>>
>> [2014-12-11 09:35:54,154] DEBUG - headers http-incoming-4 >>
>> Accept-Language: en-US,en;q=0.8
>>
>> [2014-12-11 09:35:54,154] DEBUG - headers http-incoming-4 >> Cookie:
>> SERVERID=djc19
>>
>> [2014-12-11 09:35:54,156] ERROR - SynapseJsonPath #stringValueOf. Error
>> evaluating JSON Path <$.refundApplicationFee>. Returning empty result.
>> Error>>> invalid path
>>
>> [2014-12-11 09:35:54,156] ERROR - SynapseJsonPath #stringValueOf. Error
>> evaluating JSON Path <$.reason>. Returning empty result. Error>>> invalid
>> path
>>
>> [2014-12-11 09:35:54,157] ERROR - SynapseJsonPath #stringValueOf. Error
>> evaluating JSON Path <$.metadata>. Returning empty result. Error>>> invalid
>> path
>>
>> [2014-12-11 09:35:55,264] DEBUG - headers http-outgoing-2 >> POST
>> /v1/charges/ch_158NuEDpl35Wu2ui6atArh0E/refunds HTTP/1.1
>>
>> [2014-12-11 09:35:55,264] DEBUG - headers http-outgoing-2 >>
>> Accept-Language: en-US,en;q=0.8
>>
>> [2014-12-11 09:35:55,264] DEBUG - headers http-outgoing-2 >> Cookie:
>> SERVERID=djc19
>>
>> [2014-12-11 09:35:55,264] DEBUG - headers http-outgoing-2 >>
>> Authorization: Bearer sk_test_Gd3JGidPIzfPkMOC8ZGnPEdf
>>
>> [2014-12-11 09:35:55,264] DEBUG - headers http-outgoing-2 >>
>> Accept-Encoding: gzip, deflate
>>
>> [2014-12-11 09:35:55,264] DEBUG - headers http-outgoing-2 >> Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm
>>
>> [2014-12-11 09:35:55,265] DEBUG - headers http-outgoing-2 >>
>> Content-Type: application/x-www-form-urlencoded
>>
>> [2014-12-11 09:35:55,265] DEBUG - headers http-outgoing-2 >> Accept: */*
>>
>> [2014-12-11 09:35:55,265] DEBUG - headers http-outgoing-2 >>
>> Cache-Control: no-cache
>>
>> [2014-12-11 09:35:55,265] DEBUG - headers http-outgoing-2 >>
>> Transfer-Encoding: chunked
>>
>> [2014-12-11 09:35:55,265] DEBUG - headers http-outgoing-2 >> Host:
>> api.stripe.com:80
>>
>> [2014-12-11 09:35:55,265] DEBUG - headers http-outgoing-2 >> Connection:
>> Keep-Alive
>>
>> [2014-12-11 09:35:55,265] DEBUG - headers http-outgoing-2 >> User-Agent:
>> Synapse-PT-HttpComponents-NIO
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "POST /v1/charges/
>> *ch_158NuEDpl35Wu2ui6atArh0E*/refunds HTTP/1.1[\r][\n]"
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "Accept-Language:
>> en-US,en;q=0.8[\r][\n]"
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "Cookie: SERVERID=djc19[\r][\n]"
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "Authorization: Bearer
>> sk_test_Gd3JGidPIzfPkMOC8ZGnPEdf[\r][\n]"
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "Accept-Encoding: gzip,
>> deflate[\r][\n]"
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "Content-Type:
>> application/x-www-form-urlencoded[\r][\n]"
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "Accept: */*[\r][\n]"
>>
>> [2014-12-11 09:35:55,266] DEBUG - wire << "Cache-Control:
>> no-cache[\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "Transfer-Encoding:
>> chunked[\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "Host: api.stripe.com:80
>> [\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "User-Agent:
>> Synapse-PT-HttpComponents-NIO[\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "[\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "9[\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "*amount=50*[\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "0[\r][\n]"
>>
>> [2014-12-11 09:35:55,267] DEBUG - wire << "[\r][\n]"
>>
>> [2014-12-11 09:35:55,816] DEBUG - wire >> "HTTP/1.1 200 OK[\r][\n]"
>>
>> [2014-12-11 09:35:55,817] DEBUG - wire >> "Server: nginx[\r][\n]"
>>
>> [2014-12-11 09:35:55,817] DEBUG - wire >> "Date: Thu, 11 Dec 2014
>> 04:03:19 GMT[\r][\n]"
>>
>> [2014-12-11 09:35:55,817] DEBUG - wire >> "Content-Type:
>> application/json;charset=utf-8[\r][\n]"
>>
>> [2014-12-11 09:35:55,817] DEBUG - wire >> "Content-Length: 288[\r][\n]"
>>
>> [2014-12-11 09:35:55,817] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
>>
>> [2014-12-11 09:35:55,817] DEBUG - wire >>
>> "Access-Control-Allow-Credentials: true[\r][\n]"
>>
>> [2014-12-11 09:35:55,817] DEBUG - wire >> "Access-Control-Allow-Methods:
>> GET, POST, HEAD, OPTIONS, DELETE[\r][\n]"
>>
>> [2014-12-11 09:35:55,817] DEBUG - wire >> "Access-Control-Allow-Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "Access-Control-Max-Age:
>> 300[\r][\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "Cache-Control: no-cache,
>> no-store[\r][\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "Request-Id:
>> req_uaeMx7C2V5alRIbX[\r][\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "Stripe-Version:
>> 2014-11-20[\r][\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "Strict-Transport-Security:
>> max-age=31556926; includeSubDomains[\r][\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "[\r][\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "{[\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "  "id":
>> "re_158OAdDpl35Wu2uiaDnuKJlF",[\n]"
>>
>> [2014-12-11 09:35:55,818] DEBUG - wire >> "  "amount": 50,[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "  "currency": "usd",[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "  "created": 1418270599,[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "  "object": "refund",[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "  "balance_transaction":
>> "txn_158OAdDpl35Wu2uiUpoc8WfE",[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "  "metadata": {},[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "  "charge":
>> "ch_158NuEDpl35Wu2ui6atArh0E",[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "  "receipt_number": null,[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "  "reason": null[\n]"
>>
>> [2014-12-11 09:35:55,819] DEBUG - wire >> "}[\n]"
>>
>> [2014-12-11 09:35:55,820] DEBUG - headers http-outgoing-2 << HTTP/1.1 *200
>> OK*
>>
>> *Wire log for the request without  payload:*
>>
>> [2014-12-11 10:00:13,956] DEBUG - wire >> "POST
>> /services/stripe_createANewRefund HTTP/1.1[\r][\n]"
>>
>> [2014-12-11 10:00:13,956] DEBUG - wire >> "Host:
>> keerthikas-macbook-pro.local:8280[\r][\n]"
>>
>> [2014-12-11 10:00:13,956] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
>>
>> [2014-12-11 10:00:13,956] DEBUG - wire >> "Content-Length: 44[\r][\n]"
>>
>> [2014-12-11 10:00:13,956] DEBUG - wire >> "Cache-Control:
>> no-cache[\r][\n]"
>>
>> [2014-12-11 10:00:13,956] DEBUG - wire >> "Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"
>>
>> [2014-12-11 10:00:13,956] DEBUG - wire >> "User-Agent: Mozilla/5.0
>> (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko)
>> Chrome/39.0.2171.71 Safari/537.36[\r][\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >> "Content-Type:
>> application/json[\r][\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >> "Accept: */*[\r][\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >> "Accept-Encoding: gzip,
>> deflate[\r][\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >> "Accept-Language:
>> en-US,en;q=0.8[\r][\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >> "Cookie: SERVERID=djc19[\r][\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >> "[\r][\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >> "{[\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >>
>> ""chargeId":"ch_158NuEDpl35Wu2ui6atArh0E"[\n]"
>>
>> [2014-12-11 10:00:13,957] DEBUG - wire >> "}"
>>
>> [2014-12-11 10:00:13,957] DEBUG - headers http-incoming-5 >> POST
>> /services/stripe_createANewRefund HTTP/1.1
>>
>> [2014-12-11 10:00:13,957] DEBUG - headers http-incoming-5 >> Host:
>> keerthikas-macbook-pro.local:8280
>>
>> [2014-12-11 10:00:13,957] DEBUG - headers http-incoming-5 >> Connection:
>> keep-alive
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >>
>> Content-Length: 44
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >>
>> Cache-Control: no-cache
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >> Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >> User-Agent:
>> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML,
>> like Gecko) Chrome/39.0.2171.71 Safari/537.36
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >>
>> Content-Type: application/json
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >> Accept: */*
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >>
>> Accept-Encoding: gzip, deflate
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >>
>> Accept-Language: en-US,en;q=0.8
>>
>> [2014-12-11 10:00:13,958] DEBUG - headers http-incoming-5 >> Cookie:
>> SERVERID=djc19
>>
>> [2014-12-11 10:00:13,959] ERROR - SynapseJsonPath #stringValueOf. Error
>> evaluating JSON Path <$.amount>. Returning empty result. Error>>> invalid
>> path
>>
>> [2014-12-11 10:00:13,960] ERROR - SynapseJsonPath #stringValueOf. Error
>> evaluating JSON Path <$.refundApplicationFee>. Returning empty result.
>> Error>>> invalid path
>>
>> [2014-12-11 10:00:13,960] ERROR - SynapseJsonPath #stringValueOf. Error
>> evaluating JSON Path <$.reason>. Returning empty result. Error>>> invalid
>> path
>>
>> [2014-12-11 10:00:13,960] ERROR - SynapseJsonPath #stringValueOf. Error
>> evaluating JSON Path <$.metadata>. Returning empty result. Error>>> invalid
>> path
>>
>> [2014-12-11 10:00:14,847] DEBUG - headers http-outgoing-3 >> POST
>> /v1/charges/*ch_158NuEDpl35Wu2ui6atArh0E*/refunds HTTP/1.1
>>
>> [2014-12-11 10:00:14,847] DEBUG - headers http-outgoing-3 >>
>> Accept-Language: en-US,en;q=0.8
>>
>> [2014-12-11 10:00:14,847] DEBUG - headers http-outgoing-3 >> Cookie:
>> SERVERID=djc19
>>
>> [2014-12-11 10:00:14,847] DEBUG - headers http-outgoing-3 >>
>> Authorization: Bearer sk_test_Gd3JGidPIzfPkMOC8ZGnPEdf
>>
>> [2014-12-11 10:00:14,847] DEBUG - headers http-outgoing-3 >>
>> Accept-Encoding: gzip, deflate
>>
>> [2014-12-11 10:00:14,848] DEBUG - headers http-outgoing-3 >> Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm
>>
>> [2014-12-11 10:00:14,848] DEBUG - headers http-outgoing-3 >>
>> Content-Type: application/x-www-form-urlencoded
>>
>> [2014-12-11 10:00:14,848] DEBUG - headers http-outgoing-3 >> Accept: */*
>>
>> [2014-12-11 10:00:14,848] DEBUG - headers http-outgoing-3 >>
>> Cache-Control: no-cache
>>
>> [2014-12-11 10:00:14,848] DEBUG - headers http-outgoing-3 >>
>> Transfer-Encoding: chunked
>>
>> [2014-12-11 10:00:14,848] DEBUG - headers http-outgoing-3 >> Host:
>> api.stripe.com:80
>>
>> [2014-12-11 10:00:14,848] DEBUG - headers http-outgoing-3 >> Connection:
>> Keep-Alive
>>
>> [2014-12-11 10:00:14,848] DEBUG - headers http-outgoing-3 >> User-Agent:
>> Synapse-PT-HttpComponents-NIO
>>
>> [2014-12-11 10:00:14,848] DEBUG - wire << "POST
>> /v1/charges/ch_158NuEDpl35Wu2ui6atArh0E/refunds HTTP/1.1[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Accept-Language:
>> en-US,en;q=0.8[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Cookie: SERVERID=djc19[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Authorization: Bearer
>> sk_test_Gd3JGidPIzfPkMOC8ZGnPEdf[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Accept-Encoding: gzip,
>> deflate[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Content-Type:
>> application/x-www-form-urlencoded[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Accept: */*[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Cache-Control:
>> no-cache[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Transfer-Encoding:
>> chunked[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Host: api.stripe.com:80
>> [\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "User-Agent:
>> Synapse-PT-HttpComponents-NIO[\r][\n]"
>>
>> [2014-12-11 10:00:14,849] DEBUG - wire << "[\r][\n]"
>>
>> [2014-12-11 10:00:14,850] DEBUG - wire << "24[\r][\n]"
>>
>> [2014-12-11 10:00:14,850] DEBUG - wire << "
>> *chargeId=ch_158NuEDpl35Wu2ui6atArh0E*[\r][\n]"
>>
>> [2014-12-11 10:00:14,850] DEBUG - wire << "0[\r][\n]"
>>
>> [2014-12-11 10:00:14,850] DEBUG - wire << "[\r][\n]"
>>
>> [2014-12-11 10:00:15,173] DEBUG - wire >> "HTTP/1.1 400 Bad
>> Request[\r][\n]"
>>
>> [2014-12-11 10:00:15,173] DEBUG - wire >> "Server: nginx[\r][\n]"
>>
>> [2014-12-11 10:00:15,173] DEBUG - wire >> "Date: Thu, 11 Dec 2014
>> 04:27:38 GMT[\r][\n]"
>>
>> [2014-12-11 10:00:15,173] DEBUG - wire >> "Content-Type:
>> application/json;charset=utf-8[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "Content-Length: 137[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >>
>> "Access-Control-Allow-Credentials: true[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "Access-Control-Allow-Methods:
>> GET, POST, HEAD, OPTIONS, DELETE[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "Access-Control-Allow-Origin:
>> chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "Access-Control-Max-Age:
>> 300[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "Cache-Control: no-cache,
>> no-store[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "Request-Id:
>> req_cuszgRZsgLEJRDOS[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "Stripe-Version:
>> 2014-11-20[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "[\r][\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "{[\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "  "error": {[\n]"
>>
>> [2014-12-11 10:00:15,174] DEBUG - wire >> "    "type":
>> "invalid_request_error",[\n]"
>>
>> [2014-12-11 10:00:15,175] DEBUG - wire >> "    "message": "*Received
>> unknown parameter: chargeId*",[\n]"
>>
>> [2014-12-11 10:00:15,175] DEBUG - wire >> "    "param": "chargeId"[\n]"
>>
>> [2014-12-11 10:00:15,175] DEBUG - wire >> "  }[\n]"
>>
>> [2014-12-11 10:00:15,175] DEBUG - wire >> "}[\n]"
>>
>> [2014-12-11 10:00:15,175] DEBUG - headers http-outgoing-3 << HTTP/1.1 400
>> Bad Request
>>
>> *Please note that if I hardcode the value for chargeId in the proxy and
>> send a get request from the rest client without the optional parameters I
>> got the correct response. I got the error only when I sent the post request
>> with the payload from rest client.*
>>
>> *The template for this request is:*
>> <template name="createANewRefund" xmlns="http://ws.apache.org/ns/synapse
>> ">
>>     <parameter name="chargeId" description="The identifier of the charge
>> to be refunded."/>
>>     <parameter name="amount" description="card's expiration month"/>
>>     <sequence>
>>         <property name="uri.var.chargeId" expression="$func:chargeId"/>
>>         <property name="uri.var.amount" expression="$func:amount"/>
>>         <payloadFactory media-type="json">
>>               <format>
>>               {
>>               }
>>               </format>
>>          </payloadFactory>
>>          <script language="js"><![CDATA[
>>                  var amount=mc.getProperty('uri.var.amount');
>>                  var payload = mc.getPayloadJSON();
>>                  if (amount != null && amount != "") {
>>                         payload["amount"]=amount;
>>                  }
>>                  mc.setPayloadJSON(payload);
>>            ]]>
>>          </script>
>>         <property name="messageType"
>> value="application/x-www-form-urlencoded" scope="axis2"/>
>>         <header name="Content-Type"
>> value="application/x-www-form-urlencoded" scope="transport" />
>>         <header name="Authorization" value="Bearer
>> sk_test_Gd3JGidPIzfPkMOC8ZGnPEdf" scope="transport"/>
>>         <call>
>>             <endpoint>
>>                 <http method="post"
>>                       uri-template="https://api.stripe.com/v1/
>> charges/{uri.var.chargeId}/refunds"/>
>>             </endpoint>
>>         </call>
>>     </sequence>
>> </template>
>>
>>
>>
>> *Proxy for this service:*
>> <?xml version="1.0" encoding="UTF-8"?>
>> <proxy xmlns="http://ws.apache.org/ns/synapse";
>>        name="stripe_createANewRefund"
>>        transports="https,http"
>>        statistics="disable"
>>        trace="disable"
>>        startOnLoad="true">
>>     <target>
>>         <inSequence>
>>             <property name="chargeId" expression="json-eval($.chargeId)"/>
>>             <property name="amount" expression="json-eval($.amount)"/>
>>             <stripe.createANewRefund>
>>                 <chargeId>{$ctx:chargeId}</chargeId>
>>                 <amount>{$ctx:amount}</amount>
>>             </stripe.createANewRefund>
>>             <respond/>
>>         </inSequence>
>>         <outSequence>
>>             <send/>
>>         </outSequence>
>>     </target>
>>     <description/>
>> </proxy>
>>
>>
>> Thank you.
>> --
>> <[email protected]>
>> Keerthika Mahendralingam
>> Associate Software Engineer
>> Mobile :+94 (0) 776 121144
>> [email protected] <[email protected]>
>>
>
>
>
> --
> Sivajothy Vanjikumaran
> *Senior Software Engineer*
> *Integration Technologies Team*
> *WSO2 Inc. http://wso2.com <http://wso2.com/>*
> *Mobile:(+94)777219209*
> [image: Facebook] <https://www.facebook.com/vanjikumaran> [image: Twitter]
> <https://twitter.com/vanjikumaran> [image: LinkedIn]
> <http://www.linkedin.com/pub/vanjikumaran-sivajothy/25/b31/293> [image:
> Blogger] <http://vanjikumaran.blogspot.com/> [image: SlideShare]
> <http://www.slideshare.net/vanjikumaran>
>
> This communication may contain privileged or other
> confidential information and is intended exclusively for the addressee/s.
> If you are not the intended recipient/s, or believe that you may
> have received this communication in error, please reply to the
> sender indicating that fact and delete the copy you received and in
> addition, you should not print, copy, re-transmit, disseminate, or
> otherwise use the information contained in this communication.
> Internet communications cannot be guaranteed to be timely, secure, error
> or virus-free. The sender does not accept liability for any errors
> or omissions
>



-- 
<[email protected]>
Keerthika Mahendralingam
Associate Software Engineer
Mobile :+94 (0) 776 121144
[email protected] <[email protected]>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to