1 package utl_dbws as
2
3 -------------------------------------------
4 -------------------------------------------
5 --- ---
6 --- Handling of qualified names (QName) ---
7 --- ---
8 -------------------------------------------
9 -------------------------------------------
10
11 SUBTYPE QNAME IS VARCHAR2(4096);
12 TYPE QNAME_LIST IS TABLE OF QNAME INDEX BY BINARY_INTEGER;
13
14 -- Construct a qualified name
15 -- namespaceURI - Namespace URI for the QName, null if none.
16 -- localPart - Local part of the QName
17 function to_QName(name_Space VARCHAR2, name VARCHAR2) RETURN QNAME;
18
19 -- Return the namespace URI of a qualified name, null if none.
20 function get_namespace_URI(name QNAME) RETURN VARCHAR2;
21
22 -- Return the local part of a qualified name
23 function get_local_part(name QNAME) RETURN VARCHAR2;
24
25 -- The following is a list of predefined namespaces that may be
26 -- used in the name_Space parameter of to_QName
27 -- 'NSURI_SCHEMA_XSD','xsd' - Namespace URI for XML Schema XSD
28 -- 'NSURI_SCHEMA_XSI','xsi' - Namespace URI for XML Schema XSI
29 -- 'NSURI_SOAP_ENCODING','soapenc' - Namespace URI for SOAP 1.1 Encoding
30 -- 'NSURI_SOAP_ENVELOPE','soapenv' - Namespace URI for SOAP 1.1 Envelope
31 -- 'NSURI_SOAP_NEXT_ACTOR' - Namespace URI for SOAP 1.1 next actor role
32
33
34 -------------------------------------------
35 -------------------------------------------
36 --- ---
37 --- Service instantiation based on WSDL ---
38 --- ---
39 -------------------------------------------
40 -------------------------------------------
41
42 SUBTYPE SERVICE IS NUMBER;
43
44 -- Create a Service instance.
45 -- serviceName - QName for the service
46 -- Returns a handle to the Service instance.
47 function create_service(service_Name QNAME) RETURN SERVICE;
48
49 -- Create a Service instance.
50 -- wsdlDocumentLocation - URL for the WSDL document location for the service
51 -- serviceName - QName for the service
52 -- Returns a handle to the Service instance.
53 function create_service(wsdl_Document_Location URITYPE, service_Name QNAME) RETURN SERVICE;
54
55 -- List the qualified names of all of the ports in a service.
56 -- service_Handle - Service instance whose ports are returned
57 function get_ports(service_Handle SERVICE) RETURN QNAME_LIST;
58
59 -- List the qualified names of all of the operations on a particular
60 -- service port.
61 -- service_Handle - Service instance whose operations are returned
62 -- port - Qualified name of a service port. NULL if the
63 -- first port of the service is to be used.
64 function get_operations(service_Handle SERVICE, port QNAME) RETURN QNAME_LIST;
65
66 -- Release a particular Service instance. This will implicitly
67 -- release all Call instances that have been created for this
68 -- service instance.
69 -- service_Handle - Service instance that is to be released
70 procedure release_service(service_Handle SERVICE);
71
72 -- Release all Service instances.
73 procedure release_all_services;
74
75
76 ---------------------------------------------
77 ---------------------------------------------
78 --- ---
79 --- Call instantiation based on a service ---
80 --- port and an operation name ---
81 --- ---
82 ---------------------------------------------
83 ---------------------------------------------
84
85 SUBTYPE CALL IS NUMBER;
86
87 TYPE ANYDATA_LIST IS TABLE OF ANYDATA INDEX BY BINARY_INTEGER;
88
89
90 -- Set the proxy address
91 -- proxy - the http proxy address, e.g., www-proxy.us.acme.com:80
92 procedure set_http_proxy(httpProxy VARCHAR2);
93
94 -- Create a Call instance.
95 -- serviceHandle - the service instance that is to be called.
96 function create_call(service_Handle SERVICE) RETURN CALL;
97
98 -- Create a Call instance.
99 -- serviceHandle - the service instance that is to be called.
100 -- portName - qualified name for the port. Use first port if this is NULL.
101 -- operationName - qualified name for the operation
102 function create_call(service_Handle SERVICE, port_Name QNAME, operation_Name QNAME)
103 RETURN CALL;
104
105 -- Release a particular Call instance.
106 -- call_Handle - Call instance that is to be released
107 procedure release_call(call_Handle CALL);
108
109 -- Set the value of a particular property on a Call.
110 -- callHandle - the instance of the call
111 -- endpoint - the endpoint for the call
112 procedure set_target_endpoint_address(call_Handle CALL, endpoint VARCHAR2);
113
114 -- Manipulation of call properties. The following are supported keys
115 -- and default settings for standard Call properties.
116 --
117 -- Key - Explanation of Value, Default value.
118 -- 'USERNAME' - User name for authentication
119 -- 'PASSWORD' - Password for authentication
120 -- 'ENCODINGSTYLE_URI' - Encoding style specified as a namespace URI.
121 -- The default value is the SOAP 1.1 encoding
122 -- 'http://schemas.xmlsoap.org/soap/encoding/'
123 -- 'OPERATION_STYLE' - Standard property for operation style.
124 -- Set to 'rpc' if the operation style is rpc;
125 -- 'document' if the operation style is document.
126 -- 'SESSION_MAINTAIN' - This boolean property is used by a service client to indicate whether or
127 -- not it wants to participate in a session with a service endpoint.
128 -- If this property is set to 'true', the service client indicates that it
129 -- wants the session to be maintained. If set to 'false', the session is
130 -- not maintained. The default value for this property is 'false'.
131 -- 'SOAPACTION_USE' - This boolean property indicates whether or not SOAPAction
132 -- is to be used. The default value of this property is 'false'.
133 -- 'SOAPACTION_URI' - Indicates the SOAPAction URI if the SOAPACTION_USE property
134 -- is set to 'true'.
135
136 -- Return the value of a particular property on a Call.
137 -- callHandle - the instance of the call
138 -- key - the key for the property
139 -- Returns the value of the property or null if not set.
140 function get_property(call_Handle CALL, key VARCHAR2) RETURN VARCHAR2;
141
142 -- Set the value of a particular property on a Call.
143 -- callHandle - the instance of the call
144 -- key - the key for the property
145 -- value - the value for the property
146 procedure set_property(call_Handle CALL, key VARCHAR2, value VARCHAR2);
147
148 -- Clear the value of a particular property on a Call.
149 -- callHandle - the instance of the call
150 -- key - the key for the property
151 procedure remove_property(call_Handle CALL, key VARCHAR2);
152
153 -------------------------------------------------------------------
154 -------------------------------------------------------------------
155 -- The following list describes the supported XML types
156 --
157 -- XML Type SQL Type
158 -------------------------------------------------------------------
159 --
160 -- xsd:string VARCHAR2
161 -- soapenc:string
162 --
163 -- xsd:int, xsd:long, xsd:short, NUMBER (no NULL permitted)
164 -- xsd:float, xsd:double, and related SQL types
165 -- xsd:boolean
166 -- soapenc:boolean, soapenc:float,
167 -- soapenc:double, soapenc:int,
168 -- soapenc:short, soapenc:byte,
169 --
170 -- xsd:integer, xsd:decimal, NUMBER (NULL permitted)
171 -- soapenc:decimal and related SQL types
172 --
173 -- xsd:QName VARCHAR2
174 --
175 -- xsd:dateTime DATE, TIMESTAMP,
176 -- TIMESTAMP WITH TIMEZONE
177 -- TIMESTAMP WITH LOCAL TIMEZONE
178 --
179 -- xsd:base64Binary, RAW
180 -- xsd:hexBinary,
181 -- soapenc:base64
182 --
183 -------------------------------------------------------------------
184 -------------------------------------------------------------------
185
186 -- List the XML type that is returned by the given call.
187 -- call_Handle - Service instance whose return type is returned.
188 function get_return_type(call_Handle CALL) RETURN QNAME;
189
190 -- List the XML type of the input parameters of the given call.
191 -- call_Handle - Service instance whose input types are returned.
192 function get_in_parameter_types(call_Handle CALL) RETURN QNAME_LIST;
193
194 -- List the XML type of the output parameters of the given call.
195 -- call_Handle - Service instance whose output types are returned.
196 function get_out_parameter_types(call_Handle CALL) RETURN QNAME_LIST;
197
198 -- Invokes a specific operation using a synchronous request-response
199 -- interaction mode.
200 -- callHandle - the instance of the call
201 -- inputParams - The input parameters for this invocation.
202 -- Returns the return value or null.
203 function invoke(call_Handle CALL, input_Params ANYDATA_LIST) return ANYDATA;
204
205 -- Invokes a document-style webservices in a synchronous
206 -- request-response interaction mode.
207 -- callHandle - the instance of the call
208 -- request - a SOAPElement request
209 -- Returns a SOAPElement response
210 function invoke(call_Handle CALL, request SYS.XMLTYPE) return SYS.XMLTYPE;
211
212 -- Obtain the output arguments after a call invocation
213 -- callHandle - the instance of the call
214 -- Returns the output arguments in order.
215 function get_output_values(call_Handle CALL) return ANYDATA_LIST;
216
217 -- Set the type of a parameter of a Call.
218 -- callHandle - the instance of the call
219 -- xml_name - the xml name of the parameter type
220 -- q_name - the QNAME for the parameter type
221 -- mode - the ParameterMode mode constant
222 procedure add_parameter(call_Handle CALL, xml_name VARCHAR2, q_name QNAME, p_mode VARCHAR2);
223
224 -- Set the return type of a Call.
225 -- callHandle - the instance of the call
226 -- retType - the qname of the return type
227 procedure set_return_type(call_Handle CALL, ret_type QNAME);
228
229 -- set webservices client trace log level
230 procedure set_logger_level(level VARCHAR2);
231
232 end utl_dbws;