1

cust_id を入力することで顧客データを提供する単純な dss サービスを作成しました。

この Web サービスを http get リソースとして次の URL 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 サービスが cust_id をパラメーターとして渡すのではなく、URL から読み取るようにしたいと考えています。

つまり、DSS サービスを GET /services/getCustDetailDSS/cid/101/getDetail としてヒットしたい

DSS でこれを行うにはどうすればよいですか?

DSS で必要な変更を誰か提供してもらえますか?

4

2 に答える 2

3

為にGET /services/getCustDetailDSS/getDetail/cid/101

次のようにリソース パスを編集する必要があります。

<resource method="GET" path="getDetail/cid/{cid}">
于 2014-06-12T19:17:02.657 に答える