Calling a webservice from Pl/SQL

Hi,
I have created a function to call a webservice but I am getting the following error
ORA-20000: soap:Client - System.Web.Services.Protocols.SoapException: Server
did not recognize the value of HTTP Header SOAPAction: ConversionRate.
at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at
System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage
message)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)
ORA-06512: at "APPS.SOAP_API", line 54
ORA-06512: at "APPS.SOAP_API", line 81
ORA-06512: at "APPS.PKG_MY_WEBSERVICE", line 12
The Packages code are as follow:
CREATE OR REPLACE PACKAGE soap_api AS
TYPE t_request IS RECORD (
method VARCHAR2(256),
namespace VARCHAR2(256),
body VARCHAR2(32767),
envelope_tag VARCHAR2(30)
TYPE t_response IS RECORD
doc XMLTYPE,
envelope_tag VARCHAR2(30)
FUNCTION new_request(p_method IN VARCHAR2,
p_namespace IN VARCHAR2,
p_envelope_tag IN VARCHAR2 DEFAULT 'SOAP-ENV')
RETURN t_request;
PROCEDURE add_parameter(p_request IN OUT NOCOPY t_request,
p_name IN VARCHAR2,
p_type IN VARCHAR2,
p_value IN VARCHAR2);
FUNCTION invoke(p_request IN OUT NOCOPY t_request,
p_url IN VARCHAR2,
p_action IN VARCHAR2)
RETURN t_response;
FUNCTION get_return_value(p_response IN OUT NOCOPY t_response,
p_name IN VARCHAR2,
p_namespace IN VARCHAR2)
RETURN VARCHAR2;
END soap_api;
CREATE OR REPLACE PACKAGE BODY soap_api AS
FUNCTION new_request(p_method IN VARCHAR2,
p_namespace IN VARCHAR2,
p_envelope_tag IN VARCHAR2 DEFAULT 'SOAP-ENV')
RETURN t_request AS
l_request t_request;
BEGIN
l_request.method := p_method;
l_request.namespace := p_namespace;
l_request.envelope_tag := p_envelope_tag;
RETURN l_request;
END;
PROCEDURE add_parameter(p_request IN OUT NOCOPY t_request,
p_name IN VARCHAR2,
p_type IN VARCHAR2,
p_value IN VARCHAR2) AS
BEGIN
p_request.body := p_request.body||'<'||p_name||' xsi:type="'||p_type||'">'||p_value||'</'||p_name||'>';
END;
PROCEDURE generate_envelope(p_request IN OUT NOCOPY t_request,
          p_env IN OUT NOCOPY VARCHAR2) AS
BEGIN
p_env := '<'||p_request.envelope_tag||':Envelope xmlns:'||p_request.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/" ' ||
'xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">' ||
'<'||p_request.envelope_tag||':Body>' ||
'<'||p_request.method||' '||p_request.namespace||' '||p_request.envelope_tag||':encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">' ||
p_request.body ||
'</'||p_request.method||'>' ||
'</'||p_request.envelope_tag||':Body>' ||
'</'||p_request.envelope_tag||':Envelope>';
END;
PROCEDURE show_envelope(p_env IN VARCHAR2) AS
i PLS_INTEGER;
l_len PLS_INTEGER;
BEGIN
i := 1; l_len := LENGTH(p_env);
WHILE (i <= l_len) LOOP
DBMS_OUTPUT.put_line(SUBSTR(p_env, i, 60));
i := i + 60;
END LOOP;
END;
PROCEDURE check_fault(p_response IN OUT NOCOPY t_response) AS
l_fault_node XMLTYPE;
l_fault_code VARCHAR2(256);
l_fault_string VARCHAR2(32767);
BEGIN
l_fault_node := p_response.doc.extract('/'||p_response.envelope_tag||':Fault',
'xmlns:'||p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/');
IF (l_fault_node IS NOT NULL) THEN
l_fault_code := l_fault_node.extract('/'||p_response.envelope_tag||':Fault/faultcode/child::text()',
'xmlns:'||p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
l_fault_string := l_fault_node.extract('/'||p_response.envelope_tag||':Fault/faultstring/child::text()',
'xmlns:'||p_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
RAISE_APPLICATION_ERROR(-20000, l_fault_code || ' - ' || l_fault_string);
END IF;
END;
FUNCTION invoke(p_request IN OUT NOCOPY t_request,
p_url IN VARCHAR2,
p_action IN VARCHAR2)
RETURN t_response AS
l_envelope VARCHAR2(32767);
l_http_request UTL_HTTP.req;
l_http_response UTL_HTTP.resp;
l_response t_response;
BEGIN
generate_envelope(p_request, l_envelope);
show_envelope(l_envelope);
l_http_request := UTL_HTTP.begin_request(p_url, 'POST','HTTP/1.1');
UTL_HTTP.set_header(l_http_request, 'Content-Type', 'text/xml');
UTL_HTTP.set_header(l_http_request, 'Content-Length', LENGTH(l_envelope));
UTL_HTTP.set_header(l_http_request, 'SOAPAction', p_action);
UTL_HTTP.write_text(l_http_request, l_envelope);
l_http_response := UTL_HTTP.get_response(l_http_request);
UTL_HTTP.read_text(l_http_response, l_envelope);
UTL_HTTP.end_response(l_http_response);
l_response.doc := XMLTYPE.createxml(l_envelope);
l_response.envelope_tag := p_request.envelope_tag;
l_response.doc := l_response.doc.extract('/'||l_response.envelope_tag||':Envelope/'||l_response.envelope_tag||':Body/child::node()',
'xmlns:'||l_response.envelope_tag||'="http://schemas.xmlsoap.org/soap/envelope/"');
-- show_envelope(l_response.doc.getstringval());
check_fault(l_response);
RETURN l_response;
END;
FUNCTION get_return_value(p_response IN OUT NOCOPY t_response,
p_name IN VARCHAR2,
p_namespace IN VARCHAR2)
RETURN VARCHAR2 AS
BEGIN
RETURN p_response.doc.extract('//'||p_name||'/child::text()',p_namespace).getstringval();
END;
END soap_api;
SHOW ERRORS
CREATE OR REPLACE PACKAGE pkg_my_webservice IS
FUNCTION call_myfunction(vp_parameter1 VARCHAR2,vp_parameter2 VARCHAR2) RETURN VARCHAR2;
END pkg_my_webservice;
CREATE OR REPLACE PACKAGE BODY pkg_my_webservice IS
vg_funciton_fnc VARCHAR2(256):='ConversionRate';
vg_ws_address VARCHAR2(255):='http://www.webservicex.net/CurrencyConvertor.asmx';
FUNCTION call_myfunction(vp_parameter1 VARCHAR2,vp_parameter2 VARCHAR2)
RETURN VARCHAR2 AS
ol_req soap_api.t_request;
ol_resp soap_api.t_response;
BEGIN
ol_req:=soap_api.new_request(vg_funciton_fnc,'xmlns="'||vg_ws_address||'"');
soap_api.add_parameter(ol_req,'string1','partns:string',vp_parameter1);
soap_api.add_parameter(ol_req,'string2','partns:string',vp_parameter1);
ol_resp:=soap_api.invoke(ol_req,vg_ws_address,vg_funciton_fnc);
RETURN soap_api.get_return_value(ol_resp,'result','xmlns:m="'||vg_ws_address||'"');
END call_myfunction;
END pkg_my_webservice;
-----------------------------------------------------------------------------------------------------------------------------------

Hi,
The soap_api package internally uses the utl_http api. I used the utl_http package directly and it works for me. Below is the code for the call, you will have to substitute the variables to suit your setup..
Hope this Helps
Thanks
CREATE OR REPLACE FUNCTION get_webservice_dets(p_emp_number IN VARCHAR2
,p_eff_date IN DATE)
RETURN VARCHAR2
IS
lc_proc VARCHAR2(50) := 'get_webservice_dets';
ln_error_stg NUMBER := 0;
lc_eff_date VARCHAR2(50) := NULL;
soap_request VARCHAR2(32767);
soap_respond VARCHAR2(32767);
-- HTTP variables
req utl_http.req;
resp utl_http.resp;
-- Store the Webservice URL in a Profile Option and change for each environment
lc_wsdl_url VARCHAR2(32767) := FND_PROFILE.VALUE('XXERP_WEBSRVC_URL');
-- return Values
lc_retval VARCHAR2(32767);
lc_response VARCHAR2(32767);
lc_xml_ext_str VARCHAR2(100) := '/env:Envelope/env:Body/OutputParameters/';
lc_xml_ext_unit VARCHAR2(50) := '/text()';
lc_xmlns_ns1_url VARCHAR2(240) := 'xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XXERP_SOA_HCM_PKG/GET_SUPERVISOR_NO/"';
lc_xmlns_env_url VARCHAR2(240) := 'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"';
lc_xmlns_xsi_url VARCHAR2(240) := 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"';
lc_xmlns_url VARCHAR2(240) := 'xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XXERP_SOA_HCM_PKG/GET_SUPERVISOR_NO/"';
lc_xml_namespace VARCHAR2(5000) := lc_xmlns_env_url||' '||lc_xmlns_xsi_url||' '||lc_xmlns_url;
lc_xmlns_soap_url VARCHAR2(240) := 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"';
lx_Response XMLTYPE;
BEGIN
ln_error_stg := 10;
IF NVL(lc_wsdl_url,'X') <> 'X' THEN
-- Format the date received as required by the Webservice i.e. - 'YYYY-MM-DDTHH:MI:SS+01:00'
lc_eff_date := REPLACE(TRIM(TO_CHAR(TRUNC(p_eff_date),'YYYY-MM-DD HH:MI:SS')),' ','T')||'+01:00';
-- Form a SOAP Envelope - Exact envelope can be obtained by invoking the above EndPoint URL in a browser session with required
-- parameters and then clicking on the XML Source
soap_request:= '<soap:Envelope '||lc_xmlns_soap_url||'>
<soap:Body '||lc_xmlns_ns1_url||'>
<ns1:InputParameters>
<ns1:P_EMPLOYEE_NUMBER>'||p_emp_number||'</ns1:P_EMPLOYEE_NUMBER>
<ns1:P_DATE>'||lc_eff_date||'</ns1:P_DATE>
</ns1:InputParameters>
</soap:Body>
</soap:Envelope>';
-- Initiate the HTTP request, don't forget to pass in the POST and HTTP/1.1
req := UTL_HTTP.BEGIN_REQUEST(lc_wsdl_url, 'POST','HTTP/1.1');
ln_error_stg := 20;
-- Set the HTTP Request Headers
UTL_HTTP.SET_HEADER(req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
ln_error_stg := 40;
UTL_HTTP.SET_HEADER(req, 'Content-Length', LENGTH(soap_request));
ln_error_stg := 50;
-- Set the SOAP Action to the Operation Name
-- The function Name <getSupervisorID> should match the Webservice Operation Name in SOA
UTL_HTTP.SET_HEADER(req, 'SOAPAction','getSupervisorID'); -- required to specify this is a SOAP communication
ln_error_stg := 60;
-- Append the SOAP Envelope to the HTTP request Header
UTL_HTTP.WRITE_TEXT(req, soap_request);
ln_error_stg := 70;
-- Fetch the HTTP response from the Webservice - This will contain the SOAP Envelope response
-- that needs to be processed downstream
resp := UTL_HTTP.GET_RESPONSE(req);
ln_error_stg := 80;
-- Extract the HTTP response and store in a String Variable
-- READ_TEXT is a specific method exposed to read the SOAP envelope returned from Webservice
-- READ_LINE will read the entire HTML response back from the Server..
UTL_HTTP.READ_TEXT(resp, lc_retval);
ln_error_stg := 90;
-- Create an XML Document from the String returned by the HTTP response..
lx_Response := SYS.XMLTYPE.CREATEXML(lc_retval);
ln_error_stg := 110;
-- If the response is not null then extract the string value of the required output parameter
-- the env: tag needs to be qualified with a corresponding namespace.
IF lx_Response IS NOT NULL THEN
lc_response := lx_Response.extract(lc_xml_ext_str||'PERSON_ID'||lc_xml_ext_unit,lc_xml_namespace).getstringval();
ELSE
DBMS_OUTPUT.PUT_LINE('XMLTYPE Doc returns NULL !!');
lc_response := NULL;
END IF;
ln_error_stg := 120;
-- End the response, otherwise you get
-- UTL_HTTP.TOO_MANY_REQUESTS exception after 5 tries
UTL_HTTP.END_RESPONSE(resp);
ELSE
DBMS_OUTPUT.PUT_LINE('Web Service URL not populated, please provide a value for the Profile Option XXERP: Web Service URL');
lc_response := NULL;
END IF;
RETURN lc_response;
EXCEPTION
WHEN UTL_HTTP.TOO_MANY_REQUESTS THEN
UTL_HTTP.END_RESPONSE(resp);
RETURN NULL;
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.END_RESPONSE(resp);
RETURN NULL;
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR @'||ln_error_stg||': '||SQLERRM);
UTL_HTTP.END_RESPONSE(resp);
RETURN NULL;
END get_webservice_dets;

Similar Messages

  • Oracle BI 11.1.1.7.1: Calling BI webservices from Plsql Procedure: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoClassDefFoundError

    Hi,
         I have a requirement of calling BI webservices from Plsql stored procedure. I generated all my wsdl java classes and loaded them into the database. However, when I tried to call one of my java class using stored procedure, it is giving me"ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoClassDefFoundError".
    *Cause:    A Java exception or error was signaled and could not be
               resolved by the Java code.
    *Action:   Modify Java code, if this behavior is not intended.
    But all my dependency classes are present in database as java class objects and are valid. Can some one help me out of this?

    Stiphane,
    You can look in USER_ERRORS to see if there's anything more specific reported by the compiler. But, it could also be the case that everything's OK (oddly enough). I loaded the JavaMail API in an 8.1.6 database and also got bytecode verifier errors, but it ran fine. Here are the errors I got when loading Sun's activation.jar, which ended up not being a problem:
    ORA-29552: verification warning: at offset 12 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):12 by a throw at offset 18 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):18 by a throw at offset 30 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):30 by a throw
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • How to call web services from PL/SQL?

    Hi,
    Can one help in how to call web services from PL/SQL? Steps, pros and cons, etc....
    Thanks in advance

    Here's some example skeleton code to get you started...
      PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
        soap_request  VARCHAR2(30000);
        soap_respond  CLOB;
        http_req      utl_http.req;
        http_resp     utl_http.resp;
        resp          XMLType;
        soap_err      exception;
        v_code        VARCHAR2(200);
        v_msg         VARCHAR2(1800);
        v_len number;
        v_txt Varchar2(32767);
      BEGIN
        UTL_HTTP.SET_PROXY(p_proxy);
        -- Define the SOAP request according the the definition of the web service being called
        soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>'||
                       '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'||
                       '  <SOAP-ENV:Body>'||
                       '    <m:DownloadRequest xmlns:m="http://www.website.net/messages/GetDetails">'||
                       '      <m:UserName>'||p_username||'</m:UserName>'||
                       '      <m:Password>'||p_password||'</m:Password>'||
                       '    </m:DownloadRequest>'||
                       '  </SOAP-ENV:Body>'||
                       '</SOAP-ENV:Envelope>';
        http_req:= utl_http.begin_request
                  ( 'http://www.website.net/webservices/GetDetailsService.asmx'
                  , 'POST'
                  , 'HTTP/1.1'
        utl_http.set_header(http_req, 'Content-Type', 'text/xml');
        utl_http.set_header(http_req, 'Content-Length', length(soap_request));
        utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
        utl_http.write_text(http_req, soap_request);
        http_resp:= utl_http.get_response(http_req);
        utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
        FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
        LOOP
            utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
            soap_respond := soap_respond || v_txt; -- build up CLOB
        END LOOP;
        utl_http.end_response(http_resp);
        resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
      END;Using secure web services (https)...
    Web serivces call in Plsql
    As for 'pros and cons'... there's nothing to compare against... either you want to call a web service or you don't.

  • How to call java webservice from plsql procedure.

    Hi,
    Could any one please provide any reference document for invoking a java webservice from pl/sql procedure.
    regards,
    Venkat

    Hi,
    There are basically various platforms where u develop the code with different patterns, though the idea is same everywhere.
    1. If you want develop a Java Client to call a WebService from NWDS then Pls refer >>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/cb2e29578c0262e10000000a11466f/frameset.htm
    Note: By default the WebService developed under NWDS is Document Based WebService (i.e. In WSDL the style element would be 'document')
    2. If you want to call a WebService from the platform other than NWDS than, Sun's official site would be the best choice to go for.
    Pls refer >>
    http://java.sun.com/developer/technicalArticles/J2EE/j2ee_ws/#design
    Would appreciate if you reward the points if the answer is helpful.
    Regards,
    Arvind Kugasia [[email protected]]

  • Calling a report from pl/sql

    Is it possible to call a report from pl/sql. I want to create a package which when invoked by dbms_jobs will create parameters and then call a report.
    Thanks in advance,
    Mark.

    Mark,
    cf: http://download-uk.oracle.com/docs/cd/B10464_05/bi.904/b13673/pbr_evnt.htm#sthref1477
    Patrick.

  • Error while calling PI webservice from EJB

    Hi Experts,
    We are getting exception while calling PI webservice from EJB which is deployed in CE 7.2. Earlier we used to call the same webservice but from different PI system at that it worked fine. Now we have changed the consumer proxies required in CE and tried to call from CE and it is throwing error. We have checked usernames and passwords that we are using to call the service and that is working fine. PI team tested from their side and li is also fine. We have also restarted the CE system but invain. Can somebody help on this.  The below is the trace that we got.
    Location: com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding
    Text: Connection IO Exception. Check nested exception for details. (Connection reset).
    [EXCEPTION]
    com.sap.engine.services.webservices.espbase.client.bindings.exceptions.TransportBindingException: Connection IO Exception. Check nested exception for details. (Connection reset).
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:419)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1364)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:990)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:944)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.processTransportBindingCall(WSInvocationHandler.java:168)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEISyncMethod(WSInvocationHandler.java:121)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invokeSEIMethod(WSInvocationHandler.java:84)
    at com.sap.engine.services.webservices.espbase.client.jaxws.core.WSInvocationHandler.invoke(WSInvocationHandler.java:65)
    at $Proxy780.mioaRDMDataDistribution(Unknown Source)
    at com.MDMEventListener.callToPIWS(MDMEventListener.java:100)
    at com.MDMEventListener.ListenerMethod(MDMEventListener.java:173)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:39)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:23)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
    at com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:730)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:682)
    at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:324)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:199)
    at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:65)
    at com.sap.engine.services.webservices.servlet.SoapServlet.doPost(SoapServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:404)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:204)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:440)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:429)
    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:82)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:268)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:54)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:447)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:264)
    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:950)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getInputStream(HTTPSocket.java:414)
    at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getResponseCode(HTTPSocket.java:319)
    at com.sap.engine.services.webservices.espbase.client.bindings.ClientHTTPTransport.getResponseCode(ClientHTTPTransport.java:209)
    at com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.outputSOAPMessage(SOAPTransportBinding.java:385)
    ... 78 more
    Regards,
    Pradeep

    Hi Pradeep,
    this looks like if the server is not reachable. Have you checked if both server are able to communicate? Maybe firewall rules block the request.
    Regards,
    Tobias

  • Error getting while calling a webService from XI

    Hi
    We are getting the follwoing error while calling a webservice from XI. We Could call the same webservice from XML spy. Have checked the SOAP adapter it was running fine and the communication channel parameters too.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code area="MESSAGE">GENERAL</SAP:Code><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText>com.sap.aii.af.ra.ms.api.MessagingException: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault</SAP:AdditionalText><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack/><SAP:Retry>M</SAP:Retry></SAP:Error>
    Please try to help.
    Thanks
    Ramesh

    Hi
    Thanks a lot for your kind support.
    Hi Moorthy
    We have created one Asyn MI and wrapped the external definition into that, Haven't done any mapping for responce. Please find the trace below.
    Hi Bhavesh
    It was great helpful link but the payload days is not visible for this message it was containing details about sending. For some other message i could see payload.
    I Could see one differnce in the XML Spy and "XI payload before entering SOAP Adapter"
    The following line doesn’t appear in the XI payload.
    <m:StatusUpdate xmlns:m="http://localhost/StatusUpdate" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    </m:StatusUpdate>
    Is this line would be embeded in the SOAP Adapter??? Please find the trace below. Please help me if you have any additional info.
    The message was successfully received by the messaging system. Profile: XI URL: Using connection AFW. Trying to put the message into the receive queue.
    Message successfully put into the queue.
    The message was successfully retrieved from the receive queue.
    The message status set to DLNG.
    Delivering to channel: CC_SOAP_Rcvr_D_Pick_ZALEAUD
    SOAP: request message entering the adapter
    SOAP: completed the processing
    SOAP: response message received 4cb3fab0-7fc5-11db-8c5a-000f203c93e0
    SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault
    SOAP: sending a delivery error ack ...
    SOAP: sent a delivery error ack
    Exception caught by adapter framework: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault
    Delivery of the message to the application using connection AFW failed, due to: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault.
    The asynchronous message was successfully scheduled to be delivered at Wed Nov 29 16:23:51 GMT 2006.
    The message status set to WAIT.
    Retrying to deliver message to the application. Retry: 1
    Kind Regards
    Ramesh
    Message was edited by:
            Ramesh Reddy Pothireddy

  • Calling a webservice from webdynpro ABAP.

    Hi,
    Anybody have doc/material with screenshots on calling a webservice from webdynpro ABAP (In WAS 7.0 version using service calls )  with clear steps ?
    Thanks in advance. Ponts will not be a constraint for right answers
    Praveen
    Edited by: Praveen kumar Kadi on Feb 23, 2009 11:19 AM

    Hi Praveen,
    1st Step : configure Logical Port
    http://help.sap.com/saphelp_nw70/helpdata/EN/16/285d32996b25428dc2eedf2b0eadd8/frameset.htm
    2nd Step : Generate Proxy Object
    http://help.sap.com/saphelp_nw70/helpdata/EN/16/285d32996b25428dc2eedf2b0eadd8/frameset.htm
    3rd Step : Instantiating the proxy object & calling the methods exposed by webservice
    data: sys_exception type ref to cx_ai_system_fault,
          sys_exception2 type ref to cx_ai_application_fault,
          client_proxy type ref to zco_myesa, "MY PROXY CLASS
          lv_ret_code type int4,
          lv_input type zsend_email_input,
          lv_response type zsend_email_response.
    data: lv_from type string,
          lv_from_address type string,
          lv_to type string,
          lv_to_address type string,
          lv_subject type string,
          lv_msg type string.
    lv_input-from = 'MYSAPTEST'.
    lv_input-from_address = '<someAddress>'.
    lv_input-to = 'Prashant'.
    lv_input-to_address = '<someAddress>'.
    lv_input-subject = ' TEST'.
    lv_input-msg_body = ' Hi this is wonderfull to see it work'.
    try.
    create object client_proxy
    exporting
    logical_port_name = 'BASIC'. " Basic is a TYPE G RFC Destination
    call method client_proxy->send_email
       exporting
         input  = lv_input
       importing
         output = lv_response    .
      catch cx_ai_system_fault  into sys_exception .
        data lv_err type string.
         lv_err = sys_exception->if_message~get_text( ).
         write: / lv_err.
      catch cx_ai_application_fault into sys_exception2  .
         lv_err = sys_exception->if_message~get_text( ).
         write: / lv_err.
    endtry.
    if lv_response is initial.
       write: /'Not Executed'.
    else.
       write: /'Did Execute'.
    endif.
    Greetings
    Prashant

  • Calling a webservice from within Bex Web Application Designer

    Hi
    I have a web-template built with BEx web application designer which also contains textboxes. This text should be stored by calling a webservice (standard BI-documents are not an option).
    Can anyone tell me how I could call a webservice from within the BEx web template to store the text contained in the textbox? The webservice-call should include some of the filter-varialbes of the web application.
    Is this only possible by the use of a JavaScript WebItem? If so - does anyone have an example of such a JavaScript.
    Thanks a lot in advance.
    Kind regards.
    Christoph

    Thanks for your response. The BSP page would work out fine if I only needed to save the data.
    But the next time I call the webtemplate, the textarea should be filled by another webservice call with the stored text (so the text can be modified und saved again). This will not be possible by calling a BSP page.
    Do yoiu have any suggestions how to integrate the text (return value from the webservice call) into the textbox in the webtemplate?
    Kind regards.
    Christoph

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • Can I call a report from pl/sql?

    How can I call a report from pl/sql? I would like the output to be pdf and have it outputted to the screen?
    We are running Oracle 10g database and 10.1.2.3 application server on LInux Redhat 4.
    Thanks.
    Shirley
    Edited by: jonesfnalgov on Jul 12, 2011 2:17 PM
    Edited by: jonesfnalgov on Jul 12, 2011 2:18 PM

    Hello,
    a package is provided : srwAPIins.sql installs the Event-Driven Publishing API.
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_evnt.htm
    The Event-Driven Publishing API is a PL/SQL package that provides the basic functions required for the development of procedures that respond to events in the database. Event-driven jobs are submitted using the HTTP protocol. The server assigns a unique job_ident record to every call, useful for tracking the status of the job.
    Regards

  • Calling Java WebService from Adobe

    Hi,
    Iam using a simple java service. I need to call this WebService from my Online/Offline forms.
    When Iam running the form in Portal , Iam getting the following error:
    Error attempting to read from file :
    http: / / hostname:port/ServiceName/Config1?Style=document.
    The way I imported the wsdl. Saved wsdl , merged 3 wsdls and imported in Adobe Form.
    Please let me know is there anything else missing here?
    Thanks,
    Uma.A
    Edited by: Uma Anbazhagan on Sep 28, 2009 8:20 PM

    Hi,
    Regarding this question, I was able to save the wsdl file, make relevant changes as mentioned in help document and consume it.
    However , without authentication WS worked fine. The WS with authentication is having issues.
    Need to try with latest version and see if this is resolved.
    Thanks,
    Uma.

  • How to call a webservice from JSP

    I want to call a webservice from JSP? How can I do that .

    Check out this OBE and I think it's pretty well documented in JDeveloper help.
    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    Thanks, Rob

  • How to call a webService from WebDynPro ABAP ?

    We are trying to call a webService from WebDynPro-ABAP application. It is not working, While if we are calling the WebService from a Report, it is working.
    How exactly do we call a WebService from a WebDynPro-ABAP application?
    What are the main steps involved ?

    Hi Phani,
    You will need to create a service call as follows.
    Right click on your WD component name and select Create->Service Call
    The wizard will guide you through a series of steps to make a Web Service Call. On the 3rd screen, it will give you options such as Function Module, Web Service, etc
    Before making a service call, you will need to create a proxy for the Web service in the ABAP Workbench using a WSDL document as a basis. To create or consume Web services, you will need the authorizations associated with the role SAP_BC_WEBSERVICE_ADMIN.

  • Call Oracle form from pl/sql

    Dear All
    How can I call Oracle form from pl/sql and open this form to end user
    many thanks

    Hshihadah wrote:
    how can I show this form to specific client ?What client?!? Database PL/SQL is executed within a process on the database server, it's not something which is executed on the client. Could you please elaborate a little bit more?
    By now I have not the faintest clue if you want to
    - call a form from another form ( call_form )
    - call a form within a database process (?!?)
    - call your form from a client you did not tell us (probably APEX?!?)
    For the case you really meant to call a form within Database PL/SQL: Just in case you didn't recognize it, but the database is perfectly capable of PL/SQL and as calling a form within a database process is a one-way street as you cannot interact with it there is no point at all in writing the things you want to do in forms. If you want some PL/SQL code executed on the database then...well...put it in a stored procedure in the database!
    cheers

Maybe you are looking for