Krishna Logo
CLICK HERE TO SEE THE LOCATIONS
Divied
Ria / Kumar @ 1-(877) 864-8462

 

Loading
Latest News
Home Navigation Divied
SOFTWARE TESTING Navigation Divied WEBSERVICES-SOAPUI
Showing 1 - 10 of 11 Previous | 1 | 2 | Next
WEBSERVICES-SOAPUI

DAY 1    DAY 2



FOR GROOVY  FOR XQUERY 



CLICK HERE FOR THE LINK  


6URL FOR DELAYED STOCK QUOTE

http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl


7STOCK QUOTE WEBSERVICE WSDL FROM CDYNE

http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl


8SUGARCRM WSDL FILE AND GUIDE

 

http://173.66.101.6:81/sugarcrm/soap.php?wsdl

 
 

API USER GUIDE

 

http://dl.sugarforge.org/ws-testing/SOAPSonarforSugarCRM/GettingStarted/soapsonar_sugarcrm_getting_started.pdf


Copy these bellow two files from oracle installation to the SOAPUI insta...  


10

 SQL/XML in DB2

USE THE BELLOW COMMANDS  TO PRACTICE SQL/XML

' create table with one xmltype columnCREATE TABLE warehouses1(

warehouse_id NUMBER(4),

warehouse_spec XMLTYPE,

warehouse_name VARCHAR2(35),

location_id NUMBER(4));

'insert values into xmly type table with xml, in this case warehouse is the parent element

INSERT INTO warehouses VALUES

