Пример сервиса, как показано ниже,
<data name="dssTest" transports="http https local">
<config enableOData="false" id="TestDB">
<property name="driverClassName">...</property>
<property name="url">...</property>
<property name="username">...</property>
<property name="password">...</property>
</config>
<query id="testQuery" useConfig="TestDB">
<sql>Select sname from student where sname like CONCAT('%', :whereclause, '%')</sql>
<result element="StudentData" rowName="Student">
<element column="snumber" name="snumber" optional="true" xsdType="string"/>
<element column="sname" name="sname" optional="true" xsdType="string"/>
</result>
<param name="whereclause" sqlType="QUERY_STRING"/>
</query>
<operation name="testQueryOp">
<call-query href="testQuery">
<with-param name="whereclause" query-param="whereclause"/>
</call-query>
</operation>
</data>
При вызове этой услуги вы можете отправить значение для условия where.
<body>
<p:testQueryOp xmlns:p="http://ws.wso2.org/dataservice">
<p:whereclause>abc123</p:whereclause>
</p:testQueryOp>
</body>