This is a static archive of the previous Open Grid Forum GridForge content management system saved from host forge.ogf.org file /sf/wiki/do/viewPage/projects.dais-wg/wiki/OGSADAIWSDAIRDeploy at Fri, 04 Nov 2022 20:51:02 GMT SourceForge : View Wiki Page: OGSADAIWSDAIRDeploy

Project Home

Tracker

Documents

Tasks

Source Code

Discussions

File Releases

Wiki

Project Admin
Search Wiki Pages Project: DAIS-WG     Wiki > OGSADAIWSDAIRDeploy > View Wiki Page
wiki2129: OGSADAIWSDAIRDeploy

OGSA-DAI WS-DAIR 1.0 deployment

Connection info

  • rpc/literal services: daiserver.epcc.ed.ac.uk port 20200
  • document/literal services: daiserver.epcc.ed.ac.uk port 20300
  • Data resource ID: wsdai:BookDB
  • Database table: dair_littleblackbook

Using the OGSA-DAI WS-DAIR client and example queries

See http://www.ogsadai.org.uk/documentation/ogsadaiwsdair1.0/html/DAIRClient.html

$ cd wsdair-1.0-axis-1.4-bin

$ source setenv.sh

Property doc

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlPropertyDoc

Query

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlExecute -expr "SELECT * FROM dair_littleblackbook WHERE id < 10;"

Parameterised query

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlExecute -expr "SELECT * FROM dair_littleblackbook WHERE id > ? AND id < ?;" -pvalue 1 10 -pmode IN IN -ptype INTEGER INTEGER -format csv

Function

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlExecute -expr "SELECT func_in_out(?);" -pvalue 1 -pmode IN -ptype INTEGER -format csv

Procedure

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlExecute -expr "CALL proc_only_in(?);" -pvalue 1 -pmode IN -ptype INTEGER -format csv

INOUT - use as IN

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlExecute -expr "CALL proc_in_out_inout(?, ?, ?);" -pvalue 1 a b -pmode IN OUT OUT -ptype INTEGER VARCHAR INTEGER -format csv

INOUT - use as OUT

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlExecute -expr "CALL proc_in_out_inout(?, ?, ?);" -pvalue 1 a 10 -pmode IN OUT IN -ptype INTEGER VARCHAR INTEGER -format csv

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlExecute -expr "CALL proc_in_out(?, ?, ?);" -pvalue 1 a b -pmode IN OUT OUT -ptype INTEGER VARCHAR INTEGER -format csv

$ java uk.org.ogsadai.wsdai.client.toolkit.example.DAIRClient -u http://daiserver.epcc.ed.ac.uk:20200/dai/services -d wsdai:BookDB -c sqlExecute -expr "CALL proc_many(?);" -pvalue 1 -pmode IN -ptype INTEGER -format csv

document/literal and rpc/literal on the wire

Examples grabbed using Apache TCPMon: OGSA-DAI-WSDAIR-doc-rpc.txt

Stored procedures available

func_in_out(param1 INT) RETURNS VARCHAR(30)

  • Outputs a single return value - name WHERE id=param1.

proc_in_out_inout(IN param1 INT, OUT param2 VARCHAR(30),INOUT param3 INT)

  • Outputs 1 result set (* WHERE id = param3) - empty if param3 undefined.
  • Outputs 1 update count.
  • Sets param2 to be name WHERE id = param1
  • Sets param3 to be COUNT(id) where name='nothing' (after update of names of all those rows where name is equal to the name of id=param + 1)

proc_in_out(IN param1 INT, OUT param2 VARCHAR(30),OUT param3 INT)

  • Outputs 1 result set (* WHERE id = param1 + 1)
  • Outputs 1 update count.
  • Sets param2 to be name WHERE id = param1
  • Sets param3 to be COUNT(id) where name='nothing' (after update of names of all those rows where name is equal to the name of id=param + 1)

proc_only_in(IN param1 INT)

  • Outputs 2 result sets (name WHERE id = param1 and name WHERE id = param1 + 1)
  • Outputs 1 update count.

proc_many(IN param1 INT)

  • Outputs 3 result sets (name WHERE id < param1, WHERE id = param1 + 1, WHERE id > param1 + 1 and < 20)
  • Outputs 1 update count.
Attachments:
OGSA-DAI-WSDAIR-doc-rpc.txt [OGSADAIWSDAIRDeploy/OGSA-DAI-WSDAIR-doc-rpc.txt]
 



Versions Associations Attachments (1) Back Links  
Version Version Comment Created By
Version 7 Mike Jackson - 04/17/2009
Version 6 Mike Jackson - 04/17/2009
Version 5 Mike Jackson - 04/17/2009
Version 4 Mike Jackson - 04/17/2009
Version 3 Mike Jackson - 04/17/2009
Version 2 Mike Jackson - 04/17/2009
Version 1 Mike Jackson - 04/17/2009



The Open Grid Forum Contact Webmaster | Report a problem | GridForge Help
This is a static archive of the previous Open Grid Forum GridForge content management system saved from host forge.ogf.org file /sf/wiki/do/viewPage/projects.dais-wg/wiki/OGSADAIWSDAIRDeploy at Fri, 04 Nov 2022 20:51:11 GMT