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

Similar Messages

  • 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

  • Calling Java API from ABAP using JCo

    I need to call Java API from ABAP & BSP also. For this I have got useful information related to JCo from following blog:
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    But, I am facing one problem. On executing Java program myExample5.java (recommended by Gregor Wolf) from command line I get following error message:
    Server JCOSERVER01 changed state from [ STOPPED ] to [ STARTED ]
    Exception in server JCOSERVER01:
    com.sap.mw.jco.JCO$Exception: (129) JCO_ERROR_SERVER_STARTUP: Server startup failed at Thu Apr 26 13:46:32 IST 2007.
    This is caused by either a) erroneous server settings, b) the backend system has
    been shutdown, c) network problems. Will try next startup in 1 seconds.
    Connect to SAP gateway failed
    Connect_PM  TPNAME=JCOSERVER01, GWHOST=gateway, GWSERV=3300
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       hostname 'gateway' unknown
    TIME        Thu Apr 26 13:46:32 2007
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -2
    MODULE      ninti.c
    LINE        336
    DETAIL      NiPGetHostByName2: hostname 'gateway' not found
    SYSTEM CALL gethostbyname_r
    COUNTER     1.
    Can anyone please help me out. Do I need to do any setting?
    I'll surely reward points.
    Thanks & Regards,
    Nilesh Kumar

    Hi Nilesh,
    From the error i think that the error is with the hostname.
    Please enter the the Application Server IP/Hostname.
    If you are loggin to SAP System "XX1" from SAP GUI. Then click the change Item tab and see Application server name/IP let say "XX2" for hostname or "xx.xx.xx.xx" for IP.
    Replace <i>srv[0] = new Server("gateway","sapgw00","JCOSERVER01",repository);</i>
    with <i>srv[0] = new Server("XX2","sapgw00","JCOSERVER01",repository);</i>
    If App Server is IP then replace with
    <i>srv[0] = new Server("xx.xx.xx.xx","sapgw00","JCOSERVER01",repository);</i>
    Let me know if it is throwing any error.
    Thanks,
    Prashil

  • 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

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • How to call java method from workflow script?

    Hi
    I have a requirement of updating field value 'Document Status' based on review/approve of content from Workflow and hence need to update the version number. For that I need to call my java method from workflow during submit of review/approve condition. Please let me know how to call java method from workflow?
    Is there any alternative better way to achive this requirement from workflow? Please suggest.
    Thanks,
    Sarang

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • How to call java implementations from C language

    How to call java implementations from C language....
    I know using JNI java can call C code....is the converse also possible????
    -Rams

    How to call java implementations from C language....
    I know using JNI java can call C code....is the
    converse also possible????Yes.

  • Calling java APIs from a function module

    Hi,
    Can someone tell me whether it is possible to call Java APIs from a function module in SAP system?
    Thanks in advance,
    Vineetha

    Hi,
    I guess you have changed the properties of screen only.
    I assume you have made a Ztransaction Code.
    When you define a transaction code, you need to specify a screen number for radio option program and screen and you need to specify a screen and not subscreen.( I think so!!)
    You changed only the code without changing the transaction code properties.
    Therefore, i think u r getting a dump.
    If you want to call your subscreen, call it in some screen and then call that screen using your transaction code properties.
    To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN <area> INCLUDING <prog> <dynp>.
    To call the PAI flow logic of the subscreen screen, use the following statement in the PAI flow logic of the main screen:
    PROCESS AFTER INPUT.
    CALL SUBSCREEN <area>.
    Refer:
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
    Regards,
    Tanveer.
    Please mark helpful answers.
    Message was edited by: Tanveer Shaikh
    Message was edited by: Tanveer Shaikh

  • How to call java function from PL/sql in oracle applications

    I am trying to call a java function from plsql procedure. Can any one explain how to call java function, and in which directory I have to store my java function in oracle applications. Do I need to register that java function from Application developer.
    Thanks
    Kranthi

    http://www.oracle.com/technology/tech/java/jsp/index.html
    Good Luck,
    Avi.

  • How to call java files from different directories

    hi, how do i call java files from a different directory??
    let say i got partA.java, and i need to include functions from partB.java which is in a different folder. how can i do that?

    Chicon wrote:
    Hi nuttynibbles,
    Before the class declaration in partA.java, you must have an import statement like :
    import someDirectory.partB;
    public class partA {
    ... and before you ask... you'll probably want to read through this http://java.sun.com/docs/books/tutorial/java/package/index.html

  • How to call java class from pl/sql procedure ?

    Hello everyone,
    My query is..
    There is one pl/sql stored procedure which is doing some business logic and storing data in some columns of one table, suppose the table name is 'ABC' .. and the rest of columns of table ABC are getting updated using java class. Now my problem is whenever I insert data in ABC using store proc.. i have to call that java class so that it will update the rest columns ( why java class for updating the columns in ABC is ..because that logic cant be done from pl/sql proc.. it has to be done using java )
    and the other thing is.. oracle is in one machine and java is in another .. :(
    hope ..u can help me out !!
    Thank in advance !!

    but that updation have to be done from java code only.. we are using GIS tools .. have to create some shape files and update the column with that shape file.. so creation of shape file has to be done from java code only..
    so how to call java class file which is on another machine and oracle in another..

  • 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 Java method from XSLT??

    Hi All,
    Jdev 11.1.1.3.0
    I have a requirement to implement that, I have to call Java method from XSLT. Could anyone please suggest to implement that??
    Thanks,
    Santosh M E

    As pointed by others, you must expose your method as a custom function, registering with JDeveloper (for development time) as well as with SOA Suite (for runtime).
    In the link below you will find a simple step by step example:
    https://blogs.oracle.com/reynolds/entry/building_your_own_path
    Regards,
    Luis F. Heckler

  • How to call Java Beans from JSP (eg.put them in a WAR or package)

    Can anyone explain to me what are the steps and ways to call java beans from JSP?

    1st, put the javabean classes in the right place:
    the web-inf/classes/your_bean.class directory of corresponding web application
    2nd in your jsp page:
    <jsp:useBean id="obj_var_name" class="your_bean"/>
    <jsp:setProperty name="obj_var_name" property="smthg" value="smthg_calue"/>
    Micheal

  • 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

Maybe you are looking for

  • Read only access to J2EE related tools

    Hello, I would like to help our auditors access everything they need to check in the Java systems, but I am not ready to give them ADMIN accounts. That`s why I need some kind of read only access for them. So I would like to ask you if there is a SAP

  • How can I copy and paste quoted emails from Apple Mail v4.5 into another application?

    Hi, Having just moved from Entourage to Apple Mail on an Exchange back-end, everything is running smoothly except for one thing - when I copy emails that include quotes from replies (i.e. those coloured vertical lines down the left of the message) an

  • Opening file in Photoshop with Lightroom edits doesn't work anymore

    I have LR5.3 and PS CS6. Since I've updated camera Raw, my files won't open as Tiff files when I want to edit them in Photoshop. Hence, all the edits made in LR before won't be kept. I don't see the window saying "Open in PS with Lightroom edits"????

  • Rs.updateBoolean SQLException: ORA-12899: value too large for column

    Complete error is SQLException: ORA-12899: value too large for column "SMSUSER"."PRUEBA"."VLOGIC" (actual: 4, maximum: 1) Let's see the code: PreparedStatement ps=null; ResultSet rs=null; try ps=conn.prepareStatement("create table prueba(name varchar

  • How to open a range of ports in RV016

    I am trying to add a couple VOIP phone units that do not have their own router.  They are designed to run of the existing router and have three ranges of UDP ports opened up.  They also do not advise using internal (private) statics on the phones. So