- this is to test the code
- but if the interface is required for account password, how can I transfer account password as parameters in it?
I tried behind the url directly joining together account and password, but did not use the
Utl_http inside a utl_http. SET_AUTHENTICATION (the req, 'account', "password"); I tried this method also was not used, whether or not the account password is correct, resp response status are 200,
Everyone a great god grant instruction genuflect is begged the
Procedure test varchar2 (x) is
The req utl_http. The req;
Resp utl_http. Resp;
V_msg VARCHAR2 (80);
V_url VARCHAR2 (32767) :='http://oracle-base.com/webservices/server.php? WSDL ';
V_name VARCHAR2 (32767);
V_value VARCHAR2 (32767);
V_GP varchar2 (20) :='1'.
P_counts varchar2 (20);
V_clob_content CLOB.
Here is the content of the request
V_content VARCHAR2 (32767) :='& lt; Soapenv: Envelope XMLNS: xsi="http://www.w3.org/2001/XMLSchema-instance" XMLNS: XSD="http://www.w3.org/2001/XMLSchema" XMLNS: soapenv="http://schemas.xmlsoap.org/soap/envelope/" XMLNS: web="http://oracle-base.com/webservices/" & gt;
& lt; Soapenv: Header/& gt;
& lt; Soapenv: Body>
& lt; Web: ws_add soapenv: encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" & gt;
& lt; Int1 xsi: type="XSD: string" & gt; '| | 1 | |
'& lt;/int1 & gt;
& lt; Int2 xsi: type="XSD: string" & gt; '| | 2 | |
'& lt;/int2 & gt;
& lt;/web: ws_add & gt;
& lt;/soapenv: Body>
& lt;/soapenv: Envelope>
';
V_xmltable XMLType;
The BEGIN
The req:=utl_http begin_request (v_url, 'POST, utl_http http_version_1_1);
Utl_http. Set_header (the req, 'the content-type', 'text/XML. Charset=utf-8 ');
Utl_http. Set_header (the req, 'the Content - Length, Length (v_content));
Utl_http. Write_text (the req, v_content);
Resp:=utl_http get_response (r=& gt; The req);
Dbms_output. Put_line (' STATUS CODE: '| | resp. Status_code);
Dbms_output. Put_line (' REASON PHRASE: '| | resp. Reason_phrase);
/* utl_http. Read_line (resp, v_value);
V_clob_content:=v_clob_content | | v_value;
Dbms_output. Put_line (' return values: '| | v_clob_content); */
The BEGIN
LOOP
Utl_http. Read_line (resp, v_value, true);
V_clob_content:=v_clob_content | | v_value;
Dbms_output. Put_line (v_clob_content);
END LOOP;
Utl_http. End_response (resp);
The EXCEPTION
The WHEN OTHERS THEN
Utl_http. End_response (resp);
The END;
V_xmltable:=xmltype (v_clob_content);
Dbms_output. Put_line (v_xmltable. Extract ('//return/text () ')
GetNumberVal ());
Insert into test (test) values (v_xmltable extract ('//return/text () ')
GetNumberVal ());
The EXCEPTION
The WHEN OTHERS THEN
Dbms_output. Put_line (SQLCODE | | ':' | | SQLERRM);
Dbms_output. Put_line (dbms_utility. Format_error_backtrace);
Dbms_output. Put_line (dbms_utility. Format_error_stack);
The END;
Then there is the soapui request properties configuration is how to pass an argument as a request to the server? To solve and I don't know in the picture is not on the