Hi Ratha,

This is the expected behavior in http endpoint type. You need to define the
property as "uri.var.XXX" include inside the http endpoint. Please refer
the below definition.

 HTTP Endpoint <https://docs.wso2.org/display/ESB481/HTTP+Endpoint>
 <https://docs.wso2.org/display/ESB481/HTTP+Endpoint#page-metadata-start>

The *HTTP endpoint* allows you to define REST
endpoints<https://docs.wso2.org/display/ESB480/Working+with+Endpoints>using
URI
templates<https://docs.wso2.org/display/ESB480/Getting+Started+with+REST+APIs#GettingStartedwithRESTAPIs-URItemplates>similar
to the REST API. The URI templates allow a RESTful URI to contain
variables that can be populated during mediation runtime using property
values whose names have the "uri.var." prefix. An HTTP endpoint can also
define the particular HTTP method to use in the RESTful invocation.

Thanks,
Chanaka


On Wed, Mar 5, 2014 at 9:23 AM, Vijayaratha Vijayasingam <[email protected]>wrote:

> Hi ;
> I have defined following HTTP endpoints in my API;
>
>
> [1] <property name="zip" expression="$url:zip" scope="default"
> type="STRING"></property>
>
>    <send>
>
>       <endpoint>
>
>          <http method="get" uri-template="
> https://www.zipwise.com/webservices/zipinfo.php?key=62n0gsiy011b759i&amp;zip={zip}&amp;format=xml<https://www.zipwise.com/webservices/zipinfo.php?key=62n0gsiy011b759i&zip=%7Bzip%7D&format=xml>
> "></http>
>
>       </endpoint>
>
> The above[1] is not working, because, it is not appending the "zip"
> property value.
>
> [2]<property name="uri.var.zip" expression="$url:zip" scope="default"
> type="STRING"/>
>          <send>
>             <endpoint>
>                <http method="get" uri-template="
> https://www.zipwise.com/webservices/zipinfo.php?key=62n0gsiy011b759i&zip={uri.var.zip}&format=xml
> "/>
>             </endpoint>
>          </send>
>
> This is working, because i have defined the property with "uri.var" prefix.
>
> Now, what is the issue in my first configuration? I defined a property
> with my preferred value. Why ESB is not appending that property? only looks
> for "uri.var" properties?
>
> thanks
> --
> -Ratha
> mobile: (+94)755906608
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
--
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
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to