(       104, XMLType(

'

Owned

'), 'Tower Records', 1006);

'select the data from the table and check the data is created or not [carete multiple rows using above statemetn

SELECT * FROM WAREHOUSES

'dislay the data from the warehouses table based on the xml element in the warehouse_spec column

SELECT warehouse_id,X.*

FROM WAREHOUSES,

XMLTABLE ('$d /Warehouse' passing warehouse_spec as "d"

COLUMNS

whNo    integer    PATH '@whNo',

Building    VARCHAR(11)    PATH '/Warehouse/Building') AS X where Building ='Owned'

'alter the table and add one extra xml type column

alter table WAREHOUSES add rentamount xmltype

'describe and check the extra column is created or not

desc warehouses

'now insert data in to the newly created column in the warehouses table

insert into warehouses ('rentamount') values

XMLType( '

500

)

INSERT INTO warehouses VALUES

(       105, XMLType(

'

rented

'), 'Tower Records', 1006,

XMLType('

5000

'));

INSERT INTO warehouses VALUES

(       106, XMLType(

'

rented

'), 'Tower Records', 1006,

XMLType('

5000

'));

select * from warehouses

'create new table same as warehouses and name it as rental houses

create table rentalhouse as select * from warehouses

'simple join to join the tables of warehouses and rentalhouse based on warehouse_id

select w.warehouse_id ,w.warehouse_name,r.Location_id  from warehouses w   ,rentalhouse r where w.warehouse_id=r.warehouse_id

'IMPORTANT

'JOIN THE BOTH TABLES WAREHOUSES AND RENTALHOUSE BASED ON THE XML ELEMENTS IN BOTH THE TABLES

select w.warehouse_id,w.warehouse_name,X1.* from warehouses w,rentalhouse r,

XMLTABLE ('$d /Warehouse' passing w.warehouse_spec as "d"

COLUMNS

WID  NUMBER(4) PATH '@whNo') as X1,

XMLTABLE ('$C /Warehouse' passing r.warehouse_spec as "C"

COLUMNS

WID  NUMBER(4) PATH '@whNo') as X2 where X1.WID=X2.WID

'DISLAY THE DATA FROM ONE XMLTYPE COLUMN OF WAREHOUSES

select warehouse_id,warehouse_name,X1.* from warehouses,

XMLTABLE ('$d /Warehouse' passing warehouse_spec as "d"

COLUMNS

WID  NUMBER(4) PATH '@whNo') as X1

'IMPORTANT

'JOIN THE BOTH TABLES WAREHOUSES AND RENTALHOUSE BASED ON THE XML ELEMENTS IN BOTH THE TABLES

'2ND TIME

select W.warehouse_id,W.warehouse_name,X1.*,X2.* from warehouses W, rentalhouse R,

XMLTABLE ('$d /Warehouse' passing W.warehouse_spec as "d"

COLUMNS

WID  NUMBER(4) PATH '@whNo') as X1,

XMLTABLE ('$d /Warehouse' passing R.warehouse_spec as "d"

COLUMNS

WID  NUMBER(4) PATH '@whNo') as X2  where X1.WID=X2.WID

select * from warehouses

select * from rentalhouse

 

‘DELETE THE ROWS BASED ON THE XML ELEMENT VALUE

DELETE FROM warehouses e WHERE e.warehouse_spec.extract('//Building/text()').getStringVal()

= 'Leased';

JOINING TABLES BASED ON EXTRACTED STRING VALUE FROM XML FILE ELEMENTS

select  w.warehouse_id,r.warehouse_name from warehouses w,rentalhouse r where w.warehouse_spec.extract('//Building/text()').getstringval()='rented'

=============================

select  w.warehouse_id,r.warehouse_name,(w.warehouse_spec.extract('//Building/text()').getstringval()) as building from warehouses w,rentalhouse r where w.warehouse_spec.extract('//Building/text()').getstringval()=r.warehouse_spec.extract('//Building/text()').getstringval()

==================================

select  w.warehouse_id,r.warehouse_name,(w.warehouse_spec.extract('//Building/text()').getstringval()) as building from warehouses w,rentalhouse r where w.warehouse_spec.extract('//Building/text()').getstringval()= r.warehouse_spec.extract('//Building/text()').getstringval()

==============================================

select warehouse_id,existsnode(warehouse_spec,'/Warehouse/phone') from warehouses

==========================================

SELECT extractvalue(e.poDoc, '/PO/PNAME') PNAME

FROM po_xml_tab e

WHERE e.poDoc.existsNode('/PO/SHIPADDR') = 1 AND

extractvalue(e.poDoc,'//PONO') = 300 AND

extractvalue(e.poDoc,'//@CUSTNAME') like '%John%';

====================================

INSERT INTO warehouses VALUES

(       109, XMLType(

'

rented

3333333333

'), 'Tower Records', 1009,

XMLType('

9000

'));

=====================================

INSERT INTO warehouses VALUES

(       109, XMLType(

'

James

Bond

 

007

905-007-1007

77007

 

'),'rented',122);

==================================

select extractvalue(w.WAREHOUSE_SPEC,'/Warehouse/whNo') WAREHOUSENO

FROM warehouses w where w.WAREHOUSE_SPEC.existsnode('/Warehouse/phone') = 1

=====================================

UPDATE po_xml_tab

SET poDoc =  UPDATEXML(poDoc,

'/PO/CUSTNAME/text()', 'John');

=================================

UPDATE warehouses set warehouse_spec = updatexml(warehouse_spec,'/Warehouse/phone/text()','123456789');

============================

select * from warehouses

====================================

UPDATE emp_tab e

SET e.emp_col = UPDATEXML(e.emp_col,

'/EMPLOYEES/EMP[EMPNAME="Joe"]/SALARY/text()',100000,

'//EMP[EMPNAME="Jack"]/EMPNAME/text()','Jackson',

'//EMP[EMPNO=217]',XMLTYPE.CREATEXML(

'217Jane'))

WHERE EXISTSNODE(e.emp_col, '//EMP') = 1;

======================================

INSERT INTO warehouses VALUES

(       105, XMLType(

James

Bond

 

007

905-007-1007

77007

 

'), 'Tower Records', 1006,

XMLType('

5000

'));

======================================

SELECT X.*

FROM warehouses,

XMLTABLE (XMLNAMESPACES('http://www.ibm.com/xmltable' as "ibm"),'$d/ibm:dept/ibm:employee' passing warehouse_spec as "d"

COLUMNS

empID   INTEGER    PATH '@id',

firstname   VARCHAR(20)    PATH 'ibm:name/ibm:first',

lastname    VARCHAR(25)    PATH 'ibm:name/ibm:last') AS X

 

 

SQL/XML PRACTICE USING ORACLE DATABASE

 SQL/XML in DB2 USE THE BELLOW COMMANDS  TO PRACTICE SQL/XML ' create table with one xmltype columnCREATE TABLE warehouses1( warehouse_id NUMBER(4), wareho...  


Showing 1 - 10 of 11 Previous | 1 | 2 | Next
Shadow Bottom
   
© 2005 - 2014 Krishna Training.