BAPI not working in Java Webdynpro

Hi,
My BAPI from SAP is working in Netweaver perfectly, but when I call the same with the equal parameters in Java webdynpro, no results.
I'm using following function: 'CVAPI_DOC_VIEW'.
Any idea why the BAPI is not working in Java Webdynpro?
Regards,
Tim

Hi Tim,
AFAIK 'CVAPI_DOC_VIEW'  will work only in standard SAP Dynpro. Inside Webdynpro it is forbidden to save files in the background and using GUI class with execute, so you cannot use that Standard FM.
Check this thread .
Thanks
Katrice

Similar Messages

  • Applets not working with Java 1.7.0_51 in MII 14.0 SP4 Patch 5

    Hi,
    I'm currently evaluating the migration of our MII 12.0 developments to MII 14.
    But I'm running in several issues just trying to use simple things like a SQL query template with an iGrid Display template in test mode.
    Used versions are: MII 14.0 SP4 Patch 5 and on client side the latest Mozilla Firefox with Java 1.7.0_51
    At first I always get a java security warning when the applet is being loaded about unsigned applications.
    At second the applet itself is not running. It always shows "No data available" and the java console shows the following errors (iResult is the id of the applet):
    iResult [ERROR] - Couldn't set query template: No Query Defined
    iResult [ERROR] - Couldn't set display template: null
    iResult [ERROR] - Couldn't set display template: null
    Is this perhaps a general problem, that the MII applets are not working with Java 1.7.x versions?
    If I call the same MII page from a client with Java 1.6.x it is working without errors.
    Do you have some suggestions for me?
    Regards Timo

    please clear your JAVA Cache. that should solve the JRE issue. thanks

  • ADS configuration error - PDF form not displaying for Java WebDynpro

    Hi Experts,
    Sub : Problem with configuring Adobe Document Services
    We have installed .. NW2004s SP12 on HP-UX OS.
    As of now all the services are working fine, recently started configuring "Adobe Document Services", followed all the instructions given in the guide.
    Environment :
    =============
    - Configuring ADS Webservice for "BASIC" Authentication, not for SSL
    - Poratl (AS JAVA) and BI (AS ABAP) are running in different systems.
    - Portal using UME as the data storage.
    - OS is HP-UX
    Configuration Check for Interactive Forms in Web Dynpro for Java
    =================================================================
    1. Checking the User and Password ---
    http://<server>:<port>/AdobeDocumentServices/Config -- the system displays the version number of the Adobe document services in the response area.
    2. Configured Webservice for Basic Authentication -- success
    In the process of testing this configuration -- i've developed a Java Webdynpro interactive form and deployed into my DEV server (NW2004s Sp12).
    Unfortunately, form is displaying in my sneak preview version (Nw2004s SP9), getting error when deployed into Dev server - NW2004s SP12 on HP-UX.
    We haven't installed ADS separately, making use of ADS comes with the default installation.
    Error :
    =======
    java.net.SocketTimeoutException: Reatimed out
    com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to  UPDATEDATAINPDF
    I found that the following directory is empty in DEV server ... /usr/sap/EPL/JC03/j2ee/os_libs/adssap/XMLFormService, but not in sneak preview version.
    Please do let me know to solve the problem.
    Thanks

    Thanks for quick response.
    Installed Reader in my PC, i can view the deployed interactive form thru sneak preview, but getting the following error when running the same application thru my development server.
    java.net.SocketTimeoutException: Reatimed out
    com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to  UPDATEDATAINPDF
    I've installed Adobe Reader in the client PC not is the server system.
    Thanks
    Message was edited by:
            Mohan krishna Mallepaddi

  • Why windows command prompt is not working with java

    I installed java 1.6 to my computer (Laptop) and it is perfectly working with Netbeans and Eclipse
    but not working with windows xp xommand prompt
    It compiles the code but when it is going to run it throw the following exception
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Example (Unsupported major.minor version 50.0)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)I've reinstalled java 1.6, but the output is same
    Please help me to get it correct
    Thank you

    E:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracl
    e\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Progr
    am Files\Microsoft SQL Server\90\Tools\binn\;C:\OrCAD\OrCAD_10.0\tools\pcb\bin;C
    :\OrCAD\OrCAD_10.0\tools\specctra\bin;C:\OrCAD\OrCAD_10.0\tools\bin;C:\OrCAD\OrC
    AD_10.0\tools\PSpice\Library;C:\OrCAD\OrCAD_10.0\tools\fet\bin;C:\OrCAD\OrCAD_10
    .0\tools\jre\bin;C:\OrCAD\OrCAD_10.0\tools\Capture;C:\Program Files\QuickTime\QT
    System\;C:\Program Files\Java\jdk1.6.0_01\bin;C:\Program Files\Microsoft Visual
    Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev9
    8\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Mic
    rosoft Visual Studio\VC98\bin;

  • Dynamic configuration not working in Java mapping

    Hi All,
    I have a scenario where i  am using java mapping. In this i am doing following
    1)Read file name from input message header
    2)set file name in output message Header
    3) set Directory name in output message Header
    i  have used following code .. but iit is not working... when i test end  to end...  in reciver communication channel it is failing stating " message failed as "Directory is not set in Header. Also i checked in SXMB_MONI  "dynamic configuration".It is not showing Directory.
    this is code.
    public void transform(TransformationInput transformationInput,TransformationOutput transformationOutput)
                   throws StreamTransformationException {
                   private Map para;
                   String Directory ;
                   String  inputFileName;
                   String var1 = "ABC";
                   para = transformationInput.getInputHeader().getAll();
                   DynamicConfiguration conf = (DynamicConfiguration) para
                             .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
                         inputFileName = conf.get(keyFileName1);
                   DynamicConfigurationKey keyFilename = DynamicConfigurationKey
                             .create("http://sap.com/xi/XI/System/File", "FileName");
                   DynamicConfigurationKey keyDirecory = DynamicConfigurationKey
                             .create("http://sap.com/xi/XI/System/File", "Directory");
                   Directory = "tmp/"+var1;
                   conf.put(keyFilename,inputFileName);
                   conf.put(keyDirecory, Directory);
    I am in PI 7.1 ,   and in eclipse its showing warning that Para is not used.
    Can anyone show some lights.
    Also is there any way to debug this?? like is there any function by which i can write the trace for each step to see those in MONI.

    Method name:   public void createDirectory(Resultlist result, Container container)throws StreamTransformationException
    //Use Simple UDF and do the following lines
    String Directory ;
    String  inputFileName;
    String var1 = "ABC";
    DynamicConfiguration conf = container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
      DynamicConfigurationKey keyFileName1 = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
      inputFileName = conf.get(keyFileName1);
    DynamicConfigurationKey keyFilename = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey keyDirecory = DynamicConfigurationKey
                   .create("http://sap.com/xi/XI/System/File", "Directory");
    Directory = "tmp/"+var1;
    conf.put(keyFilename,inputFileName);
    conf.put(keyDirecory, Directory);
    and remove these 3 lines
    //private Map para;
    //para = transformationInput.getInputHeader().getAll();
    //DynamicConfiguration conf = (DynamicConfiguration) para.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION
    >>I am in PI 7.1 , and in eclipse its showing warning that Para is not used.Can anyone show some lights.
    You can simply remove declaring Map Para line... The eclipse gives warning because you dont assign values for it and you are trying to use...
    For using the same input file name in output side, you dont need coding ... you need only for the directory...
    Enable ASMA attributes in the channel.
    Edited by: Baskar Gopal on Feb 24, 2011 10:58 AM

  • {@inheritDoc} not working for Java Classes

    Hello,
    i am using {@inheritDoc} for inherting super class's JavaDoc for a perticular function..
    It is working, if super class is my own class. i am able to see all JavaDoc in child class.
    But when i use {@inheritDoc} for extending JavaDoc of java class it is not working.
    i.e. if i am writing {@inheritDoc} in public void actionPerformed(ActionEvent e) method..
    It wont show any javadoc..
    How to add it? Do i need to give source of java classes too???
    And if it is Yes, then where to specifiy. and where to find source of Java classes, do they come with JDK? or NetBeans?? (If yes then where it is in JDK or Netbeans???)
    Thanks,
    Nachiket.

    Yes, you need to have the Java source, with the -sourcepath option, as described here:
    Inheriting Comments from J2SE - Your code can also automatically inherit comments from interfaces and classes in the J2SE. You can do this by unzipping the src.zip file that ships with the SDK (it does not contain all source files, however), and add its path to -sourcepath. When javadoc runs on your code, it will load the doc comments from those source files as needed. For example, if a class in your code implements java.lang.Comparable, the compareTo(Object) method you implement will inherit the doc comment from java.lang.Comparable.
    http://java.sun.com/j2se/javadoc/faq/#incrementalbuild
    If you want the full Java source get it from here:
    http://www.sun.com/software/communitysource/j2se/java2/index.xml
    http://java.sun.com/j2se/javadoc/faq/#sourcecode
    -Doug

  • Reposting ! string concatanation not working in java

    hi I am using the following code to construct a string and i see that it seems that the correct string is made but the application does not run
    if i just cut n paste the same string into command prompt it works fine . please advise :
    also note iam costructing string in two way , but using stringbuffer and by using , but both ways dont work.
    If the parameter is just one word for example say "Testing" then the shell command works fine which tells me that the string concatanation is not working or embedding some special chars?
    public static void main(String args[]) {
    String s = null;
    // system command to run
    String quotes="\"";
    String parameter = quotes args[0] quotes;
    String cmd = "awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s " parameter;
    System.out.println(cmd);
    File workDir = new File("/opt/CA/SharedComponents/ccs/atech/services/bin");
    StringBuffer sb = new StringBuffer();
    sb.append("awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s ");
    sb.append("\"");
    sb.append(args[0]);
    sb.append("\"");
    String str2 = sb.toString();
    System.out.println(str2);
    try {
    Process p = Runtime.getRuntime().exec(cmd, null, workDir);
    ========================================== below is the run log ============================================
    awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s "testing 2"
    awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s "testing 2"
    usage: /opt/CA/SharedComponents/ccs/atech/services/bin/awtrap [-v 1 | 2c | 3] [-i] [-r retries] [-f from_addr | from_host]
    [-h dest_addr | dest_host] [-p port] [-t timeout ] [-d logLevel]
    [-c community] enterprise type [subtype] [oid oidtype value]
    ================================= now if I just cut n paste the string on command prompt it runs fine =====================
    Pt$ awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2 6 4 1.3.6.1.4.1.791.2.9.2 -s "testing 2"
    Pt$

    I am putting the code in code tags and in preview it shows up perfect, can you see it now ?
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.InputStream;
    public class RunSystemCommand {
    public static void main(String args[]) {
    String s = null;
    // system command to run
    String quotes="\"";
    String parameter = quotes + args[0] + quotes;
    String cmd = "awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2  6 4 1.3.6.1.4.1.791.2.9.2 -s " + parameter;
    System.out.println(cmd);
    File workDir = new File("/opt/CA/SharedComponents/ccs/atech/services/bin");
    StringBuffer sb = new StringBuffer();
    sb.append("awtrap -f 10.200.16.17 -h 10.100.10.112 -p 162 -c fdot 1.3.6.1.4.1.791.2.9.2  6 4 1.3.6.1.4.1.791.2.9.2 -s ");
    sb.append("\"");
    sb.append(args[0]);
    sb.append("\"");
    String str2 = sb.toString();
    System.out.println(str2);
    try {
    Process p = Runtime.getRuntime().exec(cmd, null, workDir);
    int i = p.waitFor();
    if (i == 0){
    BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
    // read the output from the command
    while ((s = stdInput.readLine()) != null) {
    System.out.println(s);
    else {
    BufferedReader stdErr = new BufferedReader(new InputStreamReader(p.getErrorStream()));
    // read the output from the command
    while ((s = stdErr.readLine()) != null) {
    System.out.println(s);
    catch (Exception e) {
    System.out.println(e);
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Stopsap is not working in Java ystem

    Hi All,
    We have a Java system connected to XI. stopsap command is not working when I try to shutdown the java system. I have to kill all the processes to stop the Java. The error that I am getting is the following. I used <SID>adm user to stop the Java system. We need to fix this. Please help ASAP.
    stopping the SAP instance J00
    Shutdown-Log is written to /home/JP2adm/stopsap_J00.log
    /usr/sap/JP2/J00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Stop
    stop of Instance failed
    See /home/JP2adm/stopsap_J00.log for details
    Trace of system startup/check of SAP System JP2 on Mon Feb  7 16:54:02 CST 2011
    Called command: /usr/sap/JP2/SYS/exe/uc/rs6000_64/stopsap stop
    stopping the SAP instance J00
    /usr/sap/JP2/J00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Stop
    07.02.2011 16:54:03
    Stop
    FAIL: HTTP error, HTTP/1.1 401 Unauthorized
    stop of Instance failed
    Thanks,
    Kavitha.
    Edited by: Kavitha Rajan on Feb 9, 2011 5:26 PM

    Thank you Sarbjeet. Your answer is very helpful.
    Thanks again,
    Kavitha Rajan.

  • J2EE_ADMIN not working in Java Side

    Hi All,
    The J2ee_admin Id is not working on the Java side, but is working on the ABAP Side. I changed the password of SAPJSF, is it bcoz of that? If yes, pls suggest what can be done.
    Regards,
    Divya

    Hi Divya,
    You can Activate the Emergency User (find the directions at http://help.sap.com/saphelp_nw04/helpdata/en/3a/4a0640d7b28f5ce10000000a155106/content.htm ).
    The you can login using the SAP* account. After which you can go in to the User Administrator and update the j2ee_admin account password. Then logout, disable the Emerengy User (SAP*), and login using the j2ee_admin account.
    hope this would resolve your issue. If still it persists, do revert.
    Regards,
    P. Kumaravel.
    Ps: Award points for heelpful answers.

  • SDM still not working with Java v6u15

    I keep waiting for Java to work some day with their updates on Cisco SDM. Update 14 at least allowed SDM to open. But the new update 15 still hasn't passed the test of clicking on the Configure button and then the Additional Task button. It just doesn't do anything. If it is something that Cisco can fix, please be aware.
    Thanks,
    .. Jim ..

    Hi Jim, you need to downgrade the JAVA version on the computer you want to use SDM.
    SDM does not support java after: 6u3.
    Cisco SDM requires Sun Java Runtime Environment (JRE). The following versions are supported:
    •JRE 1.5_09
    •JRE1.4.2_08
    •JRE 1.5.0_06
    •JRE 1.5.0_07
    •JRE 1.6.0_02
    •JRE 1.6.0_03
    As per the release notes.
    http://www.cisco.com/en/US/docs/routers/access/cisco_router_and_security_device_manager/software/release/notes/SDMr25.html
    This will resolve your issue.
    Cisco does not plan to fix this as SDM is end of life.
    The product that replaces SDM is CCP: Cisco Configuration Professional, that one works with JAva 6 update 14, but it's a different product. It's also a freeware you can download from our website.

  • Mapping editor not working with Java 5 classes

    I have a small protoype web service which I wrote using Tomcat/Axis/Spring/Hibernate and using EJB3 annotations for the mappings. I want to port the persistence layer to Toplink.
    I installed Toplink 9.0.4.1 and added the toplink libraries to my project and implemented the DAO and the spring bean defs.
    I opened the mapping editor and created a project. When I try to add classes to it for mapping I get an error that it can't find the classes (even though I selected them from the chooser). I figured it might be that they were compiled with Java 5, so I switched the JRE_HOME in setenv.cmd to my Java 5 JRE. Now I can import the classes and see the attributes but when I click on any of them in the Navigator panel, the editor panel remains blank. If I now try to save, I get:
    java.lang.NullPointerException
         at oracle.toplink.workbench.ui.tools.CheckListModel.getRowCount(CheckListModel.java:119)
         at javax.swing.JTable.checkLeadAnchor(JTable.java:2949)
         at javax.swing.JTable.tableChanged(JTable.java:2993)
         at javax.swing.JTable.setModel(JTable.java:2827)
         at oracle.toplink.workbench.ui.tools.CheckList.initialize(CheckList.java:47)
         at oracle.toplink.workbench.ui.tools.CheckList.<init>(CheckList.java:26)
    It seems that the mapping workbench doesnt work with Java 5. What should I do?

    Ah, I see. I saw another post here stating that must use 10.1.3.

  • WebStart Application is not working in Java 7 u45

    My Eclipse RCP application ( launched with WebStart (.jnlp)) crashes on startup while launching with Java 7 u45.
    I've added to the manifest:
    Permissions: all-permissions
    Codebase: *
    Trusted-Library: true
    This removed all of the warning messages from the Control Panel. But I still have a loading issue. I see following messages (Missing Application-Library-Allowable-Codebase) in java console while  downloading many jarfs/plugins
    security: JAVAWS AppPolicy Permission requested for: http://vspdlpd05.atldev.com/PDTeller-v73allyusdev2ix/app/plugins/j2ee_1.6.0.jar
    ruleset: finding Deployment Rule Set for
            title: Profile Direct Teller Wrappering Feature
            location: http://vspdlpd05.atldev.com/PDTeller-v73allyusdev2ix/app/features/com.fnis.ally.teller.wrapper_2.0.0.jnlp
            jar location: http://vspdlpd05.atldev.com/PDTeller-v73allyusdev2ix/app/plugins/j2ee_1.6.0.jar
            jar version: null
            isArtifact: true
    ruleset: no rule applies, returning Default Rule
    network: Created version ID: 1.7.0.51
    network: Created version ID: 1.5+
    network: Created version ID: 0+
    security: Missing Application-Library-Allowable-Codebase manifest attribute for: http://vspdlpd05.atldev.com/PDTeller-v73allyusdev2ix/app/plugins/j2ee_1.6.0.jar
    where as the same changes (modified all the manifest files with above attributes) done in to a different repository seems to be working fine with java 7 u45.
    Any help would be appreciated.
    Thanks
    Sai

    Thanks Santhosh.
    I am going through the First help link, I have already set the Property(Standard mode - while Launching Portal in new window) from Portal iview, and "Handover Portal stylesheet" to 'NO'
    I hv already gone the remaining Forum threads and Notes as well, but i did not get exact any other help to fix this issue.
    I am getting different Error now - Unable to get property 'addDelegate' of undefined or null reference
    Pls. let me know if you can help me.
    Thanks
    Sathya

  • Why is creation of a service notification using BAPI not working?

    I need to create a service notification.
    I have found 2 BAPIs.
    BAPI_SERVICENOTIFICAT_CREATE
    BAPI_SERVNOT_CREATE
    The code below using the second BAPI is not creating a notification and the return parm does not have any errors.
    You can see it does a call to commit after the BAPI call
    Perhaps I am missing something critical in the parms.
    We are trying to creat a service type notification using equipment.
    DATA ls_notif_h TYPE bapi2080_nothdri.
    data ls_notif_e type BAPI2080_NOTHDRE.
    DATA lt_return  TYPE STANDARD TABLE OF bapiret2.
    DATA ls_return  LIKE LINE OF lt_return.
    ls_notif_h-equipment = '10000044'.
    CALL FUNCTION 'BAPI_SERVNOT_CREATE'
      EXPORTING
      EXTERNAL_NUMBER          =
        notif_type               = 'S3'
        notifheader              = ls_notif_h
      TASK_DETERMINATION       = ' '
      SENDER                   =
      ORDERID                  =
    IMPORTING
        NOTIFHEADER_EXPORT       = ls_notif_e
    TABLES
      NOTITEM                  =
      NOTIFCAUS                =
      NOTIFACTV                =
      NOTIFTASK                =
      NOTIFPARTNR              =
      LONGTEXTS                =
      KEY_RELATIONSHIPS        =
        return                   = lt_return
    IF lt_return IS INITIAL.
      COMMIT WORK AND WAIT.
      write: / ls_notif_e-NOTIF_NO.
    ELSE.
      LOOP AT lt_return INTO   ls_return.
        WRITE:/ 'errors'.
       ls_return.
      ENDLOOP.
    Thanks.
    Scott

    Try this way
    CALL FUNCTION 'BAPI_SERVNOT_CREATE'
    EXPORTING
    * EXTERNAL_NUMBER =
    notif_type = 'S3'
    notifheader = ls_notif_h
    * TASK_DETERMINATION = ' '
    * SENDER =
    * ORDERID =
    IMPORTING
    NOTIFHEADER_EXPORT = ls_notif_e
    TABLES
    * NOTITEM =
    * NOTIFCAUS =
    * NOTIFACTV =
    * NOTIFTASK =
    * NOTIFPARTNR =
    * LONGTEXTS =
    * KEY_RELATIONSHIPS =
    return = lt_return
    * IF lt_return IS INITIAL.                                               " <<< Comment this lie
    read table  lt_return into ls_return with key type = 'E'. " << Change
    if sy-subrc ne 0.                                                             " << Change
    COMMIT WORK AND WAIT.
    write: / ls_notif_e-NOTIF_NO.
    ELSE.
    LOOP AT lt_return INTO ls_return.
    WRITE:/ 'errors'.
    * ls_return.
    ENDLOOP.
    endif.

  • Xerces for XSD 1.1 Validation not working in Java Mapping

    Hi Experts,
    We are trying to use XSD 1.1 (assertion feature) validation for the XML payload in a Java mapping program. But I am getting the following exception:
    java.lang.IllegalArgumentException: http://www.w3.org/XML/XMLSchema/v1.1 at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:186)
    This is happing for the statement:
    SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/XML/XMLSchema/v1.1");
    The reason (apparently) is because it is not able to instantiate the class org.apache.xerces.jaxp.validation.XMLSchema11Factory , which is the Xerces implementation of the SchemaFactory class.
    I have tried following things so far -
    1. If I try to validate an xml against an xsd 1.1 schema in a standalone program, it works perfectly fine.
    2. If I try to deploy this whole functionality on to the server through an EAR (like an adapter module), there again it works.
    3. Also tried this before instantiating the SchemaFactory -
    System.setProperty("javax.xml.validation.SchemaFactory:http://www.w3.org/XML/XMLSchema/v1.1","org.apache.xerces.jaxp.validation.XMLSchema11Factory");
    4. I tried by creating the Imported Archive objects for all the Xerces jars that we require for validation, within the same SWCV, namespace. But still I get the same exception as above (IllegalArgumentException)
    5. The link [http://help.sap.com/saphelp_nw70/helpdata/en/b6/8097f5a5edea4f8dfc87ac87082b22/content.htm ] mentions that we need to place all the necessary jars at location <SAP_J2EE_Engine_install_dir>/cluster/server/bin/ext /. But even after placing the jars there, I get the same exception.
    I am not sure how we need to handle this. Has anybody faced a similar situation? Any suggestions?
    Regards,
    Sudheer

    Hi Stefan,
    Thanks for the reply.
    We are on PI 7.1 SP 06. The standard XML tools from jdk supports only XSD 1.0, as far as I know. And XSD 1.0 does not have the Assert feature (also known as, co-occurrence constraint). More details are provided here - [http://www.ibm.com/developerworks/library/x-xml11pt2/]
    To use XSD 1.1, we need a different implementation like Xerces-J. I am not sure how we can use it without external jars. I would like to mention again that I could achieve this by using an adapter module (EAR containing the jars), but I need to do this in Java Mapping (imported archive).
    Do you know how we can achieve this in any other way? Any other suggestions welcome.
    Thanks & Regards,
    Sudheer

  • Delete and renameto not working in java

    guys, i have written a java program that reads file1 into temp file and finally writes into another file. program is working fine with no errors, it even reported that the file is deleted. But actually the file was not deleted and renameto was never successful. could you guys see any problem with file definetion so that delete is not successful. please see code from 6th line from bottm.
    public class Mergewrs {public static void main (String[] args) throws IOException {
    /* Creates a new instance of mergewrsFile */
         /* Making sure an argument is specified */
         if(args.length > 0)
              String line           = null;
              String policyflag      = null;
              int addCnt          = 0;
              File mergein = new File("c:\\javat\\mergein.dat");
              /* Specifiying input file to be used */
              BufferedReader  inFile  = new BufferedReader(new FileReader(mergein));
              line = inFile.readLine();
              /* Read all lines in the wrsfile specified */
              while(line != null)
                   System.out.println("Process1: ");
                   policyflag      = line.substring(0,1);
                   // Reads input record from 2 thru 1025
                   String actionIndicator = new String();
                   if(policyflag != null && policyflag.equalsIgnoreCase("A"))
                        { actionIndicator = "A";
                          addCnt = addCnt+1;
                          process(actionIndicator, line);
                   catch(IOException e)
                        {System.err.println("File input error");}
                   line = inFile.readLine();
              } //while ends
         } //if ends
    public static void process(String actionIndicator, String line) throws IOException
         String line1 = null;
         String templine = null;
         String policyId = null;
         File policyOutfile = new File("c:\\javat\\mergeout.dat");
         File policyOutfileold = new File("c:\\javat\\mergeoutold.dat");
         BufferedReader  policyOut  = new BufferedReader(new FileReader(policyOutfile));
         File tempfile = new File("c:\\javat\\tempfile.dat");
         BufferedWriter tempout = new BufferedWriter(new FileWriter(tempfile));
         line1 = policyOut.readLine();
         try{
              policyId =line1.substring(150,165);
              while(line1 != null)
              {     policyId =line1.substring(150,165);
                   try
                        if(policyId.equals(line.substring(151,166)))
                             { templine =line1.substring(0,151);
                        else { templine=line1;}
                        tempout.write(templine);
                        tempout.newLine();
                        line1 = policyOut.readLine();
                   catch (Exception e) {System.err.println("File exception h");}
              } //while ends
              try { tempout.close(); }
              catch (Exception e) { e.printStackTrace();}
              try { policyOut.close(); }
              catch (Exception e) { e.printStackTrace();}
              try
                   if(policyOutfile.exists())
                        policyOutfile.delete();
                        tempfile.renameTo(policyOutfile);
              catch (Exception e) {System.out.println("error"); }
    }

    guys, i have written a java program that reads file1
    into temp file and finally writes into another file.
    program is working fine with no errors, it even
    reported that the file is deleted. But actually the
    file was not deleted and renameto was never
    successful. could you guys see any problem with file
    definetion so that delete is not successful. please
    see code from 6th line from bottm.Since you don't actually do anything with the return value how do you know it was successful?

Maybe you are looking for

  • Feature request: make the "transform" dialogs non-modal

    Currently, the transformation dialogs accessible at Object>Transform are modal. I'm talking about "Move-", "Rotate-", "Reflect-", and so forth. These dialogs, when open, lock the user out of any interaction with the artboard other than the "preview"

  • Font size won´t stay the same size after I save the form

    Hello! I need to set up a form with fonts sized 15.5, 9.5 and 7.5px. Acrobat allows those sizes but once I save the file the form I´m filling has sizes 16, 10 and 8. Is there any way to solve this issue?

  • For a SX50HS is there a way to take a series of time delayed pictures ? Automatic pic every 3 min

    HI, I am looking for a way where I put the SX50HS on a tripod and now want her to automatically make a picture every 3 minutes for an hour. Is there a way to achieve this ?  Have not found a hint in the manual. Would be great if that could work ! tha

  • Issue with Fireworks CS3

    I'm experiencing an annoying issue with Fireworks CS3. Immediate use of the application is not available after its opened. Meaning, clicking on the application menu more than once returns a message in the title bar, "Adobe Fireworks CS3 (Not Respondi

  • Multi-user is disabled!

    Hi, I did something foolish by locking myself out of the system. Currently, I am only able to login as a single-user. Whenever I start the system, I am not able to login utilizing any of the user id's. I have tried serveral things including resetting