Call a Java API inside a java mapping

Hi,
I have a web service in SAP PI 7.0 that recives a PDF coded in base64. I need to call an external Java API provided by a partner for extract its digital signature and return it as Web Service Response. It's possible to do the call to a Java API inside a Java mapping for doing this? What is necessari for doing this call?
I think that I Need to install the Java libraries in SAP J2EE stack and import its inside the java mapping. Need I something else?
can you show me any exemple?
thanks.

Hi,
Put your jar files on your servers java path. Doing so you can have direct access into an udf for your libraries.
Another option (for testing purposes is a good idea) is to attach to the scenario your jar file. Go to mapping objects, imported archives, and import your jar file there. By this way it will be visible only on the context of the software component and namespace where you put the file.
Regards.
roberti

Similar Messages

  • Calling pl/sql api through multiple java threads

    Hi All,
    I need to call a pl/sql api from multiple java threads simultaneously and all thread will use same db connection.
    I want to know if all the threads will simultaneously call the pl/sql api then will the local variable inside pl/sql procedure be shared between them or they will get separate instances of variables.
    TIA

    You cannot make multiple parallel client calls over the same Oracle session handle. There is a single non-threaded/non-fibre serialised server process servicing client requests for that session. (physical process on Linux/Unix, thread in the oracle.exe process on Windows).
    Each thread on the client side, needs its very own Oracle session. Thus each thread will have a server process footprint on the server. Which could be problematic if 10 clients each starts 10 threads - as it means a 100 processes on the server are needed to service these client threads.
    Have a look at Overview of OCI Multithreaded Development in the Oracle® Call Interface Programmer's Guide for how to use the threading call interface of the OCI - as oppose to rolling your own where each thread manually needs to deal with is OCI session context.

  • Inetgrating MDM Java API's with Java proxies on XI side

    Hello friends
    Can anyone help me on integrating MDM JAVA API's used for talking to MDM Server and the Javaproxies we generate from the XI side.I am having an application class inside the Java API's (it contains the main function)which triggers the functionality on the MDM side.But how to trigger it from the Java proxies side??I can get the different fields that I have to send  in the impl.java program of my generated proxy,but how to trigger the MDM Java API's from inside this.Also there is one problem I needed to pass the datatype fields from the Javaproxy(XI)side to the CRUDMAINTABLERecord program..Since importing the javaproxy package is giving me an error(I don't know why)I don't know how to pass these datatypes to the CRUD program.Please help me out on this urgently.Thank you all in advance.

    Hi Deepthi,
    I had used the below code for retrieving the workflow's id's
      RetrieveWorkflowsCommand RetriveworksFlows = new RetrieveWorkflowsCommand(connections);
    RetriveworksFlows.setSession(session);
    try{
        RetriveworksFlows.execute();
    catch(Exception e)
    WorkflowProperties[] workflowpro = RetriveworksFlows.getWorkflows();
    WorkflowId[] workflowid = new WorkflowId[workflowpro.length];
    for(int n=0;n<workflowpro.length;n++)
    workflowid[n] = workflowpro[n].getId();
    String workfloName = workflowpro[n].getLaunchType()+"";
    System.out.println("id--"workflowid"name"+workfloName);
    and for creating the workflow job id i had written the below code
    CreateWorkflowJobCommand workflowjobcommand = new CreateWorkflowJobCommand(connections);
    workflowjobcommand.setWorkflowId(workflowid[0]);
    workflowjobcommand.setRecordIds(recordId);
    workflowjobcommand.setSession(session);
    try{
        workflowjobcommand.execute();
    catch(Exception e)
    then to start the workflow what  i  have to do .
    please expain me

  • MS CRM 2015 :DB locking issues while calling a web API inside an asynchronous Plugin.

    Hi,
    We have a SharePoint Integration where a Web API is deployed on SharePoint Server.We are calling this Web API in asynchronous plugin. Although the Plugin works fine. But  its causing DB issues .other custom applications like schedulers are breaking
    and showing time-out issues. 
    I analysed it and found that Web API sometime failed to instantiate the Proxy object ( Exception ::System.Net.WebException: The operation has timed out ).
    This results into the exception in  plugin OR cause of DB locking. 
    Kindly suggest how to resolve this issue.
    Thanks,
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari
    http://microxrm.blogspot.in

    ianp123,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Problems using the Java API inside a Web Service

    Hi,
    after I've built a standalone Java RMI client, using the API, I wanted to use the same code in a Web Service I've built and deployed in tomcat (jwsdp-1.3). But i ran into a few problems..
    - although I have the exact same code in both programs, the one in the web service simply blocks when I initiate the Locator class (see above...);
    - all the .jar's that I use in the client are deployed in the WEB-IF/lib of the web service directory on tomcat;
    - no exceptions are thrown in tomcat, so i don't know what's going on;
    Is there any specific configuration for the API to run on tomcat?
    Could it be that the .jar's needed by the Locator class may have some kind of conflict with the ones in tomcat?
    Thanks...
    Note: The code on the client is totaly stable and fully operational.
    The web service uses java.rmi.Remote (extends Remote).
    Here's part of the code:
    Properties env = new Properties();
    env.setProperty("orabpel.platform", "oc4j_10g");
    env.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
    env.setProperty("java.naming.provider.url","ormi://dellpc05/orabpel");
    env.setProperty("java.naming.security.principal","admin");
    env.setProperty("java.naming.security.credentials","welcome");
    Locator locator = new Locator("default", "bpel", env);
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    (...)

    I've put a
    try{Locator...}
    }catch(Throwable t) {
    System.out.println(t.getMessage());
    t.printStackTrace();
    around the Locator..
    I still don't know why it's throwing this...
    Here's what it gets:
    before Locator
    javax/jms/JMSException
    java.lang.NoClassDefFoundError: javax/jms/JMSException
         at com.evermind.server.ThreadState.getCurrentState(ThreadState.java:206)
         at com.evermind.server.rmi.RMIConnection.checkServletCaller(RMIConnection.java:3448)
         at com.evermind.server.rmi.RMIConnection.<init>(RMIConnection.java:181)
         at com.evermind.server.rmi.RMIServer.addNode(RMIServer.java:856)
         at com.evermind.server.rmi.RMIServer.getConnection(RMIServer.java:953)
         at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:309)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.<init>(InitialContext.java:195)
         at com.collaxa.cube.util.CXBeanRegistry.lookupDomainManagerBean(CXBeanRegistry.java:205)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:84)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:120)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:91)
         at dmc.tm.resultprovider.ResultProviderImpl$ResultProviderThread.taskTimeoutExceeded(ResultProviderImpl.java:231)
         at dmc.tm.resultprovider.ResultProviderImpl$ResultProviderThread.run(ResultProviderImpl.java:160)

  • JAVA API Personalization iview / User Mapping

    I am using the following code snippet to get the
    User Mapping from the "Personalization" iview
    IUserMappingData iumd = iums.getMappingData (systemalias, iuser);
    Is there a similiar SET method?
    TIA -hs

    hI
    When you use umdata.enrich(map), soon after that, use SET property in the Hash Map and finally call umdata.storeLogonData(Map). This map should contain updated credentials.
    Hope this works.
    Pls reward points if useful
    Murali.

  • Java api: User mapping information

    Hi all,
    is it possible using Java Api to read User mapping information.
    I need user name my portal user mapped to.

    found an answer: Re: Getting User ID and Password Mapped to the Users

  • How to call a html file in a java file

    how to call a html file inside a java file ?

    Hopeless. Are you by any chance a rare gas? You seem completely inert. LOL You totally pwned him there :rolls eyes:
    well, no, I think he's looking for something to this degree:
    in HTML, there is a mailto: command that makes the system default handled way to email emails open up. He's looking for a command thats very nice and opens a html file in the system default browser.
    So, Dick, Runtime.exec would work execpt that he needs a way to find the default system browser to call exec on, AND he has to know how to pass html file locations to the executable via command line arguments
    He just didnt try to phrase it at all :P

  • URGENT:How can we submit a web page containing form using Java API?

    Dear Friends,
    I want to submit a form to a form action page resides in a web site. Then I need to get the response of the same.
    Is there any way to do this automatically by using Java API.
    Does java.net have anything?
    Thanks in advance
    Sarath

    Have you looked at a package called httpunit.
    http://httpunit.sourceforge.net/
    This allows form submission, Javascript, cookies etc.

  • Java scriptlets inside java scripts

    Hello.
    Im putting a java scriptlet inside a java script.What i want to do is to put some selected values inside a method and that method im calling inside the javascript.
    function result()
         var Category = document.getElementById("ddlcategory").value;
         var source= document.getElementById("ddlFromCity").value;
         var desti = document.getElementById("ddlToCity").value;
         if(Category != "" && Category != null)
         <%
         Values vss = new Values();
         ResultSet rss = vss.getFairChart("route_id","charge_seat","charge_birth","Mst_route_charges","layout_id",%>Category<%,"city_src_id",%>source<%,"city_dst_id",%>desti<%);%>
    }This is what im doin. but the error it is giving is as follows,
    The method getFairChart(String, String, String, String, String, String, String, String, String, String) in the type Values is not applicable for the arguments (String, String, String, String, String, void, String, void, String, void)
    21:      {
    22:      <%
    23:      Values vss = new Values();
    24:      ResultSet rss = vss.getFairChart("route_id","charge_seat","charge_birth","Mst_route_charges","layout_id",%>Category<%,"city_src_id",%>source<%,"city_dst_id",%>desti<%);%>
    25:      }Can any one help me abt this thing.

    Java is already executed at the server side before the response arrives to the client and Javascript (which is an entirely different language) can only be executed at the client side if the response is already arrived at the client side.
    If you want to execute some Java using Javascript, you'll have to create a new request to the server. That can be a GET request or a POST request. You can use plain vanilla links, or forms or AJAX for that.

  • Best option to push Mass data using Java API

    Hi All,
    Can any one let me know how Java API push data to MDM? Is it a good option when ti comes to perfromance point of view? We have around 2000/5000 records to be imported every time using Java API and wondering what would be best way to acheive this using Java API?
    Is java API is best option than Web services?
    Thanks
    Rajeev

    Rajeev,
    It is perfectly fine to use API to push data into MDM, you just need to make sure that your API does all those tasks which import manager does by default. For example, it should know when to insert and when to update. if an error happens during insertion of record, you should be able to notify the users.
    Having said that, where does the number 2000/5000 comes in? will you be creating users in batch and then invoke MDM API to store these in a single shot or willl it be a delta insert/update from Java to MDM?
    Thanks
    Aamir

  • Oracle 11g Standard Edition + Locator Java API

    We have Oracle 11g Standard which includes the Oracle Locator package, but not the Oracle Spatial.
    I would like to use the Oracle® Spatial Java API in my java code, but am unsure of the licensing implications of this.
    I require some form of java api in order to access the geomettry objects stored in the database. Oracle do not allow the download of the java files seperately. I was unable to find any reference to a 'Oracle Locator Java API'
    Could someone let me know what exists in terms of Java API's, what i am entitled to use under the current licensing rules, and where I can download the necessary source/jar files?

    Thanks for letting me know the location of the jar files, that will at least help me get things going.
    I am still concerned about licensing issues, as your reply appears to contradict itself:
    "There is no licensing issues if you just want to use Oracle Spatial Java API(sdoapi.jar) with your spatial data in the Oracle 11g Standard DB."
    and
    "You cannot use some oracle spatial features (PL/SQL packages and their java APIs) in the standard edition."
    I could use some clarification on this. I'm currently assuming that you mean I can legitimately use the spatial java API with any features I have available within the 11g Standard DB (i.e Oracle Locator subset of the Oracle Spatial package), but that I can't take that for granted, especially considering how militant Oracle are being over licensing and patents these days.

  • Steps for java apis and mdm

    Hi all ,
    How we can work with JAVA APIs and MDM .
    Please tell step by step ways.
    thanks in advance.
    Thnks
    nm

    Hi Man,
    You have to specify the correct JAR files in the classpath of the Java Virtual Machine (JVM). The API consists of five JAR files:
    1. mdm-admin.jar
    2. mdm-common.jar
    3. mdm-core.jar
    4. mdm-data.jar
    5. mdm-protocol.jar
    These files in one single archive file with the name MDMJavaAPI_Ver<buildnumber>.zip. you can download this file from the service market place by using mentioned below link:
    http://service.sap.com/swdc
    then goto Download>Support Packages and Patches> Entry by application group -->SAP NetWeaver -->SAP MDM -->SAPMDM5.5 -->Java API
    for the Java API documentation, you can download it from the link below:
    http://help.sap.com/javadocs/MDM/current
    But remember one thing that this JAVA API Version file must be compitable with your MDM Server version.you can verify this as per the build version.
    Hope this will help you.
    TNR,
    Saurabh...
    Edited by: Saurabh Kumar Sahu on Feb 1, 2008 8:09 AM
    Edited by: Saurabh Kumar Sahu on Feb 4, 2008 7:49 AM

  • RFC or Java API

    Hi,
      I want to get some data from R/3 into XI to do validations. Is it better to use an RFC or use Java API.
    With JAVA API, can I do joins?
    Thanks,
    Ram

    Hi,
    Its a best practice to check the data validity at the place of the owner. In your case its best you do all ur validity check in RFC/ABAP Proxy.
    Doing so you will be moving the complexity and data computation from XI to the source.
    If the current SAP instance is 6.2+ you can use ABAP Proxies for getting the endresult(validated data)into xi.
    Cheers,
    Naveen

  • Java API: repository.login error

    I MDM guru,
    i habe the "little" problem with JAVA API SP2.
    I have do the followings step:
    - download last JAVA API from  service.sap.com/swdc:
       Support Packages and Patches->SAP NetWeaver->SAP MDM->SAP MDM 5.5->JAVA API
    - download  "MDM Java API Samples Framework"
    - downloadn MDM_API_SAMPLES repository (import ad load it in the MDM server)
    When run Application.java (with program = KeyMappingProgram.RETRIEVE) when exextute this line
    repository.login(region, user, password);
    i have this error
    com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: Dati non convalidati da verifica CRC
         at com.sap.mdm.commands.AuthenticateRepositorySessionCommand.execute(AuthenticateRepositorySessionCommand.java:94)
         at com.sap.nw.mdm.rig.server.SessionImpl.authenticateRepositorySession(SessionImpl.java:136)
         at com.sap.nw.mdm.rig.server.SessionImpl.<init>(SessionImpl.java:37)
         at com.sap.nw.mdm.rig.server.RepositoryImpl.login(RepositoryImpl.java:61)
         at com.sap.nw.mdm.rig.Application.start(Application.java:208)
         at com.sap.nw.mdm.rig.Application.main(Application.java:157)
    Caused by: com.sap.mdm.internal.protocol.manual.ServerException: Dati non convalidati da verifica CRC
         at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:112)
         at com.sap.mdm.commands.AuthenticateRepositorySessionCommand.execute(AuthenticateRepositorySessionCommand.java:88)
         ... 5 more
    com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: Dati non convalidati da verifica CRC
         at com.sap.mdm.commands.AuthenticateUserSessionCommand.execute(AuthenticateUserSessionCommand.java:84)
         at com.sap.nw.mdm.rig.server.SessionImpl.authenticateUserSession(SessionImpl.java:87)
         at com.sap.nw.mdm.rig.server.SessionImpl.<init>(SessionImpl.java:41)
         at com.sap.nw.mdm.rig.server.RepositoryImpl.login(RepositoryImpl.java:61)
         at com.sap.nw.mdm.rig.Application.start(Application.java:208)
         at com.sap.nw.mdm.rig.Application.main(Application.java:157)
    Caused by: com.sap.mdm.internal.protocol.manual.ServerException: Dati non convalidati da verifica CRC
         at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:112)
         at com.sap.mdm.commands.AuthenticateUserSessionCommand.execute(AuthenticateUserSessionCommand.java:79)
         ... 5 more
    Where is the problem?
    This is my configuration:
    MDM Server 5.5
    - mds Version 5.5.61.48 Built on 2008-Jan-12
       Client Interface Version 5.5.61.12
       Console Interface Version 5.5.61.06
       Web Interface Version 5.5.61.12
    mdm-core.jar:
        Build Version 5.5.62.83
    Public Interface Version 5.5.62.00 [Interface CRC=0xab59b8dc]
    Console Interface Version 5.5.62.01 [Interface CRC=0xf3c104b6]
        Web Interface Version 5.5.62.06 [Interface CRC=0x86541e49]

    well i got this error while creating a repository session. but the crc is for version mismatch as said in the previous post.
    Check the following wiki for details on the error
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=4119
    I got this error when i moved my EP Server to MDM Java 602 and my MDM server was at 5.5
    Then i moved by EP server back to 5.5 and resolved the issue.
    I hope this will help.

Maybe you are looking for

  • Issue with date of entry and date of posting in F110

    Hello, When we do a payment run (transaction f110) and we do the validation, the entry of all payments is made at the date of the proposal even if the validation is made a few days later. How can we do to have this entry at the date of the validation

  • Best way to repartition external hard drive to give Time Machine more space

    I have my external 2 TB hard drive segmented into 2 equal 1 TB partitions. The first partition is my time machine back-ups. The second is media files. I also have approx 500GB of storage left on my 1 TB internal Mac HD. I keep receiving an error mess

  • Tv series is still syncing 'watched' episodes

    i bought a tv show series and i don't have enough room to put all episodes on iphone. it synced the first 3 unwatched episodes fine. After watching the shows on iphone, i wanted to get the next three epidsoes. So, i went under summary and asked to sy

  • JMS send message

    Hello, in my message bean i have method with 3 BigDecimal parameters. How can i send message from client with 3 BigDecimal parameters? thanks for help.

  • Are the problems with Compressor's encoding fixed yet?

    Sorry for the slightly vague title but I only use compressor once a year basically, which is after the production of a Christmas show I produce. Last year I upgraded ot Final Cut Studio to do the DVD and got caught out. I encoded using what I thought