Hi Chanaka, HTTP Endpoint can connect with any RESTful BE with any preferred URI template. There is no need of using REST_URL_POST with HTTP endpoint (after all, the reason for introducing HTTP EP to get rid of such tweaks when doing RESTful integration)
Please check the following example would address your requirement. (ESB 4.8) BE : http://127.0.0.1:8280/pizzashop/api/menu/pizza?val=thin&type=crust <endpoint> <http method="get" uri-template=" http://127.0.0.1:9764/pizzashop-rs_1.0/services/menu/pizza?q= {query.param.val}&type={query.param.type}"></http> </endpoint> On Sat, Jan 18, 2014 at 1:24 AM, Chanaka Fernando <[email protected]> wrote: > After going through the source code, I found this comment in the > Axis2FlexibleMEPClient.Java file. > > // HTTP Endpoint : use the specified HTTP method and remove > REST_URL_POSTFIX, it's not supported in HTTP Endpoint > if (endpoint.isHTTPEndpoint()) { > > axisOutMsgCtx.setProperty(Constants.Configuration.HTTP_METHOD, > synapseOutMessageContext.getProperty(Constants.Configuration.HTTP_METHOD)); > > axisOutMsgCtx.removeProperty(NhttpConstants.REST_URL_POSTFIX); > } > > Which means we are not supporting REST_URL_POSTFIX for http-endpoints. > > > Is there any workaround that we can achieve this? > > > On Fri, Jan 17, 2014 at 2:15 PM, Chanaka Fernando <[email protected]>wrote: > >> Hi, >> >> I am trying to send some query parameters with http endpoint which is >> defined as below. >> >> <api xmlns="http://ws.apache.org/ns/synapse" name="SampleAPI" >> context="/sample"> >> <resource methods="GET"> >> <inSequence> >> <property name="uri.var.version" >> expression="get-property('transport','Version')" scope="default" >> type="STRING"></property> >> <send> >> <endpoint> >> <http method="get" uri-template=" >> http://localhost:8280/TestAPI/{uri.var.version}"></http> >> </endpoint> >> </send> >> </inSequence> >> </resource> >> </api> >> >> >> In the above REST API, I am getting the "version" information from the >> header and recreate the URL with uri-template and send the request to the >> appropriate URL. When I am calling this endpoint, I need to send some query >> parameters to the actual REST endpoint. I am calling this REST API as below. >> >> Ex: http://localhost:8280/sample?a=2&b=3 >> >> I need this should be translated in to the below URL from my REST API. >> >> http://localhost:8280/TestAPI/2.0.0?a=2&b=3 >> >> >> But the issue is, the query parameters are not getting passed in to the >> backend REST endpoint. >> >> Is this a limitation in the uri-template support in the WSO2 ESB or how >> can I achieve this? >> >> >> Thanks, >> Chanaka >> >> -- >> -- >> Chanaka Fernando >> Technical Lead >> WSO2, Inc.; http://wso2.com >> lean.enterprise.middleware >> >> mobile: +94 773337238 >> Blog : http://soatutorials.blogspot.com >> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0 >> Twitter:https://twitter.com/chanakaudaya >> Wordpress:http://chanakaudaya.wordpress.com >> >> >> >> > > > -- > -- > Chanaka Fernando > Technical Lead > WSO2, Inc.; http://wso2.com > lean.enterprise.middleware > > mobile: +94 773337238 > Blog : http://soatutorials.blogspot.com > LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0 > Twitter:https://twitter.com/chanakaudaya > Wordpress:http://chanakaudaya.wordpress.com > > > > -- Kasun Indrasiri Software Architect WSO2, Inc.; http://wso2.com lean.enterprise.middleware cell: +94 77 556 5206 Blog : http://kasunpanorama.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
