How to call SOAP API from JavaScript

Hi,
I'm trying to call the SOAP API to get statistics about emails. Are there any examples on how to call the API from JavaScript?
Here is a link to my original question about using the REST API. REST API URL for email statistics
Thanks,
Tim

Tim,
In order to consume a SOAP API I recommend you use something other than JavaScript.
Any platform can offer you a good SOAP client should be OK. (.Net, Java, php, Ruby, python).
I didn't see anyone successfully used javascript and consume the Eloqua SOAP API.
I know you can create a SOAP client in Java script but it will be too much work to handle the Eloqua response in some cases.
Regards,
Daniel

Similar Messages

  • How to call Java API from BSP?

    I have a requirement to call Java API from BSP application.
    I have checked the forum and found that it is possible by using some ABAP codes.
    However there is no pointer on how this is done.
    Can someone explain the details on how to call Java API from BSP is done?
    I found class CL_EJB_JAVA_OBJECT_METHODS to call a method in EJB but can't find function or SAP class to call Java API.
    Actually is there any BSP extention which can used to call Java API?
    Thanks,
    Hendri

    check out these weblogs, it should give you an idea how to go about it.
    /people/ignacio.hernndez/blog/2006/12/04/speech-synthesis-listen-the-application-server-is-talking-to-you
    /people/puru.govind/blog/2006/12/20/let-abap-speak
    Regards
    Raja

  • How to call remote API from root SharePoint 2013 domain (not an app)

    I'm trying to follow the article
    http://msdn.microsoft.com/en-us/library/office/fp179895%28v=office.15%29.aspx
    For a SharePoint 2013 hosted under O365, do I need to create an app to use the SP.* methods in sp.js? I need to call a remote API from the root domain (https://mycompany.sharepoint.com). But the app, as mentioned in the article
    above, deploys on a whole different URL (https://mycompany-a2d3f4t454.sharepoint.com).
    I need to be able to call the API from pages like https://mycompany.sharepoint.com/pages/default.aspx. Is this not possible?

    Hi,
    According to your description, my understanding is that you want to call remote API from the root domain site.
    Yes, you can use SharePoint hosted app to achieve it. SharePoint hosted app has app web and host web, you can create an app to call the remote api in the host web from app web.
    Here are some detailed articles for your reference:
    http://blog.ctp.com/2014/06/23/data-access-in-sharepoint-hosted-apps/
    http://msdn.microsoft.com/en-us/library/office/fp179925(v=office.15).aspx
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • How to call Soap API plsql package with ws security ?

    Hi all,
    I want to consume a webservice which comes with the basic authentication (username and password in soap header).
    By calling Soap api through a anonymous block shows this error
    "Error report:
    ORA-20000: wsse:InvalidSecurity - Missing <wsse:Security> in SOAP Header
    ORA-06512: at "APPS.SOAP_API", line 124
    ORA-06512: at "APPS.SOAP_API", line 157
    ORA-06512: at line 76
    20000. 00000 -  "%s"
    *Cause:    The stored procedure 'raise_application_error'
               was called which causes this error to be generated.
    *Action:   Correct the problem as described in the error message or contact
               the application administrator or DBA for more information."
    My Anonymous Block is:
    set serveroutput on
    declare
      l_request   soap_api.t_request;
      l_response  soap_api.t_response;
      l_return    VARCHAR2(32767);
      l_url          VARCHAR2(32767);
      l_namespace    VARCHAR2(32767);
      l_method       VARCHAR2(32767);
      l_soap_action  VARCHAR2(32767);
      l_result_name  VARCHAR2(32767);
      l_envelope       VARCHAR2(32767);
    BEGIN
       l_url         := 'my wsdl url';                                 -- i provided the original URL in my actual code
      l_namespace   := 'xmlns="my namespace"';       -- same here
      l_method      := 'get_details';                              -- same here
      l_soap_action := 'my soap action';                        -- same here
      l_result_name := 'REQUEST_STAT';
      l_request := soap_api.new_request(p_method       => l_method,
                                        P_Namespace    => L_Namespace);
       soap_api.add_parameter(p_request => l_request,
                             p_name    => 'Username',
                             p_type    => '',
                             p_value   => 'user1');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'Password',
                             P_Type    => '',
                             p_value   => 'passwd');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'empid',
                             p_type    => '',
                             p_value   => '9989');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'emp_TYPE',
                             P_Type    => '',
                             p_value   => 'COCD');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'name',
                             P_Type    => '',
                             p_value   => 'Danny');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'STATUS',
                             P_Type    => '',
                             p_value   => 'pending');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'mgr_name',
                             P_Type    => '',
                             P_Value   => 'Auditore');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'ADDRESS',
                             P_Type    => '',
                             p_value   => '13 new street');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'PHONE',
                             P_Type    => '',
                             p_value   => '123456');
      l_Response := Soap_Api.Invoke(P_Request => l_Request,
                                    P_Url     => l_Url,
                                   P_Action  => L_Soap_Action);
      l_return := soap_api.get_return_value(p_response  => l_response,
                                            p_name      => l_result_name,
                                            P_Namespace => Null);
    -- DBMS_OUTPUT.put_line(l_return );                                    
    END;
    I have Two questions :
    1) Where to give the soap header details ?
    2) In my soap header am also having the header atributes like "Responsiblity" ,"Resp Application" ,"Security Group" ,"Language" ,"Org ID"
    Where to give these values in my anonymous block?
    My Request.xml looks like this:
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
             <wsse:UsernameToken wsu:Id="UsernameToken-4" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>user1</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">passwd</wsse:Password>
             </wsse:UsernameToken>
          </wsse:Security>
          <sr:SOAHeader>
             <!--Optional:-->
             <sr:Responsibility>PURCHASING_SUPER_USER</sr:Responsibility>
             <!--Optional:-->
             <sr:RespApplication>PO</sr:RespApplication>
             <!--Optional:-->
             <sr:SecurityGroup>standard</sr:SecurityGroup>
             <!--Optional:-->
             <sr:NLSLanguage>american</sr:NLSLanguage>
             <!--Optional:-->
             <sr:Org_Id></sr:Org_Id>
          </sr:SOAHeader>
       </soapenv:Header>
       <soapenv:Body>
          <get:InputParameters>
             <!--Optional:-->
             <get:EMP_NUMBER>9969</get:EMP_NUMBER>
             <!--Optional:-->
             <get:EMP_TYPE></get:EMP_TYPE>
             <!--Optional:-->
             <get:name></get:name>
             <!--Optional:-->
             <get:STATUS></get:STATUS>
             <!--Optional:-->
             <get:MGR_NAME></get:MGR_NAME>
             <!--Optional:-->
             <get:ADDRESS></get:ADDRESS>
             <!--Optional:-->
             <get:PHONE></get:PHONE>
          </get:InputParameters>
       </soapenv:Body>
    </soapenv:Envelope>

    Hi Arik,
    Thanks for the reply. I got the solution by configuring a NonXA data source. The problem was with internal commits of the fnd_global.initialize api.
    If the DB adapter is calling aPL/SQL procedure (written inside a pakcage) using the data source configured to support XA, will expect not to have any commits in side the procedure or anywhere, the XA driver will take of the commits and whole transactions. By default the FND_GLOBAL.INITIALIZE(...) procedure will have the internal commits, so it was throwing the errors.
    The solution was configuring the a NonXA Data source in the databae adapter configuration will allow the commits inside the callings procedures. So we created Two data sources one for XA and another for NonXA and we are using the NonXA datasource whereever we are calling the EBS APIs which have the internal commits.
    -- Khaleel

  • How to call OIM API from external app?

    Hi,
    I have an java application and I would like to call OIM API to accept a request. The application resides in separate server than OIM.
    My questions:
    *1.* What to do to call OIM API from external application (import any OIM jars etc.)?
    *2.* Which method to use, setRequestResponse , closeRequest or any other?
    I appreciate any help, thanks.
    Edited by: m.m. on Feb 2, 2010 5:33 AM

    Hello,
    If it is an external client, you need to provide the "login" and "password" details explicitly in the code (something like this), before getting any other Interface control to invoke the OIM APIs -
    public class OIMAPIClientTest {
    public static void main(String[] args) {
    try{
    System.out.println("Starting...");
    ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    Hashtable env = config.getAllSettings();
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
    System.out.println("Getting utility interfaces...");
    Regards,
    Amit
    Edited by: amitKumar on Feb 2, 2010 5:29 AM

  • How to call autoSubmit programatically from javascript

    Is there a way to call autoSubmit programatically, i.e. not after every value change?
    The use case is, that I have three input boxes and only after all of them are filled out the autoSubmit should occur (and then always, if any of them is changed). This will prevent two unneccessary roundtrips to the server after filling first and second input box.
    I can think of two ways of doing this:
    1. set component's autoSubmit='false' and call autoSubmit from onChange listener, when contitions are met
    2. set component's autoSubmit='true' and prevent autoSubmit from onChange listener, when conditions are not met
    Thanks in advance,
    Viliam

    Tim,
    In order to consume a SOAP API I recommend you use something other than JavaScript.
    Any platform can offer you a good SOAP client should be OK. (.Net, Java, php, Ruby, python).
    I didn't see anyone successfully used javascript and consume the Eloqua SOAP API.
    I know you can create a SOAP client in Java script but it will be too much work to handle the Eloqua response in some cases.
    Regards,
    Daniel

  • How to call java classes from javascript?

    i have a button which calls javascript i need to access a class to update the values in the database.. how do you call the java code from within the javascript?
    the class is stored under tomcats classes directory and is accessed:
    com.Database.Employee
    the method is called : UpdateEmployeeDetails
    the button
    <input type="button" value="Save" onclick="submitForm('save')" />the javascript
    <script language="javascript">
            function submitForm(process){    
                document.myForm.action="update.jsp";
                document.myForm.submit();
    </script>

    is it not possible?
    do i have to refresh the page and read in the values like...
    <%
    String ename = request.getParameter( "EmployeeName");
         session.setAttribute( "ename", ename);
    %>and then call the class from here?
    looking around ive come across ajax but i dont know how to use it and what you need to install and if its compatable with tomcat and jsp?
    is ajax better or not really worth it?
    i have anything up to 100 fields that need saving at one save click

  • How to call java program from javascript

    Hi,
    I have an java program which will transform one xml to another xml using XSLT.
    I want to call this java program from Javascript? Is this possible? Please suggest me.
    Thanks,
    Gopal

    is it not possible?
    do i have to refresh the page and read in the values like...
    <%
    String ename = request.getParameter( "EmployeeName");
         session.setAttribute( "ename", ename);
    %>and then call the class from here?
    looking around ive come across ajax but i dont know how to use it and what you need to install and if its compatable with tomcat and jsp?
    is ajax better or not really worth it?
    i have anything up to 100 fields that need saving at one save click

  • How to call stored procedure from javascript? (about Google Suggest, AJAX)

    Hi I want to implement a text field so that it behaves like [Google Suggest|http://www.google.com/webhp?complete=1&hl=en] .
    I read this post .
    Now I've setup everything according to that document. But it just doesn't work. And I don't know why.
    I think problems may fall into the following three categories:
    1. Does the text field and the page invoke the proper javascript?
    2. Does the javascript successfully call the stored procedure?
    3. Can the stored procedure correctly return the formatted result?
    I am affirmative for 1 and 3, but I'm not sure about 2. Because I don't know how to tell if a stored procedure has been called? Is there a PL/SQL statement that I can query in SQL*Plus?
    Also, I would to know how to debug AJAX in APEX. It involves many things.
    Last, I used APEX 3.2 and Oracle XE. I cannot find either dads.conf or marvel.conf file. Is "/apex/" the virtual directory for APEX?
    Thanks a lot!

    Hello,
    I recently also ran into problems with this and I will post my solution here:
    1) if you need to pass parameters to your procedure, create it using "Flexible Parameter Passing". Then parse the parameters out of the array and put them in local variables inside your PL/SQL procedure.
    Example:
    CREATE OR REPLACE PROCEDURE MATTHIASH.incsearch(name_array IN owa.vc_arr,
         value_array IN owa.vc_arr) as
      l_List1 varchar2(4000);
      l_List2 varchar2(4000);
      l_query varchar2(255);
      l_separator varchar2(10) default '';
      qu varchar2(4000) default '';
      hl varchar2(4000) default '';
    BEGIN
      FOR i IN 1 .. name_array.COUNT 
      LOOP
           IF name_array(i) = 'qu' THEN
                qu := value_array(i);
           ELSIF name_array(i) = 'hl' THEN
                hl := value_array(i);
           END IF;
      END LOOP;
      l_query := qu||'%';
      FOR x IN (
      select object_name, object_id from user_objects
      where upper(object_name) like upper(l_query) and upper(object_type) = upper(hl) order by 1 asc)
      LOOP
        l_list1 := l_List1 || l_separator || '"' || x.object_name || '"';
        l_list2 := l_List2 || l_separator || '"' || x.object_id || '"';
        l_separator := ',';
      END LOOP;
      owa_util.mime_header('text/html', false);
      owa_util.http_header_close;
      --htp.p('sendRPCDone(frameElement, "'|| qu ||'", new Array(' || l_List1 || '), new Array(' || l_List2 || '), new Array(""));');
      htp.p('sendRPCDone(frameElement, "' || qu || '", new Array(' || l_List1 || '), new Array(' || l_List2 || '), new Array(""));');
    END;
    /2) grant EXECUTE rights to APEX_PUBLIC_USER (the user APEX uses to connect to the database) on the procedure
    grant execute on incsearch to apex_public_user;3) upload the ac.js file as static file to your application
    4) put the following javascript code in the HTML Header of your APEX page:
    <script src="#WORKSPACE_IMAGES#ac.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript">
    function iac()
    InstallAC(document.wwv_flow,document.getElementById('P1_X'),"","!MATTHIASH.incsearch","&P1_OBJECT_TYPE.");
    </script>In my example, P1_X is a text field and P1_OBJECT_TYPE is a dropdown list with all user object types.
    Good luck,
    Matthias Hoys

  • How to call UME API from ABAP?

    Hello all,
    I want to call the UME API using ABAP to change portal users from backend system.
    Is this possible without JAVA development? How?
    Thanks for your help,
    Regards,
    Guido Knapp

    Hi,
    Refer this link you wil get some idea
    http://help.sap.com/saphelp_nw04/helpdata/en/e0/3820a37edeec45a91dd6e45fba15b8/frameset.htm
    Regards,
    Senthil K.

  • How to call Abap Program from Javascript or html ?

    Hi All,
        I have developed a program using html, abap and javascript. I want to call an abap program while clicking on the button.
    How can I do it ?

    Hi Rajesh,
    What kind of program it is? is it a report or a transaction?
    If it's transaction, you can call the transaction as below from a link or button.
    http://<host>:<port>/sap/bc/gui/sap/its/webgui?~transaction=<transaction>
    Please replace the parameters in <..> with appropriate values before testing.
    Regards,
    Ravi

  • How to call Flex app from Javascript in portal question

    I've setup my flex 4 app with a callback function. The flex app is embedded in a Java portlet on a WebLogic Portal 10.3.2. How can I call the Flex app from the portlets javascript function? Code below shows how the flex app is embedded in the wrapper jsp.
    <script language="JavaScript" type="text/javascript">
            AC_FL_RunContent(
                        "src", "<%= srcPath %>",
                        "id", "<%= (String)request.getAttribute("portlet_name") %>",
                        "name", "<%= (String)request.getAttribute("portlet_name") %>", 
                        "width", "<%= request.getAttribute("width") %>",
                        "height", "<%= request.getAttribute("height") %>",
                        "align", "middle",
                        "quality", "high",
                        "FlashVars", "PORTLET_WS=<%= request.getAttribute("window_state")%><%= wsrpEncodedChannel %>",
                        "allowScriptAccess","sameDomain",
                        "type", "application/x-shockwave-flash",
                        "pluginspage", "http://www.adobe.com/go/getflashplayer");         
    </script>

    Thanks for the response. I followed the instructions in the link, but it does not appear to work within a Weblogic 10.3.2 portal. My Flex app is wrapped in a Java JSR 286 portlet. Should this approach work or is there a different approach for the portlets wrapper JavaScript to call a Flex callback function?
    thanks
    Dan

  • Calling a procedure from Javascript

    Hello
    I have created a procedure with two input paprameters.
    I have gratted access to public ... and all works well
    I would now like to call this from a Javascript where I supply the input paameters. The procedure has a redirect to another URL so there is no output
    Currently I used "window.location" with the prodcedure URL ... I must beable to call the produced directly?
    Thanks for taking the time to look at this request
    Regards
    Pete

    Pete,
    Have a look at this thread:
    How to call stored procedure from javascript? (about Google Suggest, AJAX)
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Calling Java API from ABAP using JCo (Part 2)

    Hello,
    This is an additional question to thread Calling Java API from ABAP using JCo
    Has anyone managed to get the input parameter value
    input.getString("REQUTEXT")
    that is being passed from ABAP?
    If yes, what kind of setting you need to do? Because when I execute, it has no value.
    Thus, the below ECHOTEXT parameter returns blank value:
    output.setValue(input.getString("REQUTEXT"),"ECHOTEXT");
    When I debug by printing the below line, the input XML is indeed without value:
    System.out.println(input.toXML());
    Anybody knows how to pass input variable from ABAP to JAVA using JCo?
    rgs,
    hiroshi

    Hallo Hiroshi,
    as far as I can see, you are doing it the right way. The problem might be that the ABAP program does not fill in this parameter because something went wrong in the SAP System.
    Have you tried setting a breakpoint (an HTTP session - remote breakpoint) and tried checking step by step if the value is being processed and put into the REQUTEXT field?
    Bye,
    Sameer

  • How to call java function in javascript

    Hello Everyone,
    Can anyone tell me solution that:
    How to call java function in javascript?
    Thanks,
    VIDs

    You can't since Java is running on the server and javascript is running in the browser long after the Java side of things has finished executing. Assuming you're not talking about an applet here.
    But you can make calls back to the server through Ajax. All you need is something like a servlet on the receiving end which you can invoke through Ajax; from that point you can execute any Java code you want.

Maybe you are looking for