Re: [Dev] [DEV][ESB] Use of REST_URL_POSTFIX

2015-06-13 Thread Kasun Indrasiri
For outbound RESTful invocations, it is recommended to use HTTP
endpoint[1]. With that you can completely eliminate REST_URL_POSTFIX.

[1]
http://wso2.com/library/articles/2013/12/restful-integration-with-wso2-esb/

On Sat, Jun 13, 2015 at 3:25 PM, Malaka Silva mal...@wso2.com wrote:

 According to the current logic it only worked for rest format.

 On Fri, Jun 12, 2015 at 8:45 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Hi Malaka,

 Thanks for response! Does this property only work for REST endpoints? I
 know it's named REST_URL_POSTFIX, however if I want to append some params
 to a SOAP endpoint do I have another option?


 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Wed, Jun 10, 2015 at 9:58 PM, Malaka Silva mal...@wso2.com wrote:

 Can you try adding following to the endpoint and check

 format=rest

 eg:-
 send
endpoint
   address uri=
 http://localhost:9000/services/SimpleStockQuoteService; format=rest/
 address
/endpoint
 /send

 On Thu, Jun 11, 2015 at 1:18 AM, Chamila De Alwis chami...@wso2.com
 wrote:

 Ping! :)


 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 4:14 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Update:

 I created a simple API and used the Call mediator to call the endpoint
 and appending was successful for both POST and GET. The issue is when this
 is used in a Proxy definition.

 API
 
 api xmlns=http://ws.apache.org/ns/synapse; name=Test01
 context=/test
resource methods=POST GET outSequence=main
 faultSequence=fault
   inSequence
  property name=REST_URL_POSTFIX value=chamila
 scope=axis2 type=STRING/property
  log level=full/log
  call
 endpoint
address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
 /endpoint
  /call
   /inSequence
/resource
 /api



 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 2:19 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Hi,

 I'm trying to append a set of query parameters to an endpoint. For
 this I'm using the REST_URL_POSTFIX property and setting a value to it.
 The value is successfully appended to the endpoint address when the HTTP
 method is GET, however, for POST this does not work. Have I missed any
 detail?

 (Using the ESB sample 1 Synapse config)

 Synapse Config
 =
 sequence xmlns=http://ws.apache.org/ns/synapse; name=main
in
   property name=HTTP_METHOD value=POST scope=axis2
 type=STRING/property
 *  property name=REST_URL_POSTFIX value=/chamila
 scope=axis2 type=STRING/property*
   filter xmlns:ns=http://org.apache.synapse/xsd;
 source=get-property('To') regex=.*/StockQuote.*
  then
 send
endpoint
   address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
/endpoint
 /send
  /then
  else/else
   /filter
/in
out
   send/send
