Home » SQL & PL/SQL » SQL & PL/SQL » help me kick start with UTL_DBWS please (10g, Win2003)
icon5.gif  help me kick start with UTL_DBWS please [message #291314] Thu, 03 January 2008 16:46 Go to next message
sangleweb
Messages: 10
Registered: March 2006
Junior Member
I've been digging around google but unable to find any or working example using this package. Oracle document is not much help in this. I've install all the necessary file to get this running. I just need a little kick start and if some one have use this before, please help. Here is what I am trying to consume.
----sample wdsl---
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="sangle" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="sangle" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Web Service to Authenticate and Manage slb_webservice</wsdl:documentation>
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="sangle">
- <s:element name="Authenticate">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="AuthenticateResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="AuthenticateResult" type="s:boolean" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetRecord">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="email" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="GetRecordResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetRecordResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="AddUser">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="email" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="AddUserResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="AddUserResult" type="s:boolean" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="DeleteUser">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="DeleteUserResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="DeleteUserResult" type="s:boolean" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="EditUser">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="email" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="EditUserResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="EditUserResult" type="s:boolean" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="ReturnName">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="ReturnNameResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ReturnNameResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="ReturnEmail">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="ReturnEmailResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ReturnEmailResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="AuthenticateSoapIn">
<wsdl:part name="parameters" element="tns:Authenticate" />
</wsdl:message>
- <wsdl:message name="AuthenticateSoapOut">
<wsdl:part name="parameters" element="tns:AuthenticateResponse" />
</wsdl:message>
- <wsdl:message name="GetRecordSoapIn">
<wsdl:part name="parameters" element="tns:GetRecord" />
</wsdl:message>
- <wsdl:message name="GetRecordSoapOut">
<wsdl:part name="parameters" element="tns:GetRecordResponse" />
</wsdl:message>
- <wsdl:message name="AddUserSoapIn">
<wsdl:part name="parameters" element="tns:AddUser" />
</wsdl:message>
- <wsdl:message name="AddUserSoapOut">
<wsdl:part name="parameters" element="tns:AddUserResponse" />
</wsdl:message>
- <wsdl:message name="DeleteUserSoapIn">
<wsdl:part name="parameters" element="tns:DeleteUser" />
</wsdl:message>
- <wsdl:message name="DeleteUserSoapOut">
<wsdl:part name="parameters" element="tns:DeleteUserResponse" />
</wsdl:message>
- <wsdl:message name="EditUserSoapIn">
<wsdl:part name="parameters" element="tns:EditUser" />
</wsdl:message>
- <wsdl:message name="EditUserSoapOut">
<wsdl:part name="parameters" element="tns:EditUserResponse" />
</wsdl:message>
- <wsdl:message name="ReturnNameSoapIn">
<wsdl:part name="parameters" element="tns:ReturnName" />
</wsdl:message>
- <wsdl:message name="ReturnNameSoapOut">
<wsdl:part name="parameters" element="tns:ReturnNameResponse" />
</wsdl:message>
- <wsdl:message name="ReturnEmailSoapIn">
<wsdl:part name="parameters" element="tns:ReturnEmail" />
</wsdl:message>
- <wsdl:message name="ReturnEmailSoapOut">
<wsdl:part name="parameters" element="tns:ReturnEmailResponse" />
</wsdl:message>
- <wsdl:portType name="Mini_x0020_PassportSoap">
- <wsdl:operation name="Authenticate">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Authenticate slb_webservice</wsdl:documentation>
<wsdl:input message="tns:AuthenticateSoapIn" />
<wsdl:output message="tns:AuthenticateSoapOut" />
</wsdl:operation>
- <wsdl:operation name="GetRecord">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to response with sqlStr</wsdl:documentation>
<wsdl:input message="tns:GetRecordSoapIn" />
<wsdl:output message="tns:GetRecordSoapOut" />
</wsdl:operation>
- <wsdl:operation name="AddUser">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Add User</wsdl:documentation>
<wsdl:input message="tns:AddUserSoapIn" />
<wsdl:output message="tns:AddUserSoapOut" />
</wsdl:operation>
- <wsdl:operation name="DeleteUser">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Delete User</wsdl:documentation>
<wsdl:input message="tns:DeleteUserSoapIn" />
<wsdl:output message="tns:DeleteUserSoapOut" />
</wsdl:operation>
- <wsdl:operation name="EditUser">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Edit User Information</wsdl:documentation>
<wsdl:input message="tns:EditUserSoapIn" />
<wsdl:output message="tns:EditUserSoapOut" />
</wsdl:operation>
- <wsdl:operation name="ReturnName">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to Obtain User Name</wsdl:documentation>
<wsdl:input message="tns:ReturnNameSoapIn" />
<wsdl:output message="tns:ReturnNameSoapOut" />
</wsdl:operation>
- <wsdl:operation name="ReturnEmail">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Method to obtain User Email Address</wsdl:documentation>
<wsdl:input message="tns:ReturnEmailSoapIn" />
<wsdl:output message="tns:ReturnEmailSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="Mini_x0020_PassportSoap" type="tns:Mini_x0020_PassportSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="Authenticate">
<soap:operation soapAction="sangle/Authenticate" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetRecord">
<soap:operation soapAction="sangle/GetRecord" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="AddUser">
<soap:operation soapAction="sangle/AddUser" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="DeleteUser">
<soap:operation soapAction="sangle/DeleteUser" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="EditUser">
<soap:operation soapAction="sangle/EditUser" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="ReturnName">
<soap:operation soapAction="sangle/ReturnName" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="ReturnEmail">
<soap:operation soapAction="sangle/ReturnEmail" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="Mini_x0020_PassportSoap12" type="tns:Mini_x0020_PassportSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="Authenticate">
<soap12:operation soapAction="sangle/Authenticate" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="GetRecord">
<soap12:operation soapAction="sangle/GetRecord" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="AddUser">
<soap12:operation soapAction="sangle/AddUser" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="DeleteUser">
<soap12:operation soapAction="sangle/DeleteUser" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="EditUser">
<soap12:operation soapAction="sangle/EditUser" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="ReturnName">
<soap12:operation soapAction="sangle/ReturnName" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="ReturnEmail">
<soap12:operation soapAction="sangle/ReturnEmail" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Mini_x0020_Passport">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Web Service to Authenticate and Manage slb_webservice</wsdl:documentation>
- <wsdl:port name="Mini_x0020_PassportSoap" binding="tns:Mini_x0020_PassportSoap">
<soap:address location="http://sangle-l-ofs.nam.slb.com/webserv/miniPassport.asmx" />
</wsdl:port>
- <wsdl:port name="Mini_x0020_PassportSoap12" binding="tns:Mini_x0020_PassportSoap12">
<soap12:address location="http://sangle-l-ofs.nam.slb.com/webserv/miniPassport.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
----end----

Here is my function

----begin copy/paste---
CREATE OR REPLACE FUNCTION CONCUR_ADMIN.slb_webserv_call (p_stock_code IN VARCHAR2)
RETURN VARCHAR2
AS
l_service UTL_DBWS.service;
l_call UTL_DBWS.call;
l_result ANYDATA;

l_wsdl_url VARCHAR2(1024);
l_service_name VARCHAR2(200);
l_operation_name VARCHAR2(200);
l_input_params UTL_DBWS.anydata_list;
BEGIN
l_wsdl_url := 'http://sangle-l-ofs.nam.slb.com/webserv/miniPassport.asmx';
l_service_name := 'Mini_x0020_Passport';
l_operation_name := 'ReturnEmail';

l_service := UTL_DBWS.create_service (
wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_name);

l_call := UTL_DBWS.create_call (
service_handle => l_service,
port_name => NULL,
operation_name => l_operation_name);

l_input_params(1) := ANYDATA.ConvertVarchar2(p_stock_code);

l_result := UTL_DBWS.invoke (
call_handle => l_call,
input_params => l_input_params);

UTL_DBWS.release_call (call_handle => l_call);
UTL_DBWS.release_service (service_handle => l_service);

RETURN ANYDATA.AccessNumber(l_result);
EXCEPTION
WHEN OTHERS THEN
RETURN NULL;
END;
/
---end----

This is my first experience with SOAP so please be gentle. Thanks.
Re: help me kick start with UTL_DBWS please [message #291380 is a reply to message #291314] Fri, 04 January 2008 01:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I don't know the answer but next time please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.

Regards
Michel
Re: help me kick start with UTL_DBWS please [message #291381 is a reply to message #291314] Fri, 04 January 2008 01:08 Go to previous message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

And this thread doesn't seem to fit in SQL/PLSQL Newbies .

Moderators : please move to corresponding forum .

Thumbs Up
Rajuvan.
Previous Topic: 15 minutes gap in date
Next Topic: moving records
Goto Forum:
  


Current Time: Sat Dec 10 13:04:13 CST 2016

Total time taken to generate the page: 0.13795 seconds