WSO2의 ESB에서 만드는 나머지 서비스 열린 우리당 템플릿 여러 동안 내 INSEQUENCE GetNotificationsIN에내가 같은 나머지 서비스 만든
<api xmlns="http://ws.apache.org/ns/synapse" name="GetCacheDataAPI" context="/GetCacheData/GetNotifications">
<resource methods="GET" uri-template="?ID={searchValue}" inSequence="GetNotificationsIN" outSequence="GetNotificationsOUT"/>
</api>
는 내 페이로드입니다 : 지금 여기에 내가 통과
<payloadFactory>
<format>
<p:Cache xmlns:p="http://tempuri/Notification/">
<in xmlns="">
<xs:ID xmlns:xs="http://tempuri/Notification/">$1</xs:ID>
<xs:TagName xmlns:xs="http://tempuri/Notification/">$2</xs:TagName>
<xs:Category xmlns:xs="http://tempuri/Notification/">$3</xs:Category>
<xs:State xmlns:xs="http://tempuri/Notification/">$4</xs:State>
<xs:SourceID xmlns:xs="http://tempuri/Notification/">$5</xs:SourceID>
</in>
</p:Cache>
</format>
<args>
<arg expression="get-property('uri.var.searchValue')"/>
<arg expression="get-property('uri.var.searchValue')"/>
<arg expression="get-property('uri.var.searchValue')"/>
<arg expression="get-property('uri.var.searchValue')"/>
<arg expression="get-property('uri.var.searchValue')"/>
</args>
</payloadFactory>
단일 매개 변수 ie ID와 잘 작동합니다. 하지만 나머지 서비스를 구현 한 실제 서비스는 ID, 태그, 소스, 주 및 카테고리의 다섯 가지 매개 변수를 허용합니다. 실제 서비스에서는 ID, 태그, 소스, 주 또는 우선 순위 중 하나의 매개 변수를 전달할 수 있으며 전달 된 매개 변수를 기반으로 데이터를 제공합니다.
Simillarly 정확히 내 휴식 서비스에서 동일한 일을하고 싶습니다. 즉,이 5 개의 매개 변수를 구현하여 5 개의 URI를 템플릿 변수로 만들고 싶습니다. 논리에 따라 saperated 변수를 만들거나 나머지는 내가 url을 치면됩니다. uri 템플리트를 사용하여 서비스하면 실제 서비스의 응답을 제공해야합니다. 내가 어떻게 할 수 있니? 미리 감사드립니다.
답장을 보내 주셔서 감사합니다. Ratha, payload를 제공했습니다. 거기에는 사용자가 위의 매개 변수를 기반으로 데이터를 필터링 할 수있는 5 개의 매개 변수가 있음을 알 수 있습니다. 이제 소스 ID를 기반으로 데이터를 가져오고 싶습니다. http : //10.224.188.113 : 8281/GetCacheData/GetNotifications/SourceId? – Roy