/out
 /sequence


 Wirelog when HTTP method is *GET*
 =
 [2015-06-08 14:15:54,118] DEBUG - wire  POST /services/StockQuote
 HTTP/1.1[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  User-Agent: Axis2[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Host:
 localhost:8280[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Transfer-Encoding:
 chunked[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  [\r][\n]
 [2015-06-08 14:15:54,121] DEBUG - wire  1d6[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  ?xml version=1.0
 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header
 xmlns:wsa=http://www.w3.org/2005/08/addressing;wsa:MessageIDurn:uuid:5060be98-5fbf-4985-a05b-1e1dd3727d91/wsa:MessageIDwsa:Actionurn:getQuote/wsa:Action/soapenv:Headersoapenv:Bodym0:getQuote
 xmlns:m0=http://services.samples
 m0:requestm0:symbolIBM/m0:symbol/m0:request/m0:getQuote/soapenv:Body/soapenv:Envelope[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  0[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  [\r][\n]
 *[2015-06-08 14:15:54,129] DEBUG - wire  GET
 /services/SimpleStockQuoteService/chamila HTTP/1.1[\r][\n]*
 [2015-06-08 14:15:54,132] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  Host:
 localhost:9000[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  Connection:
 

Re: [Dev] [DEV][ESB] Use of REST_URL_POSTFIX

2015-06-13 Thread Malaka Silva
According to the current logic it only worked for rest format.

On Fri, Jun 12, 2015 at 8:45 PM, Chamila De Alwis chami...@wso2.com wrote:

 Hi Malaka,

 Thanks for response! Does this property only work for REST endpoints? I
 know it's named REST_URL_POSTFIX, however if I want to append some params
 to a SOAP endpoint do I have another option?


 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Wed, Jun 10, 2015 at 9:58 PM, Malaka Silva mal...@wso2.com wrote:

 Can you try adding following to the endpoint and check

 format=rest

 eg:-
 send
endpoint
   address uri=
 http://localhost:9000/services/SimpleStockQuoteService; format=rest/
 address
/endpoint
 /send

 On Thu, Jun 11, 2015 at 1:18 AM, Chamila De Alwis chami...@wso2.com
 wrote:

 Ping! :)


 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 4:14 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Update:

 I created a simple API and used the Call mediator to call the endpoint
 and appending was successful for both POST and GET. The issue is when this
 is used in a Proxy definition.

 API
 
 api xmlns=http://ws.apache.org/ns/synapse; name=Test01
 context=/test
resource methods=POST GET outSequence=main
 faultSequence=fault
   inSequence
  property name=REST_URL_POSTFIX value=chamila
 scope=axis2 type=STRING/property
  log level=full/log
  call
 endpoint
address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
 /endpoint
  /call
   /inSequence
/resource
 /api



 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 2:19 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Hi,

 I'm trying to append a set of query parameters to an endpoint. For
 this I'm using the REST_URL_POSTFIX property and setting a value to it.
 The value is successfully appended to the endpoint address when the HTTP
 method is GET, however, for POST this does not work. Have I missed any
 detail?

 (Using the ESB sample 1 Synapse config)

 Synapse Config
 =
 sequence xmlns=http://ws.apache.org/ns/synapse; name=main
in
   property name=HTTP_METHOD value=POST scope=axis2
 type=STRING/property
 *  property name=REST_URL_POSTFIX value=/chamila
 scope=axis2 type=STRING/property*
   filter xmlns:ns=http://org.apache.synapse/xsd;
 source=get-property('To') regex=.*/StockQuote.*
  then
 send
endpoint
   address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
/endpoint
 /send
  /then
  else/else
   /filter
/in
out
   send/send
/out
 /sequence


 Wirelog when HTTP method is *GET*
 =
 [2015-06-08 14:15:54,118] DEBUG - wire  POST /services/StockQuote
 HTTP/1.1[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  User-Agent: Axis2[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Host:
 localhost:8280[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Transfer-Encoding:
 chunked[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  [\r][\n]
 [2015-06-08 14:15:54,121] DEBUG - wire  1d6[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  ?xml version=1.0
 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
 http://www.w3.org/2005/08/addressing;wsa:MessageIDurn:uuid:5060be98-5fbf-4985-a05b-1e1dd3727d91/wsa:MessageIDwsa:Actionurn:getQuote/wsa:Action/soapenv:Headersoapenv:Bodym0:getQuote
 xmlns:m0=http://services.samples
 m0:requestm0:symbolIBM/m0:symbol/m0:request/m0:getQuote/soapenv:Body/soapenv:Envelope[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  0[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  [\r][\n]
 *[2015-06-08 14:15:54,129] DEBUG - wire  GET
 /services/SimpleStockQuoteService/chamila HTTP/1.1[\r][\n]*
 [2015-06-08 14:15:54,132] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  Host:
 localhost:9000[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  Connection:
 Keep-Alive[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  User-Agent:
 Synapse-HttpComponents-NIO[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  [\r][\n]




 Wirelog when HTTP method is *POST*
 ==
 [2015-06-08 14:14:52,682] DEBUG - wire  POST /services/StockQuote
 

Re: [Dev] [DEV][ESB] Use of REST_URL_POSTFIX

2015-06-12 Thread Chamila De Alwis
Hi Malaka,

Thanks for response! Does this property only work for REST endpoints? I
know it's named REST_URL_POSTFIX, however if I want to append some params
to a SOAP endpoint do I have another option?


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Wed, Jun 10, 2015 at 9:58 PM, Malaka Silva mal...@wso2.com wrote:

 Can you try adding following to the endpoint and check

 format=rest

 eg:-
 send
endpoint
   address uri=
 http://localhost:9000/services/SimpleStockQuoteService; format=rest/
 address
/endpoint
 /send

 On Thu, Jun 11, 2015 at 1:18 AM, Chamila De Alwis chami...@wso2.com
 wrote:

 Ping! :)


 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 4:14 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Update:

 I created a simple API and used the Call mediator to call the endpoint
 and appending was successful for both POST and GET. The issue is when this
 is used in a Proxy definition.

 API
 
 api xmlns=http://ws.apache.org/ns/synapse; name=Test01
 context=/test
resource methods=POST GET outSequence=main faultSequence=fault
   inSequence
  property name=REST_URL_POSTFIX value=chamila scope=axis2
 type=STRING/property
  log level=full/log
  call
 endpoint
address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
 /endpoint
  /call
   /inSequence
/resource
 /api



 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 2:19 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Hi,

 I'm trying to append a set of query parameters to an endpoint. For this
 I'm using the REST_URL_POSTFIX property and setting a value to it.  The
 value is successfully appended to the endpoint address when the HTTP method
 is GET, however, for POST this does not work. Have I missed any detail?

 (Using the ESB sample 1 Synapse config)

 Synapse Config
 =
 sequence xmlns=http://ws.apache.org/ns/synapse; name=main
in
   property name=HTTP_METHOD value=POST scope=axis2
 type=STRING/property
 *  property name=REST_URL_POSTFIX value=/chamila scope=axis2
 type=STRING/property*
   filter xmlns:ns=http://org.apache.synapse/xsd;
 source=get-property('To') regex=.*/StockQuote.*
  then
 send
endpoint
   address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
/endpoint
 /send
  /then
  else/else
   /filter
/in
out
   send/send
/out
 /sequence


 Wirelog when HTTP method is *GET*
 =
 [2015-06-08 14:15:54,118] DEBUG - wire  POST /services/StockQuote
 HTTP/1.1[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  User-Agent: Axis2[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Host: localhost:8280[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Transfer-Encoding:
 chunked[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  [\r][\n]
 [2015-06-08 14:15:54,121] DEBUG - wire  1d6[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  ?xml version=1.0
 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
 http://www.w3.org/2005/08/addressing;wsa:MessageIDurn:uuid:5060be98-5fbf-4985-a05b-1e1dd3727d91/wsa:MessageIDwsa:Actionurn:getQuote/wsa:Action/soapenv:Headersoapenv:Bodym0:getQuote
 xmlns:m0=http://services.samples
 m0:requestm0:symbolIBM/m0:symbol/m0:request/m0:getQuote/soapenv:Body/soapenv:Envelope[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  0[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  [\r][\n]
 *[2015-06-08 14:15:54,129] DEBUG - wire  GET
 /services/SimpleStockQuoteService/chamila HTTP/1.1[\r][\n]*
 [2015-06-08 14:15:54,132] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  Host: localhost:9000[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  Connection:
 Keep-Alive[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  User-Agent:
 Synapse-HttpComponents-NIO[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  [\r][\n]




 Wirelog when HTTP method is *POST*
 ==
 [2015-06-08 14:14:52,682] DEBUG - wire  POST /services/StockQuote
 HTTP/1.1[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  

Re: [Dev] [DEV][ESB] Use of REST_URL_POSTFIX

2015-06-10 Thread Chamila De Alwis
Ping! :)


Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Mon, Jun 8, 2015 at 4:14 PM, Chamila De Alwis chami...@wso2.com wrote:

 Update:

 I created a simple API and used the Call mediator to call the endpoint and
 appending was successful for both POST and GET. The issue is when this is
 used in a Proxy definition.

 API
 
 api xmlns=http://ws.apache.org/ns/synapse; name=Test01
 context=/test
resource methods=POST GET outSequence=main faultSequence=fault
   inSequence
  property name=REST_URL_POSTFIX value=chamila scope=axis2
 type=STRING/property
  log level=full/log
  call
 endpoint
address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
 /endpoint
  /call
   /inSequence
/resource
 /api



 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 2:19 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Hi,

 I'm trying to append a set of query parameters to an endpoint. For this
 I'm using the REST_URL_POSTFIX property and setting a value to it.  The
 value is successfully appended to the endpoint address when the HTTP method
 is GET, however, for POST this does not work. Have I missed any detail?

 (Using the ESB sample 1 Synapse config)

 Synapse Config
 =
 sequence xmlns=http://ws.apache.org/ns/synapse; name=main
in
   property name=HTTP_METHOD value=POST scope=axis2
 type=STRING/property
 *  property name=REST_URL_POSTFIX value=/chamila scope=axis2
 type=STRING/property*
   filter xmlns:ns=http://org.apache.synapse/xsd;
 source=get-property('To') regex=.*/StockQuote.*
  then
 send
endpoint
   address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
/endpoint
 /send
  /then
  else/else
   /filter
/in
out
   send/send
/out
 /sequence


 Wirelog when HTTP method is *GET*
 =
 [2015-06-08 14:15:54,118] DEBUG - wire  POST /services/StockQuote
 HTTP/1.1[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  User-Agent: Axis2[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Host: localhost:8280[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Transfer-Encoding:
 chunked[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  [\r][\n]
 [2015-06-08 14:15:54,121] DEBUG - wire  1d6[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  ?xml version=1.0
 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
 http://www.w3.org/2005/08/addressing;wsa:MessageIDurn:uuid:5060be98-5fbf-4985-a05b-1e1dd3727d91/wsa:MessageIDwsa:Actionurn:getQuote/wsa:Action/soapenv:Headersoapenv:Bodym0:getQuote
 xmlns:m0=http://services.samples
 m0:requestm0:symbolIBM/m0:symbol/m0:request/m0:getQuote/soapenv:Body/soapenv:Envelope[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  0[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  [\r][\n]
 *[2015-06-08 14:15:54,129] DEBUG - wire  GET
 /services/SimpleStockQuoteService/chamila HTTP/1.1[\r][\n]*
 [2015-06-08 14:15:54,132] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  Host: localhost:9000[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  Connection: Keep-Alive[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  User-Agent:
 Synapse-HttpComponents-NIO[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  [\r][\n]




 Wirelog when HTTP method is *POST*
 ==
 [2015-06-08 14:14:52,682] DEBUG - wire  POST /services/StockQuote
 HTTP/1.1[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  User-Agent: Axis2[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  Host: localhost:8280[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  Transfer-Encoding:
 chunked[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  [\r][\n]
 [2015-06-08 14:14:52,684] DEBUG - wire  1d6[\r][\n]
 [2015-06-08 14:14:52,684] DEBUG - wire  ?xml version=1.0
 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
 http://www.w3.org/2005/08/addressing;wsa:MessageIDurn:uuid:b11ddaf0-12a4-4e0a-bcc0-63ca2db55eec/wsa:MessageIDwsa:Actionurn:getQuote/wsa:Action/soapenv:Headersoapenv:Bodym0:getQuote
 xmlns:m0=http://services.samples
 

Re: [Dev] [DEV][ESB] Use of REST_URL_POSTFIX

2015-06-10 Thread Malaka Silva
Can you try adding following to the endpoint and check

format=rest

eg:-
send
   endpoint
  address uri=
http://localhost:9000/services/SimpleStockQuoteService; format=rest/
address
   /endpoint
/send

On Thu, Jun 11, 2015 at 1:18 AM, Chamila De Alwis chami...@wso2.com wrote:

 Ping! :)


 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 4:14 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Update:

 I created a simple API and used the Call mediator to call the endpoint
 and appending was successful for both POST and GET. The issue is when this
 is used in a Proxy definition.

 API
 
 api xmlns=http://ws.apache.org/ns/synapse; name=Test01
 context=/test
resource methods=POST GET outSequence=main faultSequence=fault
   inSequence
  property name=REST_URL_POSTFIX value=chamila scope=axis2
 type=STRING/property
  log level=full/log
  call
 endpoint
address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
 /endpoint
  /call
   /inSequence
/resource
 /api



 Regards,
 Chamila de Alwis
 Committer and PMC Member - Apache Stratos
 Software Engineer | WSO2 | +94772207163
 Blog: code.chamiladealwis.com



 On Mon, Jun 8, 2015 at 2:19 PM, Chamila De Alwis chami...@wso2.com
 wrote:

 Hi,

 I'm trying to append a set of query parameters to an endpoint. For this
 I'm using the REST_URL_POSTFIX property and setting a value to it.  The
 value is successfully appended to the endpoint address when the HTTP method
 is GET, however, for POST this does not work. Have I missed any detail?

 (Using the ESB sample 1 Synapse config)

 Synapse Config
 =
 sequence xmlns=http://ws.apache.org/ns/synapse; name=main
in
   property name=HTTP_METHOD value=POST scope=axis2
 type=STRING/property
 *  property name=REST_URL_POSTFIX value=/chamila scope=axis2
 type=STRING/property*
   filter xmlns:ns=http://org.apache.synapse/xsd;
 source=get-property('To') regex=.*/StockQuote.*
  then
 send
endpoint
   address uri=
 http://localhost:9000/services/SimpleStockQuoteService;/address
/endpoint
 /send
  /then
  else/else
   /filter
/in
out
   send/send
/out
 /sequence


 Wirelog when HTTP method is *GET*
 =
 [2015-06-08 14:15:54,118] DEBUG - wire  POST /services/StockQuote
 HTTP/1.1[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,119] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  User-Agent: Axis2[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Host: localhost:8280[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  Transfer-Encoding:
 chunked[\r][\n]
 [2015-06-08 14:15:54,120] DEBUG - wire  [\r][\n]
 [2015-06-08 14:15:54,121] DEBUG - wire  1d6[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  ?xml version=1.0
 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/;soapenv:Header xmlns:wsa=
 http://www.w3.org/2005/08/addressing;wsa:MessageIDurn:uuid:5060be98-5fbf-4985-a05b-1e1dd3727d91/wsa:MessageIDwsa:Actionurn:getQuote/wsa:Action/soapenv:Headersoapenv:Bodym0:getQuote
 xmlns:m0=http://services.samples
 m0:requestm0:symbolIBM/m0:symbol/m0:request/m0:getQuote/soapenv:Body/soapenv:Envelope[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  0[\r][\n]
 [2015-06-08 14:15:54,122] DEBUG - wire  [\r][\n]
 *[2015-06-08 14:15:54,129] DEBUG - wire  GET
 /services/SimpleStockQuoteService/chamila HTTP/1.1[\r][\n]*
 [2015-06-08 14:15:54,132] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:15:54,132] DEBUG - wire  Host: localhost:9000[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  Connection:
 Keep-Alive[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  User-Agent:
 Synapse-HttpComponents-NIO[\r][\n]
 [2015-06-08 14:15:54,133] DEBUG - wire  [\r][\n]




 Wirelog when HTTP method is *POST*
 ==
 [2015-06-08 14:14:52,682] DEBUG - wire  POST /services/StockQuote
 HTTP/1.1[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  Content-Type: text/xml;
 charset=UTF-8[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  SOAPAction:
 urn:getQuote[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  User-Agent: Axis2[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  Host: localhost:8280[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  Transfer-Encoding:
 chunked[\r][\n]
 [2015-06-08 14:14:52,683] DEBUG - wire  [\r][\n]
 [2015-06-08 14:14:52,684] DEBUG - wire  1d6[\r][\n]
 [2015-06-08 14:14:52,684] DEBUG - wire  ?xml version=1.0