[Wsf-general] data services and resources

sumedha rubasinghe sumedha at wso2.com
Wed Apr 4 05:08:34 PDT 2007


Skipped content of type multipart/alternative-------------- next part --------------
<data baseURI="xs:anyURI" name="TableCreateService">
    <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="create">
       <sql>create table student2(id int,name varchar(100),deptNo int,address varchar(100),email varchar(100))</sql>
     </query>

     <operation name="tableCreate">
       <call-query href="create">
       </call-query>
     </operation>
</data>
-------------- next part --------------
<data baseURI="xs:anyURI" name="StudentDeleteService">
    <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="deleteStudent">
       <!-- should appear in the correct order as in insert statement -->
       <param name="id" sqlType="INTEGER"/>
       <param name="name" sqlType="STRING"/>
       <sql>delete from student where id = ? and name = ?</sql>
     </query>

     <operation name="deleteStudentInfo">
       <call-query href="deleteStudent">
       </call-query>
     </operation>
</data>
-------------- next part --------------
<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>
-------------- next part --------------
<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>
-------------- next part --------------
<data baseURI="xs:anyURI" name="StudentInfoUpdateService">
    <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="updateStudent">
       <!-- should appear in the correct order as in insert statement -->
       <param name="name" sqlType="STRING"/>
       <param name="deptNo" sqlType="INTEGER"/>
       <param name="address" sqlType="STRING"/>
       <param name="id" sqlType="INTEGER"/>
       <sql>update student set name = ?,deptNo = ? ,address= ? where id = ?</sql>
     </query>

     <operation name="updateStudentInfo">
       <call-query href="updateStudent">
       </call-query>
     </operation>
</data>


More information about the Wsf-general mailing list