Xml payload encoding from utf to iso

Hi Experts,
Could you please let me know how can I encode he xml payload from utf-8 to ISO-8859-1.
its bit urgent any help is appreciated.
Thanks & Regards,
Ranganath.

Hi Ranganath,
Here is the java mapping for PI 7.1 and above which will transform encoding type from utf-8 to ISO-8859-1.
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import com.sap.aii.mapping.api.AbstractTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import com.sap.aii.mapping.api.TransformationInput;
import com.sap.aii.mapping.api.TransformationOutput;
public class addAttributeToTag2 extends AbstractTransformation {
      * @param args
     public void execute(InputStream in, OutputStream out)
               throws StreamTransformationException {
          // TODO Auto-generated method stub
          try
               int c;
               int count=0;
               String s="";
               while(1>0)
                    c=in.read();
                    if(c<0)
                         break;
                    if(count<=2 && (char)c=='?')
                         count++;
                    if(count<=2)
                         s=s+(char)c;
                         if(count==2)
                              s=s.replaceAll("utf-8","ISO-8859-1");
                              s=s.replaceAll("UTF-8","ISO-8859-1");
                              count=3;
                              out.write(s.getBytes());
                         continue;
                    out.write(c);
                    //System.out.print((char)c);
               in.close();
               out.close();
          catch(Exception e)
     public void setParameter(Map arg0) {
          // TODO Auto-generated method stub
     public static void main(String[] args) {
          // TODO Auto-generated method stub
          try{
               addAttributeToTag2 genFormat=new addAttributeToTag2();
               FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\copy.xml");
               FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\copy1.xml");
               genFormat.execute(in,out);
               catch(Exception e)
               e.printStackTrace();
     public void transform(TransformationInput arg0, TransformationOutput arg1)
               throws StreamTransformationException {
          this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
if you are working in PI 7.0 the you need following code
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
public class addAttributeToTag2 implements StreamTransformation {
      * @param args
     public void execute(InputStream in, OutputStream out)
               throws StreamTransformationException {
          // TODO Auto-generated method stub
          try
               int c;
               int count=0;
               String s="";
               while(1>0)
                    c=in.read();
                    if(c<0)
                         break;
                    if(count<=2 && (char)c=='?')
                         count++;
                    if(count<=2)
                         s=s+(char)c;
                         if(count==2)
                              s=s.replaceAll("utf-8","ISO-8859-1");
                              s=s.replaceAll("UTF-8","ISO-8859-1");
                              count=3;
                              out.write(s.getBytes());
                         continue;
                    out.write(c);
                    //System.out.print((char)c);
               in.close();
               out.close();
          catch(Exception e)
     public void setParameter(Map arg0) {
          // TODO Auto-generated method stub
     public static void main(String[] args) {
          // TODO Auto-generated method stub
          try{
               addAttributeToTag2 genFormat=new addAttributeToTag2();
               FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\copy.xml");
               FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\copy1.xml");
               genFormat.execute(in,out);
               catch(Exception e)
               e.printStackTrace();
However as Krish has pointedf out file adapter has option to set encoding type, you can try that option first.
regards
Anupam

Similar Messages

  • Changing the xml encoding from UTF-8 to ISO-8859-1

    Hi,
    I have created an xml file in xMII transaction that I feed into a webservice as input. As of now, the data in the xml file is entirely english text (it would be changing to have European text soon).  I gave the encoding as UTF-8.
    I get an error on the webservice side(not xMII code) that the its not able to parse. The error is 'SaxParseException: Invalid 1 of 1-byte UTF-8 sequence). I know that an easy fix is if tI change the encoding to iso-8859-1.
    But the reference document doesnot let me put anythign other than UTF-8. Even if I put <?xml version="1.0" encoding="iso-8859-1"?> as the first line, when I save it and open it back, i see <?xml version="1.0" encoding="UTF-8"?>
    Is there any way to change the encoding? Or better still, anyway idea why this invalid sequence is coming from?
    Thanks,
    Ravi.

    Hi Ravi,
    We have encountered scenarios where we needed to take the <?xml version="1.0" encoding="UTF-8"?> out completely.  As xMII was providing the Web Service, it needed a workaround.
    In your case, it seems that you wish to pass it from xMII to an external Web Service provider.  One option might be to pass the XML document as string.
    Once you convert it to a string, it may escape all XMl characters (i.e. '<' into '&lt;').  You could perform a string manipulation and remove the <?xml version="1.0" encoding="UTF-8"?> from the string.  You may also need to play around with xmlDecode( string ) function in the Link Editor.
    I would suggest that before you try this option, create a string variable will the contents, but without the <?xml version="1.0" encoding="UTF-8"?> and try assigning it to the input.
    You may also wish to try a string variable that has <?xml version="1.0" encoding="iso-8859-1"?> as the first line.  If this works, you should be able to perform string manipulations to convert your XML document into this modified string.
    Cheers,
    Jai.

  • XML Payload extraction from XI Message

    Hi to all,
    I use the SXI_MONITOR transaction to see the XML Payload of XI Messages. In this transaction, each successfully message has a field "MainDocument" under "Response" section that contains the XML Payload of the message.
    <B>There is a function module that I can use to extract the XML from MainDocument field?</B> I've tryed to look into SXMSCLUP and SXMSCLUR abap data tables but here I founded only the SOAP Header and SOAP Body data of the message. Here I can't see the "Payloads" data, so the MainDocument tag.
    Can anyone help me?
    Thanks!

    Ciao Gabriele,
    there are differente way to do it.
    one time I got same issue and I got some answer on the community.
    Unfortunately there was no more need for it so i did not implement but
    easily speaking in all the mapping got the payload therefore u need just to create a full mapping adn to process the data u get.
    In java for example is given as input stream that u can store some where and process.
    I pasted the result below:
    IN java
    How to get the whole payload
    in abap
    /people/udo.martens/blog/2006/02/16/own-logging-of-xi-messages
    please rewars point is useful thanks.
    regards,
    Giamma

  • Namespace and prefix are not coming up in xml payload created from BSSV

    Hello
    I am facing this issue that when I am creating xml payload from BSSV, payload does not have namespace and no prefix. I googled on this and made code change in package-info. java file. Now, when I test BSSV locally from Jdeveloper xml gets created with namespace but when I run it from server, there's no namespace.
    Does this file package-info.java gets deployed on server? is it ok to make change to it? If not, then what is the other way to resolve this issue?
    Please suggest.
    Thanks
    TK

    Hi Peter,
    Thanks for the valuable input.
    We have already implemented note 378648 i.e these all parameters are already there under sidadm user in DB node.
    BR_OFS=1
    BR_OFS_RESOURCE=< database_resource_name>
    BR_OFS_CLUSTER=< cluster_name>
    BR_OFS_USER=<user_name>
    BR_OFS_DOMAIN=<domain>
    BR_OFS_PWD=<password>
    registry HKEY_LOCAL_MACHINE/Software/Oracle/HomeX ORA_<SID>_AUTOSTART is having value false.
    Please guide what could be the other possible reason?
    Regards
    Praveen

  • Encoding from UTF-16 to UTF-8

    Hi,
    I need to convert from UTF-16 to UTF-8 encoding.
    I receive an CSV file in encoding UTF-16 for our backend system. but our external partner needs the encoding to be UTF-8
    How can I change the encoding ?

    Hello Frank,
    We have used TextCodePageConversionBean to meet such a requirement in one of our scenarios using CSV files.
    http://help.sap.com/saphelp_nw04/helpdata/en/45/da2deb47812e98e10000000a155369/content.htm
    Can you please try this and let us know if this helps?
    Thanks.
    Best Regards,
    Shweta

  • Change character encoding from UTF-8 to EUC-KR

    We are receiving data in UTF-8 in the querystring from a partner formatted as:
    %EA%B3%A0%EB%AF%BC%ED%95%98%EC%9E%90%21
    Our site uses EUC-KR so using this text for search/display/etc is not possible. Does anyone know how we can convert this to the proper Korean EUC encoding so it can be displayed properly using JSP? Basically it should be:
    %B0%ED%B9%CE%C7%CF%C0%DA%21
    Thanks in advance.

    I'm not sure where you are getting %xx encoded UTF-8.... Is it cuz you have it in a GET method form and that's what you are seeing in the browser's location bar? ...
    Let's assume you have a form on a page, and the page's charset is set to UTF-8, and you want to generate a URL encoded string (%xx format, although URLEncoder will not encode ASCII chars that way...).
    In the page processing the form, you need to do this:
    request.setCharacterEncoding("UTF-8"); // makes bytes read as UTF-8 strings(assumes that the form page was properly set to the UTF-8 charset)
    String fieldValue = request.getParameter("fieldName"); // get value
    // the value is now a Unicode String in Java, generated from reading the bytes submitted from the form as UTF-8 encoded text...
    String utf8EncString = URLEncoder.encode(fieldValue, "UTF-8");
    // now utf8EncString is a URL encoded (%xx) string of UTF-8 values
    String euckrEncString = URLEncoder.encode(fieldValue, "EUC-KR");
    // now euckrEncString is a URL encoded (%xx) string of EUC-KR valuesWhat is probably screwing things up for you mostly is this:
    euckrValue = new String(utf8Value.getBytes(), "EUC-KR");
    What this does is takes the bytes of the string utf8Value (which is not really UTF-8... see below) in the local encoding (possibly Cp1252 (Windows) or ISO8895-1 (Linux), or EUC-KR if it's Korean Windows), and then reads them as if they were EUC-KR... which they aren't.
    The key here is that Strings in Java are not of any encoding. They are pure Unicode values. Encodings only matter when converting to or from bytes. The strings stored in a file or sent over the net have to convert to bytes since that's what is stored/sent, just bytes. The encoding defines how the characters can be encoded into 1 or more bytes, and thus reconstructed.

  • Encoding from UTF-8 encoded String to Microsoft Project default encode

    Hi Expert ...
    I have a problem with encoding a String from UTF-8 String in order to write a MPX (Microsoft Project) file. I used UTF-8 on my Database encoding, and I want to write a MPX file using MPXJ library, but the result is (?) character. I think it's because I didn't encode yet to Shift JIS (a Microsoft Product default encoding). And after that I try to encode the String with Shift_JIS encoding, but the same result is appeared. I try to looking another way, but there is no result.
    I hope some expert would help me to solve this problem.
    Thank you,
    Alfian B.

    Totally wrong. A String doesn't have an encoding.
    Now if you had an array of bytes, which were encoded using one charset, and you wanted to convert that to an array of bytes encoded using a second charset, you would use code like this:byte[] bytes = // the bytes encoded in UTF-8, let's say
    String s = new String(bytes, "UTF-8"); // make that into a String
    byte[] newbytes = s.getBytes("windows-31j"); // encode the String into windows-31j

  • HTTP adapter - change encoding from UTF-8 to ISO-8859-1

    Hi,
    I am trying to change the encoding used by the HTTP sender adapter in a scenario.
    However, when I enter ISO-8859-1 in the XML Code under XI Payload Manipulation on the comms channel it has no effect - the paylad still shows as UTF-8 in SXI_MONITOR.
    Am I missing a step or entering the field incorrectly ??
    Thanks
    Colin.

    Hi,
    From help
    Enhancing the Payload
    Some external systems, for example, Web servers in marketplaces, can only process data if it is sent as an HTML form using HTTP.
    A typical HTML form comprises named fields. When transferring a completed form to the server or a CGI program, the data must be transferred in such a way that the CGI script can recognize the fields that make up the form, and which data was entered in which field.
    The plain HTTP adapter constructs this format using a prolog and an epilog. Therefore, there is a particular code method that separates form fields and their data from each other. This code method uses the following rules:
         Individual form elements, including their data, are separated from each other by the character &.
         The name and data of a form element are separated from each other by an equals sign (=).
         Blanks in the entered data (for example, in multiple words) are replaced by a plus sign (+).
        All characters with the (enhanced) ASCII values 128 to 255 (hexadecimal 80 to FF) are transcribed using a hexadecimal sequence, beginning with a percentage sign (%) followed by the hexadecimal value of the character (for example, the German umlaut ö in the character set ISO-8859-1 is transcribed as %F6).
       All characters that occur in these rules as control characters (&, +, =, and %) are also transcribed hexadecimally in the same way as high value ASCII characters
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/79973cc73af456e10000000a114084/content.htm
    Regards
    Chilla

  • Change encoding from utf-8 to iso-8859-1 in JMS receiver!

    Hi.
    I have some problems regarding encoding.
    The simple setup: dummy datatype as input, XSLT mapping and standard XI output(to JMS).
    Are there any way to tell the JMS adapter to deliver the message in iso-8859-1 and not utf-8?
    Regards Peter

    > Hi Henrique.
    >
    > This sounds like an idea. Can you guide me to some
    > documentation, that describes adding mapping in the
    > jms adapter module?
    >
    > Regards Peter
    To use modules in JMS adapter: http://help.sap.com/saphelp_nw2004s/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
    Now, you add the MessageTransforBean module, to use the XSLT mapping. Check the end of this blog to learn how to use XSLT mapping on MessageTransformBean: /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Regards,
    Henrique.

  • Change encoding from utf-8 to ISO-8859-1

    Hi
    I have a problem with changeing the encoding of a text. The text is in utf-8, but when I try to send the text as mail with javax.mail and "text/html", Outlook doesn't want to display the right characters. Can somebody help me?

    Hi,
    String s = java.net.URLEncoder.encode(myText, newencoding)
    http://galileo.spaceports.com/~ibidris/

  • Oracle 9i +Java: Change string encoding from UTF-16 to Windows-1251

    Dear colleagues,
    I have a very urgent case: need to change encoding of the string retrieved from the file (with encoding UTF-16) to Windows-1251 and put it to db table, to CLOB field.
    Code of the Java function
    +public static void file2table(String sql, String fileName, String characterSet, int asByteArray) throws SQLException, IOException {+
    Connection con = null;
    Writer writer = null;
    Reader reader = null;
    +try {+
    con = getConnection();
    PreparedStatement ps=con.prepareStatement(sql);
    reader = new InputStreamReader(new BufferedInputStream(new FileInputStream(new File(fileName))), characterSet);
    BufferedReader br = new BufferedReader(reader);
    String s;
    +while ((s = br.readLine()) != null) {+
    byte[] defaultBytes=s.getBytes(characterSet);
    String win1251str=new String(defaultBytes, "windows-1251");
    +if(asByteArray>0) {+
    ps.setBytes(1, defaultBytes);
    +//ps.setBytes(1, win1251str.getBytes("windows-1251"));+
    +} else {+
    ps.setString(1, s);
    +}+
    ps.executeUpdate();
    +}+
    con.commit();
    +} finally {+
    +if (reader != null) {reader.close();}+
    +if (con != null) {con.close();}+
    +}+
    +}+
    I was check, all bytes from the file received correctly. But if I put readed bytes to database table, result text in table is broken.

    >
    Yes, currently I already have filled table with all file lines in result table but with incorrect encoding
    >
    No you haven't - not using the code you posted. You can't save LOB data using only the BLOB or CLOB.
    That isn't data that you strored - it is garbage that is being stored as the LOB locator.
    I ask you why you were trying to store the data that way instead of the way the doc shows you and you said
    >
    Because var. s is type of Java String.
    For method setClob must be use type of CLOB
    >
    You are teriibly confused about LOBs. A BLOB or CLOB Java datatype is the LOB LOCATOR and doesn't contain any data.
    Yes - it is true that method setClob must be of type CLOB but that CLOB instance HAS TO BE THE LOB LOCATOR - not the data.
    You access LOB data using streams. To store LOB data you have to RETRIEVE (not send) a LOB locator from the database and then use the locator's stream to send the actual data.
    So if you are creating a new record in the table you typically do an INSERT that includes an EMPTY_LOB() and have the newly created LOB locator returned to you. Then you use that locators stream to send the actual data.
    Since you are not doing that your approach will not work.
    Here is a link to the 9i JDBC Dev Guide
    http://docs.oracle.com/cd/B10501_01/java.920/a96654.pdf
    See page 8-2 to start with
    >
    BLOB and CLOB data is
    accessed and referenced by using a locator, which is stored in the database table and
    points to the BLOB or CLOB data, which is outside the table.
    To work with LOB data, you must first obtain a LOB locator. Then you can read or
    write LOB data and perform data manipulation. The following sections also
    describe how to create and populate a LOB column in a table.
    The oracle.sql.BLOB and CLOB classes implement the java.sql.Blob and
    Clob interfaces, respectively (oracle.jdbc2.Blob and Clob interfaces under
    JDK 1.1.x). By contrast, BFILE is an Oracle extension, without a corresponding
    java.sql (or oracle.jdbc2) interface.
    Instances of these classes contain only the locators for these datatypes, not the data.
    After accessing the locators, you must perform some additional steps to access the
    data. These steps are described in "Reading and Writing BLOB and CLOB Data" on
    page 8-6 and "Reading BFILE Data" on page 8-22.
    Note: You cannot construct BLOB, CLOB, or BFILE objects in your
    JDBC application—you can only retrieve existing BLOBs, CLOBs,
    or BFILEs from the database or create them using the
    createTemporary() and empty_lob() methods.
    >
    Read the above quotes several times until you understand what they are telling you. These are the two main concepts you need to accept:
    >
    To work with LOB data, you must first obtain a LOB locator.
    You cannot construct BLOB, CLOB, or BFILE objects in your JDBC application
    >
    See the example code and description starting on page 8-11 for how to populate a LOB column in a table
    >
    Create a BLOB or CLOB column in a table with the SQL CREATE TABLE statement,
    then populate the LOB. This includes creating the LOB entry in the table, obtaining
    the LOB locator, creating a file handler for the data (if you are reading the data from
    a file), and then copying the data into the LOB.
    >
    Until you start using the proper methodology you are just wasting you time and will not be successful.

  • Corrupt XML file encoding utf-8 special chars (IDOC - File scenario)

    Dear experts,
    I have a problem with the XML output files of XI and could not find the answer in one of the current posts.
    I'm sending Master Data from R/3 with IDOCs through XI to a FTP directory. These files include characters as Á, Ê, etc.
    The XI server includes the utf-8 encoding in the output XML message. However, when opening these files I receive errors (tried it in multiple programs). It tells me that Á is not utf-8.
    It will not accepts Á. I was under the impression that utf-8 included extended Latin and thus would accept these characters. Thus implying that the message was created wrong. Also importing these files into MDM import manager gives errors.
    All rfc destinations are on Unicode.
    By the way, we experience the same problem when syndicating files from the MDM server.
    Any suggestions?
    Cheers.
    * Will reward points for helpful answers.

    Hi,
    Check out this guide..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
    make use of the messagetransformbean - http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm
    Also for further ref: go thru this thread - Change encoding from utf-8 to iso-8859-1 in JMS receiver!
    regards
    sasi.........
    <b>Reward if useful</b>

  • Unable to transform EDI document to XML payload in Oracle B2B inbound op

    Hi,
    In our current project we would be implementing Oracle B2B.So I am doing simple POC on Oracle B2B inbound operation for a EDI document for a project requirement.Facing issue if Transformation option selected in Oracle B2B console. Would really appreciate if you guys give me some pointer..
    Below is short desacription of POC:
    1) Created ECS file for Purchase Order(EDI_X12 Standard, 850, Version : 4010) in Spec Builder 6.6.0
    2) Created corresponding XSD and dummy test EDI data file(.dat) in Spec Builder 6.6.0
    3) In Oracle B2B Console, created Document Type and Document Definition
    4) Created 2 Trading Partners : Our Organisation(Host) and MyPartner(Remote)
    5) My Partner is Sender and Our Organisation is Receiver
    6) Linked Document Type to both Trading Partners
    7) Created a Listening Channel
    8) Protocol of Listening Channel is Generic File
    9) Mentioned Folder Path and File Type : %From PARTY%_%TO PARTY%_%DOCUMENT TYPE NAME_%DOCUMENT REVISION%.dat
    10) Agrrement validated and deployed
    11)Checked option Transformation for Agreement
    12) In SOA Composite created a simple Asynchronous BPEL process
    13) BPEL process using a B2B Adapter is subscribed to Document Type(Purchase Order) operatioon Receive and Mode Default
    14) Using a simple Assiign activity to map payload
    15) BPEL then inoke a File Adapter service to write sme XML payload(picked from B2B fatre EDI transformed to XML) to a file
    Issue Faced:
    1) B2B could make oput Sender and Receiver Trading Partners
    2) B2B could make out the Agrrement
    3) B2B is picking up EDI file
    4) If Agreemnet has Transformation option selected, then B2B is givinng below Error:
    [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@182461f] [userId: <anonymous>] [ecid: 0000JILzvC2E0Va_xLp2iW1EzqZ_0000pg,0] [APP: soa-infra] [dcid: 162dbcacafdb4641:19e705e4:13495b34174:-7fd3-0000000000000070] java.lang.UnsatisfiedLinkError: com.edifecs.xengine.xeobjects.XEHelper.createN2XNative()Lcom/edifecs/xengine/xeobjects/XEDataProc
    at com.edifecs.xengine.xeobjects.XEHelper.createN2XNative(Native Method)
    5) It is unable to transfer EDI payload to XML
    6) Checked payload in Wire Message : still showing EDI payload
    7) Due to this BPEL is facing issue since it is expecting XML payload
    8) In BPEL it is givimng Error: Index Out Of bound.. I guess may be due to EDI payload
    9) If transformation option unchecked in Agreement in B2B console then B2B working good but BPEl failing
    Options Tried:
    1) I Exported Repository,then purged design time data and Reimported and restarted Server and tested..not working
    2) I also created a Parser Scehma for Blank EDI document(that option I found in Spec Builder 6.6.0==>New Document-->Parser Schema(Blank EDI Document) and then placed that Parser Schema file(ECS file) in folder :
    C:\Oracle\Middleware\Weblogic\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\config\schema
    and added an entry in XERegistry.xml
    <Item Name="SchemaFile">${XERoot}/config/schema/Spec2</Item>
    but not working..
    3) Checked namespace in XSd and WSDl for BPEL,they are correct
    Getting no clue how to resolve..Need help...
    Thank you...

    Log File :(Weblogic JDK pointing to 32 bit)
    [2012-01-01T01:32:01.818+05:30] [AdminServer] [ERROR] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@182461f] [userId: <anonymous>] [ecid: 0000JILhj4XE0Va_xLp2iW1EzqZ_00002J,0] [APP: soa-infra] [dcid: 162dbcacafdb4641:19e705e4:13495b34174:-7fd3-0000000000000070] java.lang.UnsatisfiedLinkError: com.edifecs.xengine.xeobjects.XEHelper.createN2XNative()Lcom/edifecs/xengine/xeobjects/XEDataProc;[[
         at com.edifecs.xengine.xeobjects.XEHelper.createN2XNative(Native Method)
         at com.edifecs.xengine.xeobjects.XEHelper.createN2X(Unknown Source)
         at oracle.tip.b2b.document.edi.EDIDocumentPlugin.processIncomingDocument(EDIDocumentPlugin.java:1112)
    java.lang.UnsatisfiedLinkError: com.edifecs.xengine.xeobjects.XEHelper.createN2XNative()Lcom/edifecs/xengine/xeobjects/XEDataProc;
         at com.edifecs.xengine.xeobjects.XEHelper.createN2XNative(Native Method)
         at com.edifecs.xengine.xeobjects.XEHelper.createN2X(Unknown Source)
         at oracle.tip.b2b.document.edi.EDIDocumentPlugin.processIncomingDocument(EDIDocumentPlugin.java:1112)
         at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2348)
         at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1533)
    [2012-01-01T01:32:01.834+05:30] [AdminServer] [ERROR] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@182461f] [userId: <anonymous>] [ecid: 0000JILhj4XE0Va_xLp2iW1EzqZ_00002J,0] [APP: soa-infra] [dcid: 162dbcacafdb4641:19e705e4:13495b34174:-7fd3-0000000000000070] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0[[
         at java.util.ArrayList.RangeCheck(ArrayList.java:547)
         at java.util.ArrayList.get(ArrayList.java:322)
         at oracle.tip.b2b.engine.Engine.processIncomingMessageImpl(Engine.java:2746)
         at oracle.tip.b2b.engine.Engine.processIncomingMessage(Engine.java:1533)
    [2012-01-01T01:32:01.846+05:30]
    ]]

  • Mail Sender - Encoding (I need to change from UTF-8 to ISO-8859-1)

    Hi,
    I'm getting data from email (in ms exchange) using the Mail Sender Adapter.
    In the e-mails exists characters as ç (ccedil), ã (atilde), õ (otilde) and others. The XI cannot read this characters because the encode in XML is UTF-8.
    How I do to change the encode in XI from UTF-8 to ISO-8859-1 ?
    Thank you!

    Unfortunately most mail server do not apply the codepage to the content type of a mail.
    In this case you have to set the content type with help of the MessageTransformBean:
    Transform.ContentType      text/plain;charset="ISO-8859-1"
    Regards
    Stefan

  • XML data encoding iso-8859-1 . Currently utf-16 is default encoding

    Hello ABAP Gurus ,
    Need a help from you .
    Scenario : We have SAP4.7 enterprise version which we have now converted to Unicode system . There is a BSP application which talks to an external web application (Non Unicode) thru HTTP protocol and sends data thru XML.
    Problem : Problem is at the time when BSP application prepares the XML While preparing XML data , before converting to Unicode environment the encoding was "iso-8859-1" . But now after Unicode conversion , the encoding is "UTF-16".
    The XML data looks like
    <?xml version="1.0" encoding="utf-16"?><DATA><ACTION>CREATE_TICKET</ACTION><CRI
    I have tried replacing "utf-16" by "iso-8859-1 " . The interface works . But at the recieving end , ie external web application , the German umlauts appear as some garbage values .
    I know we need to enforce encoding . I have tried with the following code but could not suceed . The encoding appears as "utf-16".
    Following is the section of code which I have written in BSP application.
      Daten in DOM-Baum wandeln
        CALL FUNCTION 'SDIXML_DATA_TO_DOM'
          EXPORTING
            name        = 'DATA'
            dataobject  = ls_cr_xml
          IMPORTING
            data_as_dom = if_dom
          CHANGING
            document    = if_document
          EXCEPTIONS
            OTHERS      = 1.
        IF sy-subrc NE 0.
          error_out text-f47 text-f48 space space.
        ENDIF.
      DOM-Baum in Character-Stream wandeln
        if_pixml = cl_ixml=>create( ).
        IF if_pixml IS INITIAL.
          error_out text-f50 text-f53 space space.
        ENDIF.
        if_pstreamfact = if_pixml->create_stream_factory( ).
        IF if_pstreamfact IS INITIAL.
          error_out text-f51 text-f53 space space.
        ENDIF.
        if_postream = if_pstreamfact->create_ostream_cstring( string = xml_doc ).
        IF if_pstreamfact IS INITIAL.
          error_out text-f52 text-f53 space space.
        ENDIF.
    --Encoding--
    data: gv_str type string.
    data: gv_l_xml_encoding type ref to if_ixml_encoding.
    data gv_l_resultb type boolean.
    gv_str = 'ISO-8859-1' .
    clear gv_l_xml_encoding.
          call method if_pixml->create_encoding
            EXPORTING
              byte_order    = 0
              character_set = gv_str
            RECEIVING
              rval          = gv_l_xml_encoding.
          clear gv_l_resultb.
          call method gv_l_xml_encoding->set_character_set
            EXPORTING
              charset = gv_str
            RECEIVING
              rval    = gv_l_resultb.
            call method if_document->set_encoding
            EXPORTING
              encoding = gv_l_xml_encoding.
    ----Append child -
    CALL METHOD if_document->append_child
          EXPORTING
            new_child = if_dom
          RECEIVING
            rval      = lv_return.
        IF lv_return NE 0.
          error_out text-f47 text-f49 space space.
        ENDIF.
    --Render the XML data to output stream--
        CALL METHOD if_document->render
          EXPORTING
            ostream = if_postream.
    After this section of code is executed , the variable xml_doc  gets filled up with XML data .
    <?xml version="1.0" encoding="utf-16"?><DATA><ACTION>CREATE_TICKET</ACTION><CRI
    Can anybody help how to enforce encoding ?
    Regards,
    Laxman Nayak.

    Hi Aslam Riaz,
    Did you find any solution..?
    Kindly help me on this issue.
    Thanks and Regards,
    Shailaja Chityala

Maybe you are looking for

  • Equium A100-027: CD/DVD drive says driver is missing or corrupted

    My cd/dvd drive is not shown anymore in "computer". i have looked in device manager and there is an exclamation mark next to my drive. I have done a full norton scan and everything was clear. On device manager when i open properties for this drive i

  • FTP Adapter (Sender)

    Hi Experts, The usual scenario and setting for an FTP adapter (sender) to trigger an event if there are no files being picked up? If it's possible, how will I do it? Cheers, R-jay

  • Pb to transfert Date in access Database

    Hi, I have a problem to transfert date in access database. I get the date in java: Calendar theCalendar = java.util.Calendar.getInstance(); int month = theCalendar.get(Calendar.MONTH)+1; int dayOfMonth = theCalendar.get(Calendar.DAY_OF_MONTH); String

  • Need Help again...

    Hi all... Really need help again this time... I am trying to do a web page and thought of placing 4 video clips into 1 Loader...viewers can simply choose any of the videos they would like to watch...and all the video clips will then play in the same

  • Can't paste URL for my Google calendar because location to paste disappears

    I go through the steps to link my Google calendar to Lightning but when I try to select Google Calendar as an option in Lightning settings the place to paste link disappears. This does not happen when selecting the other options. How can I avoid this