Created
July 8, 2019 03:49
-
-
Save abeykoon/99b3b8be469415debd85f245278ac19b to your computer and use it in GitHub Desktop.
Dat service definition - DoctorRegistry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<data name="findDoctor" serviceGroup="" serviceNamespace=""> | |
<description/> | |
<config id="doctorInformationStore"> | |
<property name="org.wso2.ws.dataservice.user">wso2</property> | |
<property name="org.wso2.ws.dataservice.password">wso2</property> | |
<property name="org.wso2.ws.dataservice.protocol">jdbc:mysql://mysqlDataStore:3306/doctors</property> | |
<property name="org.wso2.ws.dataservice.driver">com.mysql.jdbc.Driver</property> | |
</config> | |
<query id="queryDoctor" useConfig="doctorInformationStore"> | |
<sql>Select name, hospital from doctor where field=?</sql> | |
<param name="field" paramType="SCALAR" sqlType="STRING" type="IN"/> | |
<result element="doctors" rowName="doctor"> | |
<element column="name" name="name" xsdType="xs:string"/> | |
<element column="hospital" name="hospital" xsdType="xs:string"/> | |
</result> | |
</query> | |
<resource method="GET" path="doctor/{field}"> | |
<call-query href="queryDoctor"> | |
<with-param name="field" query-param="field"/> | |
</call-query> | |
</resource> | |
</data> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment