Issue with java mapping in a multi-mapping scenario

Hi
    We have  a 1:n multiple mapping scenario in XI and the source is R3 proxy and target side is files. So, creating multiple file from a single message from R3 .
R3 --> XI --> Multiple files
Structure of the output of the multi-mapping is
- <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
- <ns0:Message1>
<Transaction>
</Transaction>
<Transaction>
</Transaction></ns0:Message1>
</ns0:Messages>
wherein each Transaction node represents a file.
Now, we need to introduce a constant /string like
<!DOCTYPE Transaction PUBLIC \"-//XXXXXX//DTD BatchReceiptAuthorization//EN\" \"http://dtd.XXXXXXX.com/dtds/ReceiptAuthorization.dtd\">
on each of the files at the very beginning - i.e within each transaction node , in the above structure, we need the above DTD string to be written.  To do this, we added a java mapping as the second mapping after the message mapping that creates this string. Is this the right approach and would it produce what we are expecting ?
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.Map;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import com.sap.aii.mapping.api.StreamTransformationConstants;
import com.sap.aii.mapping.api.DynamicConfiguration;
import com.sap.aii.mapping.api.AbstractTrace;
public class ModifyRootAndDelay implements StreamTransformation {
     AbstractTrace myTrace;
public void execute(InputStream input, OutputStream output) throws StreamTransformationException {
          try{
               BufferedReader reader = new BufferedReader(new InputStreamReader(input));
               String NameSpacePrefix = "<!DOCTYPE Transaction PUBLIC \"-//innotrac//DTD BatchReceiptAuthorization//EN\" \"http://dtd.innotrac.com/dtds/ReceiptAuthorization.dtd\">";
               String sLine = null;
               StringBuffer XmlMsg= new StringBuffer();
               String Result,PayloadBody;
               int indexOfFirst;
               while ((sLine = reader.readLine()) != null) {
                    XmlMsg.append(sLine);
               String StartingTag = XmlMsg.toString();
               indexOfFirst = StartingTag.indexOf("<MerchantID>") ;
               PayloadBody=new String(XmlMsg.substring(indexOfFirst));
               Result=NameSpacePrefix.concat(PayloadBody);
               output.write(Result.getBytes());
          /*     Thread.sleep(200000); */
          }catch(Exception e){
               myTrace.addWarning("Exception raised in the JavaMapping:modifyNamespace.java""\n The Exception Message: " e.getMessage());
               throw new RuntimeException(e.getMessage()) ;
        }     public void setParameter(Map param) {
          myTrace = (AbstractTrace) param
                    .get(StreamTransformationConstants.MAPPING_TRACE);

Hi XI Gurus
                   In my scenario, I sent the inputstream that is being passed to the Java execute method - to trace and I see that the whole of the xml file - as shown below  - which is the output of message mapping ( from the first mapping step ) in sent to the execute method of the java mapping a single call
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<Transaction> </Transaction>
<Transaction> </Transaction>
</ns0:Message1>
<ns0:Messages>
So, I modified Java mapping program to look for multiple occurences of <Transaction> tag and prefix them with my constant DTD Literal - which is the primary reason , why I had to use Java mappings after the message mapping.
Now, I get an error is XI- SXMB_MONI
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
  <SAP:Category>XIServer</SAP:Category>
  <SAP:Code area="MAPPING" />
  <SAP:P1>unexpected symbol; expected '<', '</', entity refe</SAP:P1>
  <SAP:P2>rence, character data, CDATA section, processing i</SAP:P2>
  <SAP:P3>0</SAP:P3>
  <SAP:P4>113</SAP:P4>
  <SAP:AdditionalText />
  <SAP:ApplicationFaultMessage namespace="" />
  <SAP:Stack>The exception occurred (program: CL_XMS_MAIN===================CP, include CL_XMS_MAIN===================CM00A, line: 609)</SAP:Stack>
  <SAP:Retry>M</SAP:Retry>
  </SAP:Error>
Should I create multiple outputs - as many as the numberof target split files ( of type outputstream ) from the execute method in the java program ?

Similar Messages

  • I am  having  issues  with java

    OK well I finally got  the java update to full load and it stated that it was corrupt or something like that and now I can not get into my favorite chat room it says I need to get java ..   when I go to the link to  re get a update to java it says I am updated.. so I called apple and they sent me a patch or something and it did not help .. anyone have any ideas what is happening?
    my old chatroom I think I remember someone talking about java issues there and how you had to have a old java  or something like that ..  can somehelp please!

    golam wrote:
    I am having issues with java encoding in Gentoo Linux environment. I am using java 1.6. When I ran the following test application to print french accent with encoding type, all I get is wrong character. Please provide me with some pointers. When I try this in Windows, it works perfectly. Many Thanks in advance
    //test.txt file contains the following string
    àäèéêëîïôùûüÿ
    ///TEST CODE to find which encoding to use
                              System.out.println("encoding:"+encoding[i]+"line===>"+inputLine);
    This is the problem.
    Don't assume the console character set can display these characters,
    use a swing component.
    This is also why it happens to work in on some boxes and not on others.
    ///////////////OUTPUT after running the test app
    java Test encoding:Big5line===>???????
    encoding:Big5-HKSCSline===>???????
    encoding:EUC-JPline===>???????
    encoding:EUC-KRline===>???????
    encoding:GB18030line===>???????
    encoding:GB2312line===>???????
    encoding:GBKline===>???????

  • Does Safari have issues with Java?

    When I log into my IG Index financial spread betting account safari usually quits unexpectedly immediately after the dealing screen has loaded. This is causing me huge frustration. The site relys a lot on Java. I believe there were issue with Java in Mac OS 10.3.9 that may still exist on 10.4.X
    Any ideas?

    Do you have the latest versions of Java installed?
    Have you enabled Java in Safari's preferences?

  • Issue with IDOC occurence and SeeBurger message mapping

    Hey Guys
    While developing a EDI 850 to IDOC scenario i came across this issue with pre-delivered Seeburger mapping(A_850_V4010_to_I_ORDERS05).
    I actually need to post multiple IDOC's to SAP system in the same message so i changed the IDOC occurence to unbounded and re-imported that as a .XSD file in Integration repository.
    Earlier the pre-delivered message mappings provided by SeeBurger(under SEEBURGER_HIGH-TECH, 1.7.1 of seeburger) was working fine for me since i was posting only 1 IDOC but now the mapping is failing as the IDOC occurence has changed(unbounded).
    Is there a way we can do some settings on SeeBurger server or Bic so that we can use the pre-delivered mapping for Multiple IDOC's as well?
    I just want to make sure before i start off with doing whole of the mapping manually.
    Thanx
    Aamir

    Thanx for the input guys
    @Deepthi.
    Doing whole of mapping manualy is definitely the last option but i m looking for ways to re-use the pre-delivered SeeBurger mapping.
    >>Seeburger Mapping is only just to convert XML to EDI and EDI to XML.
    Bic mapping designer does this,i m dealing with message mapping of XI(convert source to target) not Bic designer right now,and Bic does more than just XML to EDI and vice versa,it handles other industry standards too.
    @Jens
    >>The XI message mappings from Seeburger in the Industry solutions are mapping templates
    Yeah,but the mapping template i have deals with 850 to ORDERS05,when i change IDOC occurence and re-import it back in Integration repository,it doesn't stays as ORDERS05,it has to be changed to user defined message interface(in my case MI_ORDERS05) so i m unable to use 850 to ORDERS05 template.
    @Seshagiri
    >>Open the Seeburger SWCV From the IR--goto External Def---Select the right one and copy it and paste it in notepad.
    Changing the occurence is not an issue,i want to re-use the pre-delivered mapping in Integration repository,which is not working.
    Looks like i need to do it manually
    Thanx
    Aamir

  • Issue with JAVA Mail API

    Hi
    We have a requirement to create a custom e mail. For the same I am trying to use Java Mail API.I am facing an issue with the following code:
    session session1 = session.getInstance(properties, null);
    System gives an error Sourced file: inline evaluation of: ``Properties props = new Properties(); session session1 = session.getInstance(prop . . . '' : Typed variable declaration : Class: session not found in namespace
    Is there some specific API i need to import for session class. Kindly suggest.
    Regards
    Shobha

    Hi Shobha,
    I was also facing the same issue from last couple of weeks and just now i have achieved the working functionality.
    Please find below working code and replace values as per your serveru2019s configuration.
    import com.sap.odp.api.util.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import java.io.File;
    import java.net.*;
    // SUBSTITUTE YOUR EMAIL ADDRESSES HERE!!!
    String to =<email address>;
    String from =<email address>;
    // SUBSTITUTE YOUR ISP'S MAIL SERVER HERE!!!
    String host = <smtp host name>;
    String user = <smtp user name>;
    // Create properties, get Session
    // Properties props = new Properties();
    Properties props = System.getProperties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", host);
    props.put("mail.debug", "false");
    props.put("mail.smtp.auth", "false");
    props.put("mail.user",user);
    props.put("mail.from",from);
    Session d_session = Session.getInstance(props,null);//Authenticator object need to be set
    Message msg = new MimeMessage(d_session);
    msg.setFrom(new InternetAddress(from));
    InternetAddress[] address = {new InternetAddress(to)};
    msg.setRecipients(Message.RecipientType.TO, address);
    msg.setSubject("Test E-Mail through Java");
    msg.setSentDate(new Date());
    msg.setText("This is a test of sending a " +
    "plain text e-mail through Java.\n" +
    "Here is line 2.");
    Transport.send(msg);
    Deepak!!!

  • Issue with java

    hi, since i updated to version 10 of ff i have been getting an issue with a chat site that uses java, not sure if its an issue just with this site, or if its java related since updating to 10, maybe its just good timing with the update.
    anyway the issue i am having is i can use the actual chat site fine, when i go to any of my other tabs though, i.e facebook.. i then cannot click into sections where i can click my mouse and type, say in a chat window on facebook or the url bar, they all freeze, the page is useable apart from not being able to type in any box.
    what i found was if i try to click in a text box on facebook, nothing shows yet if i tab back to the chat site thats using java, what i tried to type on facebook is in the chat box on the java site.
    not sure if i have explained that well enough, i hope i have.
    does anyone know if this is an issue with ff or the chat site using java?
    the site is: http://www.ukchatterbox.co.uk/

    I also have this issue on 5.3. It is very difficult to do even a basic level of profiler analysis. The tool is ok at finding big watermelons (CPU cost or memory allocations), but when you want to drill in and see any more detail, it becomes quite painful. Best case is that I would be able to "swim" through the profile data, moving easily from method-to-method, and see the recorded sample counts in a base (samples in this method itself) and cumulative (samples in this method and all called methods) fashion. The indentation in the tree view can be painful. I would suggest a more simplified view as an option,
    PARENT (callers) methods, full names and cumulative sample counts (percentages would be nice as well)
    SELF (called) method, full name and cumulative sample counts (percentages would be nice as well)
    CHILD (calles) methods, full names and cumulative sample counts (percentages would be nice as well)
    Clicking on any row in the above immediately makes that method become the SELF in the view.
    Also, I should be able to enter the class/method name into some text box above this view and easily get into the data for the method. With the current tool, there is no way to quickly go to the data for a specific known method.

  • Issue with Java applet

    I am having issues with an "inactive plug-in" message in Safari when I want to do something using a Java plug-in.  I searched the communities and sure enough, when I opened Java preferences the box next to "enable applet plug-in and Web Start applications" the box was unchecked so I checked it.   Unfortunately, when I go back into preferences, the box is once again unchecked.  I did find out that I had a Trojan in the user.jar file associated with java but despite taking care of that issue (which for all I know is not related), this issue persists.  All of my software is up to date and from what I gather uninstalling and reinstalling Java is not an option and should not need to be fone.  I'd very much appreciate any input!

    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Back up all data now. Before proceeding, you must be sure you can restore your system to its present state
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    chmod -R -N ~
    The command will take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens. You’re not going to reset the password.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • Cert issue with Java 1.7 vs Java 1.6?

    As part of our Java Update process, I’ve been updating the Java version that our ColdFusion servers (9.0.1 Cumulative Hotfix 4) use from Java 1.6_xx to 1.7_17. Overall, no issues, except… when trying to connect to a couple of internal servers via cfhttp (https).
    I have imported the existing certs, (that we have been using successfully with Java 1.6_xx) into the 1.7_17 keystore, and yet I get an  “I/O Exception: peer not authenticated” error. This in most cases, implies that the certificate is not valid. However, if I point ColdFusion back to Java 1.6_xx , it the cfhttp call works fine.
    My theory is that, for some reason, the certs are not “quite right” and whereas Java 1.6 accepted them, Java 1.7 is more strict in regards to certs.
    Has anyone else experienced this, or have some advice?
    Thanks in advance...

    We had the same issue, albeit with CF10 with Java 1.7. The local_policy and US_export_policy JAR files need replacing. You can get them from Oracle (http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html). Our JARs are installed at C:\ColdFusion10\jre\lib\security - yours will be different, but the \lib\security folder is where they'll reside.  We stopped ColdFusion, backed up the security folder, and then overwrote the files in that folder with the ones from Oracle, and restarted. CFHTTP with https:// then started to work. Is your certificate a 2048 bit variety btw?
    If you can't get it to work try the CFX_HTTP custom tag as a workaround. This worked for us too until we changed the JARs. I'd actually stick with CFX_HTTP if I had the issue again - great custom tag with lots of features and works straight away.

  • Compliation issue with Java 1.5

    Following Compilation warning is seen only with Java 1.5 for the code using JNI -
    /sw/CRFS/solaris2.8-sunpro5.3/THIRDPARTY_SUNSTUDIO9/0_0_3/bin/SUNWspro/prod/bin/stdlibfilt -stderr </tmp/c++filt.27205.1.err
    ld: warning: file /share/prime/JDK/jdk1.5.0_06/jre/lib/sparc/libjvm.so: section .SUNW_dof has invalid type 0x6ffffff4
    rm /tmp/c++filt.27205.1.err
    sgs36a-0032 [share/prime/JDK/jdk1.5.0_06/jre/lib/sparc]#dump -Cv libjvm.so | egrep SUNW_dof
    [8037] 0x535f50 54756 OBJT LOCL 2 15 __SUNW_dof
    Whereas no such warning with Java 1.4.2. Can anyone help me in getting rid of this or any thoughts.

    I've just run into this same issue. Did you find a solution?

  • Issue with create user and issue with Java Development tab

    I have two issues with EP,
    1. When i login with Super Admin user, i am unable to Create any user from User Admin tab. Do i have to change the settings of the Super Admin? or is there any criteria for creating the user?
    2. How to assign any user the Java Development tab. Though i login with a super admin user i am unable to see the Java Development role and when tried to assign the role, there were no searches for that Java....

    Hi Adi,
    by default the super administrater has got all permissions. Thus you should be able to create portal users when using a user assigned to the portal group Administrators.
    In order to help you with your first question we need more information. Please describe the malfunction in detail. Have a look into the log files and post related error messages.
    Regarding your second question: You will find the java development role in PCD
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.pct.pdk/Roles/com.sap.pct.pdk.JavaDeveloper.
    If not, then you haven't installed the PDK business package in your portal.
    Go to service.sap.com, choose downloads and search the package (PDK should do it). Download the package, and deploy on your portal using SDM.
    Best regards,
    Martin

  • I was wondering if you have fixed the compatibility issues with java and flash players in the new patch

    after update 6.0.0 all java scripts and flash players where incompatible and disabled i tried re-down loading new versions and tried to erase Firefox and all ad-dons and reload them and still had issues with them i had to re-download Firefox 5 to continue to use your program and i wanna make sure that in 6.0.2 i will not have to do the same thing.. it is a head ache and inconvenient

    You're welcome.
    The only workarounds to this problem is going back to Safari 4,
    You can revert to 4.0.5, instructions here.
    http://appletoolbox.com/2010/06/downgrade-from-safari-5-0-to-safari-4-0-5/

  • Since recent upgrade, I can't see any of my projects in Shutterfly. Their customer support says it may be issue with Java app and Adobe Flash Player

    see above-- are there known issues with these apps?

    Your Java player (if relevant) is not clearly indicated in your plugins list, and your Flash player is several versions behind. If Apple has an update site, you might check that first. Mozilla's site is here: http://www.mozilla.org/plugincheck/

  • Issues with Java 1.6.0_29 client side

    Has anybody encountered any issues with the applet display after upgrading the client JRE to 1.6.0_29?
    On my station, the console logger says the following
    ConsoleLogger::Creating NEW instance...
    ERROR - Error loading session properties, com.sap.xmii.protocol.ProtocolReaderException: Error reading Header.
    appletReadInputData [ERROR] - Error reading Header.
    appletReadInputData [ERROR] - Error: Error reading Header.
    ERROR - Error loading session properties, com.sap.xmii.protocol.ProtocolReaderException: Error reading Header.
    appletReadCalcData [ERROR] - Error reading Header.
    appletReadCalcData [ERROR] - Error: Error reading Header.
    ERROR - Error loading session properties, com.sap.xmii.protocol.ProtocolReaderException: Error reading Header.
    appletReadConsumable [ERROR] - Error reading Header.
    appletReadConsumable [ERROR] - Error: Error reading Header.
    What would be the required JRE setting to get past these errors in the console and make the three applets above display the required data?
    Many thanks,
    Paul.

    Hi Mike,
    There is no link in your message  but if Oracle will provide a fix, I'll downgrade to 1.6.0_26
    http://www.oracle.com/technetwork/java/javase/downloads/jre-6u26-download-400751.html
    Thanks
    paul.

  • 14.3.1 Issues with JAVA

                       My company has just upgraded to 14.3.1 and there are several issues that are taking place with our systems. The main issue is with JAVA. it appears that 14.3.1 doen't operate with java 1.7.51. Is there a work around for this. Also 14.3.1 was suppose to fix the slow functioning when clicking on CC monitor. this doesn't seem to be fixed. We have a large network of endpoint and do a large volume of calls daily and this is becoming a very big issue. does anyone have the answers that may help. we have tried java 1.6 and 1.7 up to 1.7 . 45

    CSCug37698
    Resolved issue where some Java/browser combinations were sometimes very slow or unable to run Conference Control Center.

  • Clientless SSL RDP Plugin Issues with Java 1.7 update 45

    Hi All,
    It appears the latest Java update (1.7 Update 45) has caused some issues with the Cisco RDP plugin for Clientless SSL VPN.
    When attempting to run the plugin to connect to a host, the following error message is receieved:
    I believe this may be because the plugin is unsigned which on the previous version of Java seemed to cause pop-ups prior to running. This error seems to occur in both IE and Firefox. The OS is Windows 7.
    I can confirm that the previous version of Java (1.7 Update 25) worked OK with this plugin apart from the warning mentioned above.
    Does anybody know of a work around or a fix for this? Does Cisco have to update their plugin for this to work on the latest Java version?
    Regards
    David

    Hi Jouni,
    Thanks for the reply. From the thread you linked:
    The workaround posted in the Cisco  Bug is to uncheck the setting "Keep temporary files on my computer"  which is found in the Java Control Panel under the General Tab /  Temporary Internet Files / Settings ...
    This workaround has worked for me with Jave 7 Update 45 on both PC and Mac.
    I've just tested this and it has resolved the issue for me.
    Thanks!
    David

Maybe you are looking for