【发布时间】:2014-06-12 07:31:39
【问题描述】:
我创建了一个简单的 dss 服务,它通过输入 cust_id 为我提供客户数据。
我已将此 Web 服务公开为具有以下 url 的 http get 资源 获取 /services/getCustDetailDSS/getDetail?cid=101
我的服务对应的xml代码如下
<data name="getCustomerDetailDSS" serviceGroup="" serviceNamespace="">
<description/>
<config id="mydb">
<property name="carbon_datasource_name">mydb</property>
</config>
<query id="get_customer_detail" useConfig="mydb">
<sql>select identifier,user_status from customer_detail where identifier = :cid</sql>
<param name="cid" paramType="SCALAR" sqlType="STRING"/>
<result element="customer">
<element column="identifier" name="cid" xsdType="xs:string"/>
<element column="user_status" name="status" xsdType="xs:string"/>
</result>
</query>
<operation name="get_customer_detail_operation">
<call-query href="get_customer_detail">
<with-param name="cid" query-param="identifier"/>
</call-query>
</operation>
<resource method="GET" path="/getDetail">
<call-query href="get_customer_detail">
<with-param name="cid" query-param="cid"/>
</call-query>
</resource>
</data>
但现在我希望 dss 服务从 url 读取 cust_id 而不是将其作为参数传递。
即我想点击 dss 服务作为 获取 /services/getCustDetailDSS/cid/101/getDetail
我如何在 DSS 中做到这一点?
谁能提供我需要在我的 dss 中进行的 wat 更改?
【问题讨论】:
标签: wso2 wso2carbon wso2dss dss