16 years ago
help with soap ui and pl sql
greetings to all.
I'm trying to create a pl sql web service client to communicate with siebel. from soapui I connect with the siebe web service.
(raw request)
POST http://172.21.100.8/eai_esn/start.swe?S ... ord=SADMIN HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: "rpc/http://172.21.100.8/WebService/:Crear_Modificar_Medico"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 172.21.100.8
Content-Length: 1714
None
Loginname
Passwrd
<_XML xsi:type="sh:CuerpoTopElmt" xmlns:sh="http://www.siebel.com/xml/SH%20Medico">
?
?
?
?
?
?
?
?
?
but from pl sql I get a 500 error. wiht this code...
DECLARE
req UTL_HTTP.req := NULL;
resp UTL_HTTP.resp := NULL;
respVal VARCHAR2(32000);
reqXML VARCHAR2(32760);
BEGIN
reqXML := '
<_XML xsi:type="sh:CuerpoTopElmt" xmlns:sh="http://www.siebel.com/xml/SH%20Medico">
?
?
?
?
?
?
?
?
?
';
dbms_output.put_line('Length of Request:' || length(reqXML));
dbms_output.put_line ('Request: ' || reqXML);
req := UTL_HTTP.begin_request('http://172.21.100.8/eai_esn/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&UserName=SADMIN&Password=SADMIN', 'POST',utl_http.HTTP_VERSION_1_1);
UTL_HTTP.set_header(req, 'Content-Type', 'text/xml; charset=utf-8');/ UTL_HTTP.set_header(req, 'SOAPAction', '"rpc/http://172.21.100.8/WebService/:Crear_Modificar_Medico"');
UTL_HTTP.set_header(req, 'Content-Length', LENGTH(reqXML));
DBMS_OUTPUT.PUT_LINE('El contenido que enviamos es XML'); --UTL_HTTP.write_text(req, reqXML); resp := UTL_HTTP.get_response(req);
dbms_output.put_line('Response Received');
dbms_output.put_line('--------------------------');
dbms_output.put_line ( 'Status code: ' || resp.status_code );
dbms_output.put_line ( 'Reason phrase: ' || resp.reason_phrase ); UTL_HTTP.read_text(resp, respVal);
UTL_HTTP.end_response(resp);
DBMS_OUTPUT.PUT_LINE('******'||respVal||'******');
EXCEPTION
WHEN UTL_HTTP.end_of_body THEN
UTL_HTTP.end_response(resp);
END;
/
some vary can help me
I'm trying to create a pl sql web service client to communicate with siebel. from soapui I connect with the siebe web service.
(raw request)
POST http://172.21.100.8/eai_esn/start.swe?S ... ord=SADMIN HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: "rpc/http://172.21.100.8/WebService/:Crear_Modificar_Medico"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 172.21.100.8
Content-Length: 1714
<_XML xsi:type="sh:CuerpoTopElmt" xmlns:sh="http://www.siebel.com/xml/SH%20Medico">
but from pl sql I get a 500 error. wiht this code...
DECLARE
req UTL_HTTP.req := NULL;
resp UTL_HTTP.resp := NULL;
respVal VARCHAR2(32000);
reqXML VARCHAR2(32760);
BEGIN
reqXML := '
<_XML xsi:type="sh:CuerpoTopElmt" xmlns:sh="http://www.siebel.com/xml/SH%20Medico">
';
dbms_output.put_line('Length of Request:' || length(reqXML));
dbms_output.put_line ('Request: ' || reqXML);
req := UTL_HTTP.begin_request('http://172.21.100.8/eai_esn/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&UserName=SADMIN&Password=SADMIN', 'POST',utl_http.HTTP_VERSION_1_1);
UTL_HTTP.set_header(req, 'Content-Type', 'text/xml; charset=utf-8');/ UTL_HTTP.set_header(req, 'SOAPAction', '"rpc/http://172.21.100.8/WebService/:Crear_Modificar_Medico"');
UTL_HTTP.set_header(req, 'Content-Length', LENGTH(reqXML));
DBMS_OUTPUT.PUT_LINE('El contenido que enviamos es XML'); --UTL_HTTP.write_text(req, reqXML); resp := UTL_HTTP.get_response(req);
dbms_output.put_line('Response Received');
dbms_output.put_line('--------------------------');
dbms_output.put_line ( 'Status code: ' || resp.status_code );
dbms_output.put_line ( 'Reason phrase: ' || resp.reason_phrase ); UTL_HTTP.read_text(resp, respVal);
UTL_HTTP.end_response(resp);
DBMS_OUTPUT.PUT_LINE('******'||respVal||'******');
EXCEPTION
WHEN UTL_HTTP.end_of_body THEN
UTL_HTTP.end_response(resp);
END;
/
some vary can help me