Beruflich Dokumente
Kultur Dokumente
Oracle
Presenter Raymond Jones
Company Intermountain Healthcare
Background We are implementing a
new ERP system (Peoplesoft) and have
decided to do all interfaces using web
services. Oracle SOA Suite will be used
to develop the web services. My team
will be calling these web services from
Oracle E-Business Suite.
WSDL
Web Services Description Language XML
document that is used to describe how a service
is called.
Tools such as soapUI are available that will read
the WSDL and provide the details needed to call
the service.
Example:
http://www.webservicex.net/stockquote.asmx?
WSDL
soapUI
Server
Note: Proxy server did not work for me because soapUI uses
NTLMv1 authentication and our proxy is using NTLMv2. A
workaround is to access WSDL in browser and then save to
local machine and then access that file from soapUI
VARCHAR2
IN
XMLTYPE
OUT XMLTYPE
OUT VARCHAR2);
EXCEPTION
WHEN OTHERS THEN
p_error_message := 'Location=ihchr_web.call_service-'||v_location||chr(10)||
SUBSTR(SQLERRM,1,240);
END;
END ihchr_web;
Parsing XML
xpath
Namespace
Oracle functions
XPATH
XML namespace
EXTRACT
Syntax: xml_doc.EXTRACT(xpath,namespace).getvalue
Example:
v_xml_response.EXTRACT(/soap:store/book[1]/text(),xmlsn:soap
=http://www.w3.org).getstringval()
XMLSEQUENCE
Syntax: table(xmlsequence(extract(xml_doc,xpath,namespace)))
Example select count(*) from
table(xmlsequence(extract(xml_doc,xpath,namespace))) from
dual;
XMLTABLE
Syntax: xmltable(xmlnamespaces(url as namespace 1),xpath
PASSING xml_doc COLUMNS type PATH xpath
XMLTABLE example:
SELECT
seq, company,old_dept,bus_unit,new_dept
FROM
XMLTABLE(XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/'
as "env
,'http://intermountain.org/soa/utility/v1/IfsCrosswalk' as "ns0")
,'env:Envelope/env:Body/ns0:IfsCrosswalkResponse/ns0:Crossw
alkValues'
PASSING v_xml_response
COLUMNS
seq FOR ORDINALITY
, company VARCHAR2(100) PATH 'ns0:Source1'
, old_dept VARCHAR2(100) PATH 'ns0:Source2'
, bus_unit VARCHAR2(100) PATH 'ns0:Target1'
, new_dept VARCHAR2(100) PATH 'ns0:Target2'
) AS my_table
WHERE company = '105'
ORDER BY old_dept