Dashboard > WSO2 WSF- General > ... > Data Services and Resources > Data services implementation status
  WSO2 WSF- General Log in | Register   View a printable version of the current page.  
  Data services implementation status
Added by sumedha rubasinghe , last edited by sumedha rubasinghe on Apr 17, 2007  (view change)
Labels: 
(None)

The implementation done so far supports following configuration file formats.

Select

<data baseURI="xs:anyURI" name="StudentInfoService">
    <config>
        <!-- mysql connection settings -->
    	<property name="driver">com.mysql.jdbc.Driver</property>
    	<property name="protocol">jdbc:mysql://localhost:3306/projects</property>

    	<property name="user">datauser</property>
    	<property name="password">wso2</property>
    </config>

    <query id="studentInfo">
       <param name="index" sqlType="INTEGER"/>
       <sql>select name, id,deptNo, email from student where id = ?</sql>
        <result element="students" rowName="student">
          <element name="Name" column="name"/>
          <element name="Index" column="id"/>
          <element name="E-mail" column="email"/>
          <call-query href="allDepartments"></call-query>
        </result>
     </query>

    <query id="allDepartments">
       <param name="deptNo" sqlType="INTEGER"/>
       <sql>select id, name from department where id=?</sql>
        <result element="departments" rowName="department">
          <element name="ID" column="id"/>
          <element name="Name" column="name"/>
        </result>
     </query>

     <operation name="getStudentByProjectId">
       <call-query href="studentInfo">
        <with-param name="indexParam" query-param="index"/>
       </call-query>
     </operation>
</data>

Insert

<data baseURI="xs:anyURI" name="StudentRegisterService">
    <config>
        <!-- mysql connection settings -->
    	<property name="driver">com.mysql.jdbc.Driver</property>
    	<property name="protocol">jdbc:mysql://localhost:3306/projects</property>

    	<property name="user">datauser</property>
    	<property name="password">wso2</property>
    </config>

    <query id="addStudentInfo">
       <!-- should appear in the correct order as in insert statement -->
       <param name="id" sqlType="INTEGER"/>
       <param name="name" sqlType="STRING"/>
       <param name="deptNo" sqlType="INTEGER"/>
       <param name="email" sqlType="STRING"/>
       <sql>insert into student (id,name,deptNo,email) values (?,?,?,?)</sql>
     </query>

     <operation name="addStudent">
       <call-query href="addStudentInfo">
       </call-query>
     </operation>
</data>

Powered by a free Atlassian Confluence Open Source Project License granted to WSO2 Inc.. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators