How to test Java Proxy Classes in Portal

I have created a Java Project in NWDS and have added Java Proxy classes for BAPI_EMPLOYEE_GETDADA. I have created a main class to call the Java Proxy Classes.
I have noticed that I can not export it as .PAR file so I exported it as .JAR file. Now I logged into my Portal Server to test this new Java Proxy class but I do not see the .JAR file that I had created. Do I need to explicitly import it into Portal Server (I was thinking that similar to .PAR files, .JAR file will get transferred to the portal server automatically upon chosing Export from NWDS)
I am also not sure if I can create JAVA iView based on the .JAR file.
Please advise me on how can I test my Java Proxy Class.
Thanks a lot in advance.
Regards,
Sanjay Gera

Hi,
You can try with HTTP as sender. Send a HTTP request using HTTP Client code and check out the response.
For HTTP, sender communication channel is not required. All other steps in Configuration will be similar to any simple scenario.
Regards,
Uma

Similar Messages

  • RFC lookup with java proxy class, how do I use "fromXml()"?

    Hi,
    I'm trying to do an RFC lookup in XI using java proxy classes (SAP Enterprise Connector).
    The XMLPayload comes from a java proxy class which has been converted to xml using a method called
    .fromXml() for this. I just don't know how to use and I can't find any documentation for it.
    Would very much appreciate if someone could provide me with an example of how to use this class
    Best Regards
    Olof Trönnberg

    http://xstream.codehaus.org/javadoc/com/thoughtworks/xstream/XStreamer.html#fromXML(com.thoughtworks.xstream.io.HierarchicalStreamDriver,%20java.io.Reader)

  • How to test server proxy in ECC 6.0 ?

    Hi,
    Please tell me how to test server proxy created in SPROXY of ECC 6.0  .
    I am following this blog XI: Debug your inbound ABAP Proxy implementation .
    When i am executing the test service provider i am getting an error with " program terminated " message  creating a dump .
    How to test it through this method ? Is there any other way to test in ECC6.0
    Thanks,
    Laawanya D

    Hi,
    I have put a breakpoint in my proxy code and when i am trying to execute only, i am getting the error "Program terminated" .
    I am using ECC6.0 , so when i am clicking on Test Interface, i am not  getting  "Application Data Entry" parameters  as given in  Stefan's blog , but I am getting something like:
    Input:
    1.Generate template Data
    2.Enforce Stylesheet generation
    (I have checked both 1 & 2 .)
    Error Handling:
    1.Don't catch Application faults
    if i check this and execute , my program gets terminated , leaving a dump and if i dont set it also My program gets terminated .
    So what to do now ?

  • Help - how to create java proxy (sender) in NWDS 7.1

    Hi,
    I am trying to develop a java proxy as sender to send message from WAS to PI.
    I am using NWDS 7.1. Let me explain what I have done so far,
    1. Received proxy classes from PI
    2. Created a EJB Project, imported the proxy classes into EJB project
    3. created a EJB bean, local interface in the EJB project and exposed as webservice
    4. added the ejb to an ear
    5. added reference to the following jar files (external library)
    tcaiiproxy_rt_api.jar
    com.sap.aii.af.sdk.jar
    com.sap.aii.utilxi.server.jar
    com.sap.aii.utilxi.core.jar
    com.sap.aii.proxy.svc_api.jar
    6. able to build and deploy the application
    7. able to open the webservice in wsnavigator
    Error encountered:
    "Server Exception: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sap/aii/proxy/xiruntime/core/AbstractType "
    Questions:
    1. Which method I should execute / call among all the proxy classes from local bean class to send message to PI?
    2. Is it mandatory to add refernces to the application.xml, ejb-jar.xml and other xmls ?
    3. How can I test / monitor the message being sent to PI interface?
    Thanks and best regards,
    Arun prabhu S

    plz cross chk the references under application-j2eeengine.xml and ejb-jar.xml
    http://wiki.sdn.sap.com/wiki/display/Java/JavaProxyChangesinPI7.1fromPI7.0
    u can chk tis article also:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508bb504-87cf-2c10-2aaf-f3a5df75e651?quicklink=index&overridelayout=true

  • How to generate java proxy in PI 7.1

    Hi All,
    How do I generate java proxy in PI 7.1
    I am unable to see the "Generate Java Proxy" in the Tools menu in the Integration Builder
    Edited by: Piyush Mathur SAP on Apr 15, 2010 11:14 AM
    Edited by: Piyush Mathur SAP on Apr 15, 2010 11:14 AM

    hi ,
    As mentioned in the Question, I am unable to find the "Java Proxy Generattion" link in the Int builder.
    Also the help doc says:
    Java proxy generation is no longer supported in subsequent releases. For new developments or when making significant changes to a service interface, use Java proxy generation in SAP NetWeaver Studio instead. More information: Creating Outside-In Web Services, SAP NetWeaver Developer Studio.
    Does that mean that I can no longer generate java proxy from Int builder?
    regards,
    Piyush

  • How to call Java API classes from Javafx Main.fx?

    Hi
    Can anybody let me know how to include java.util.StringTokenizer in Main.fx file of Javafx?
    I need to split a concatenated String in Javafx. Is there any example available with anybody on this?
    When I use the split() of Javafx, I get error while assigning the value returned by split() to both String and String[] variables:
    1. var name = "test|string";
    2. var names: String[];
    3. var splitName: String = "";
    4. names[0] = name.split("|");
    5. splitName = names.split("|");
    6. var storeName: String[];
    Later I need to put the splitName into another String array to have a collection of all the concatenated string in one array.
    insert splitName into storeName;
    But I get error in line 4 and 5. The split() in javafx returns a String []. Is there anything that I missing here.
    Any reply to this post will be highly appreciated. I need this quite urgently.
    Thanks & Regards
    masrrev

    Hi Phil
    Thanks for the immediate response. I tried the code but getting the following exception, which I was getting earlier too.
    Inside on Mouse Clicked...
    Uncaught exception: java.lang.Error: 137_*
    - xing.Xing$2.lambda(), bci=43
    - xing.Xing$2.invoke(), bci=2
    - xing.Xing$2.invoke(), bci=5
    - javafx.scene.Node.mouseClicked$impl(), bci=68
    - javafx.scene.Node.mouseClicked(), bci=3
    - com.sun.fxme.runtime.FXNodeDelegate$4.run(), bci=6
    - com.sun.fxme.runtime.RunnableQueue$Manager.run(), bci=86
    - com.sun.fxme.runtime.RunnableQueue.run(), bci=38
    And the code in onMouseClicked Event is reproduced below:
    onMouseClicked: function(e : MouseEvent) : Void {
    println("Inside on Mouse Clicked...");
    def sample = "Sherlyn|masrrev|Other";
    var names = sample.split("\\|");
    println("{names.toString()}");
    // splitString();
    sceneNew = Scene {
    content: [nextScreen]
    Regards
    masrrev

  • How to test java printing program without wasting paper?

    Hi,
    I had written a java program that prints my document. I want to know how people test their printing document generatation program?
    Because I think people don;t wastes papers..
    So can anyone tell me to test these programs efficiently and preciesly what are the best testing tools available ?
    Thank you.

    1) find a program that prints to pdf, or some other file
    2) print to pdf or some other file instead of printing to a printer.
    3) To test it perfectly you will eventually have to waste some paper.

  • Calling a WSSE Enabled Web Service Through a Java Proxy Class

    I am trying to create a client that can access a WSSE enabled web service through
    the generated java proxy. For now all I am asking for in the .wsse file is the
    username and password with the line <token tokenType="username"/>. In the client
    I am setting the username and password token exactly as the BEA documentation
    describes:
    UserInfo ui = new UserInfo("myuser", "mypassword");
    session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
    Yet I am getting the following error message when I try to run the client:
    java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:
    EJB Exception: ; nested exception is:
    com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy
    requires Message to contain UsernameToken, UsernameToken not found in the Message.
    Can anyone tell me what I am missing?
    Thanks,
    John

    Hi John,
    In your standalone client, use the following two properties to send a
    user name and password to the service so that the client can
    authenticate itself: javax.xml.rpc.security.auth.username
    javax.xml.rpc.security.auth.password
    See the docs [1]
    Hope this helps,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/security.html#1073863
    John H wrote:
    >
    I am trying to create a client that can access a WSSE enabled web service through
    the generated java proxy. For now all I am asking for in the .wsse file is the
    username and password with the line <token tokenType="username"/>. In the client
    I am setting the username and password token exactly as the BEA documentation
    describes:
    UserInfo ui = new UserInfo("myuser", "mypassword");
    session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
    Yet I am getting the following error message when I try to run the client:
    java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException:
    EJB Exception: ; nested exception is:
    com.bea.wlw.runtime.jws.wssecurity.exception.WLWWSSEException: Policy
    requires Message to contain UsernameToken, UsernameToken not found in the Message.
    Can anyone tell me what I am missing?
    Thanks,
    John

  • How to use java.lang.Class.getMethod() and java.lang.reflect.Method.invoke(

    I want to call a specified method of one class dynamically. I use the method
    "getMethod()" in package "java.lang.Class" to get method and "invoke()" in
    " java.lang.reflect.Method " to invoke method.
    The problem is as following :
    1. There are two argument in this method "getMethod(String MethodName , Class[] paremterTypes)" in package "Class". I have no idea about the second parameter " Class[] parameterTypes ".what does the argument exactly mean ?
    2. There are two argument in the method "invoke(object obj, object[] obj)" in package "Method".
    I have no idea about the second parameter "object[] obj ".what is mean ?
    I pass " null " value to it and it works.But i pass anothers ,jvm will throw exception.

    I have a generic Method Executer that has a method like
    public Object execute(String className, String methodName, Object args)
        String fullClassName = packageName + className ;
        Class delegateClass = Class.forName(fullClassName);
        BaseDelegate delegate = (BaseDelegate)delegateClass.newInstance();
        Method method = null;
        if (args == null)
            method = delegateClass.getMethod(methodName, new Class[] {});
            obj = method.invoke(delegate,new Object[] {});
        else
            method = delegateClass.getMethod(methodName, new Class[] {args.getClass()});
            obj = method.invoke(delegate, new Object[]{args});
       }This seems to have problems when I call the method from a class like:
    execute("CategoryDelegate", "getCategoryById", new Integer(4144));(I get a NoSuchMethodException)
    The method I am trying to execute in CategoryDelegate looks like:
    public Category getCategoryById(int categoryId) throws DelegateExceptionI think it has to deal with the difference in the way we handle Primitive Wrappers and Objects. Wrapper we have to use Interger.TYPE and with the rest of the Objects we have to use obj.class.
    Am I doing something wrong here? Any suggestions to make it work for primitive wrappers as well as Objects?

  • How to bundle java help class into jar file ?

    Hi, all,
    I have some package in my project, with which I have a java help jar file as classpath, when I run my project, I need the jh.jar file in directory /jar/jh.jar.
    Now, I bundled all my class packages into a jar file, my.jar, together with the /jar directory. When i run my jar file with command:
    java -jar my.jar
    It tells me couldn't find javahelp class.
    What shall I do? How can I create my jar file with the jh.jar?
    Thanks in advance.

    I think you'd be better off just adding the jh.jar as
    a classpath argument and running it like that:
    java -classpath /myjavalibdir/jh.jar -jar myjar.jar
    ...otherwise you're stepping into redistribution of
    binary issues licensing-wise. That won't work either; when you run java with the -jar option, it ignores both the -classpath option and the CLASSPATH environment variable. However, it will see jh.jar automatically if you put it in the <path-to-java>/jre/lib/ext directory. But for distribution purposes, it might be simpler just to combime the contents of jh.jar into myjar.jar (if you use Ant, its <jar> task makes that very easy). Or, you can just run it this way:java -classpath myjar.jar;jar/jh.jar MyMainClassBTW, I don't think redistribution is a problem; otherwise how anyone even use JavaHelp?

  • How to compile .java to .class in .jar file

    Hey. I have code to make a .jar file, read .java files, and save them as .class files in the .jar file. When I open the .jar file, it says that the magic numbers on the classes are wrong. So I figured that Java must compile the .java files to .class files in bytecode.
    Question: What's the code to compile a string from a .java file to a .class file?
    Here's my code:
    try {
                // Name of jar file to write
                String archiveFile = Name + ".jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("Main.class"));
                StringBuffer sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("Main.txt")));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.putNextEntry(new JarEntry("MainScreen.class"));
                sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("MainScreen.txt"));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.putNextEntry(new JarEntry("GCanvas.class"));
                sbuf = new StringBuffer();
                sbuf.append(readTextFromJar("GCanvas.txt"));
                out.write(sbuf.toString().getBytes("UTF-8"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this, ex.toString(), "BUG!", JOptionPane.INFORMATION_MESSAGE);
                ex.printStackTrace();
            }Thanks,
    -Gandolf

    So I'm guessing that none of you guys have the knowledge on how to compile a java application within a java application. I was thinking that it had something to do with javac... but I'm unsure.
    If no one can answer the question, could someone point me to an expert who would know?
    -Gandolf

  • XI: How To Use JAVA generic Class to  perform SAP data Lookup........

    Hello All,
    I want to create a generic class which is used to perorm SAP data lookup.
    I don't want to use Jco or RFC channel..
    Is there any other way to do this?
    waiting for Reply 
    thank in advance.
    - AKSHAY.

    Hi,
    use RFC channel
    you can wrap it up like this:
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    why do you want to create something diffucult to maintin and non standard if
    you can use the RFC API ?
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • How to call Java WebDynpro iViews from Portal (Portal Content Directory)

    Hello everybody,
    I am trying to call a Java WebDynpro iView, which was created within the Enterprise Portal and is stored in the portal content directory (pcd).
    I have created an HTML-iView in VC, where I have put in the pcd-link into the default-url field (pcd:portal_content/com.sap.pct/every_user/com.sap.pct.cprxrpm.ppmdc/com.sap.pct.cprxrpm.iviews/com.sap.pct.cprxrpm.iviews_cprojects/com.sap.pct.cprxrpm.cpr_projects). This iView is calling the cProjects WebDynpro Application. But after I run my model, the portal page is running and running, but nothing happens.
    I did the same with transactional iView, which was also created in the Portal before. I have also created an HTML-iView in VC, where I have put in the pcd-link into the default-url field (pcd:portal_content/IBU_content/SAP_for_Service_Provider/com.sap.pct.issp.ps.professional_services/com.sap.pct.issp.prs.iviews/com.sap.pct.issp.prs.display_sd). This is working fine!
    What I also tried is to call another VC-Model with an HTML-iView. Here I have put-in into the default-url field the pcd-location of my VC-model (pcd:portal_content/IBU_content/SAP_for_Service_Provider/com.sap.pct.issp.vcmodels/com.myComp.myProduct.1DM9.CreateEngagement/com.myComp.myProduct.iviews/com.myComp.myProduct.1G62.Cprojects_neu). This is also running fine!
    Now I do not understand the difference between this three objects. There are all iViews within the portal but the WebDynpro iView is not callable through a HTML-iView in VC.
    Could you help me in this case? Your help is very appreciated!
    Thank you in advance.
    Best regards,
    Aylin.

    Hi Marcel,
    when you mean the preview within the portal, yes, it is working fine.
    URL is not the way to solve my problem. I am working with IDES-Systems. This is our Demo System within SAP. I have to build my VC-Model in a Master IDES-System which will be transported than into the other IDES-Systems. The URL of the WD is not the same in the other systems. It is changing depending on the several Sysems. But the pcd-location is in all systems the same. Therefore I have to specify the pcd-location of the application.
    Is there a restriction with WD within VC?
    If we can do some kind of a netmeeting, I can show you my problem exactly.
    Thank you.
    Regards,
    Aylin.

  • Forums - How to use java.lang.Class.getMethod() and java.lang.reflect.Metho

    I have similar question. I am trying to invoke a method with no parameters. I don't know how to do that. Can someone please help.
    for example.
    I have 2 methods.
    public void setMethod(String strPut){
    this.strPut = strPut;
    public String getMethod(){
    return strPut;
    Method method = objRef.class.getMethod("setMethod", new Class[]{String.class});
    Object objReturn = method.invoke(sqlWhere, new Object[] {"any String"});
    I can invoke setMethod but I don't know how to invoke getMethod().

    Hi
    Try using something like this...
    CustomClass objCustomClass = new CustomClass ();
    Class customClass = objCustomClass.getClass ();
    Method m = customClass.getMethod ("getMethodName", (Class[])null);
    String strContent = (String) m.invoke (objCustomClass, null);
    Thanks and regards,
    Pazhanikanthan. P

  • How to create Java extension classes in NWDI

    Hi !
    I am trying to follow some 'How-to' guides to create a bespoke Java Action.
    I have -
    created a new project under sap.com_SAP-SHRWEB_1 - crm/home/shr/ext
    imported the bespoke Java action into folder src/packages in sap.com_SAP_SHRWEB_1
    However, when I try to build, I get the following error -
    DC Model check:
       All used DCs are available locally
       ERROR: Check for used DCs failed: Cannot build because used component is broken: sap.com/crm/isa/web/b2c( sap.com_SAP-SHRWEB_1).
       Build failed with errors.
    Could someone help me out please ?
    Regards,
    Ashok.
    Edited by: Ashok on Oct 27, 2009 3:54 PM
    Hi !
    After having read the thread - Build Error - I've added the crm/home/shr/ext (assembly) under Used DC . But now I am getting the following error - ERROR: crm/home/shr/ext: Build failed for sap.com/crm/home/shr/ext(sap.com_SAP-SHRWEB_1) in variant "default": Illegal component usage: compartment "sap.com_SAP-SHRWEB_1" does not use compartment "sap.com_SAP-JEE_1" of used DC "sap.com/com.sap.tc.Logging"
    Can anyone help ?
    Best regards,
    Ashok.

    Hi Sathish,
    Thanks for your reply. On detailed analyses, we found that some objects were incorrect in the SLD. They have since been corrected and the DC synced again.
    To analyse everything, we have decided to take small steps rather than large leaps. We have now added some small bit of Java code but the build is erroring due to not being able to find com.sap.isa.backend.r3.* jar file. Where can I find this .jar file ? We are using ERP E-Commerce.
    Best regards,
    Ashok.
    Edited by: Ashok on Oct 28, 2009 5:53 PM
    Hi !
    I found the _com.sap.isa.backend.r3.*  file in sap.comcrmisaisacorer3assembly. However, even after adding that jar file onto the Java buildpath of 'crmhomeshrextsap.com', build is failing complaining about the same .jar file. The .jar file doesn't see to be added onto the buildpath during the actual build. Am I missing anything ?
    Regards,
    Ashok.

Maybe you are looking for

  • Retry logic for TCPIP eway, when backend system is down

    I am a newbie in JCAPS. My requirement is to read a text file and then send it contents through a socket connection to backend system. The stream retrieved back from backend system (via socket connection) is to be stored in Oracle DB. My Approach: I

  • R3trans finsihed with error code 12 when starting SAP

    Dear Experts, Please note that the listener is up & running but still getting the error. Please find the logs below: cat trans.log 4 ETW000 R3trans version 6.19 (release 720 - 24.08.10 - 14:38:42). 4 ETW000 unicode enabled version 4 ETW000 ==========

  • Font information changed, may effect document?

    When I used Print Setup to print the Book for my Structured Document, after selecting the "PDF Printer" I get a message saying "The font information for your computer has changed. This change may effect the format and output of your document".  How c

  • RADIUS and CHECKPOINT and NORTEL

    I have installed the NMAS modules from Border Manager 3.8 onto a Netware 6 SP3 box. I installed per TID 10078616 and can authenicate from my W2K workstation fine. I am now trying to authenicate from a Nortel switch and a VPN from a checkpoint firewal

  • CSS copying question.

    Rightio, I'm fairly new to the coding/css game but I'm learning quite fast and recently I got hold of a template to mess around with. It came with a main page and two subpages, I opened the subpage and then created a new page in order to try somethin