Special characters issue in output XML - file adapter  - SOA 10.1.3.4

Hi,
I use a DB adapter and File adapter to retreive data from database and create output XML file.
For the database record which have special characters (for example ' , <, >), it will just output the same character in XML file, which cause other system to reject this XML file because of those characters.
Anyone have this issue ? How can i resolve that ?
Thanks

Try converting the characters to &lt; and &gt;. This should work. Make sure the stand-alone & character is converted to & amp; (written with space as HTML will convert it back to &).
-AR

Similar Messages

  • Junk Characters in the output XML file after Parsing

    Hi
    I am using DOM parser to parse an XML file.
    After parsing the input XML file, i am fetching some contents
    from the same and also putting the same contents in the parsed output file which is also an XML file.
    The problem here is that the after putting the contents to the output XML file from the input XML file,
    some junk character appears at the end of each and every tag in the outputfile.
    The junk character is some thing like this : " ampersand hash thirteen and a semicolon "
    (*THE MESSAGE DID NOT ACCEPT THE SYMBOLS KINDLY TRANSLATE THE ABOVE WORDINGS*
    INTO SYMBOLS)
    This character gets appended at the end of each and every tag in the output file due to which the output file
    is not recognised as an XML file.
    Please let me know as to why is this character appearing and also please suggest some solution
    for the same.
    -Thanks in Advance.
    Edited by: itskarthik on Oct 10, 2008 7:16 AM
    Edited by: itskarthik on Oct 10, 2008 7:18 AM
    Edited by: itskarthik on Oct 10, 2008 7:19 AM
    Edited by: itskarthik on Oct 10, 2008 7:19 AM
    Edited by: itskarthik on Oct 10, 2008 7:23 AM
    Edited by: itskarthik on Oct 10, 2008 7:23 AM

    Wierd.
    Try this piece of code. (You can always change it to use input file and output file instead of string if you want)
    What is your output?
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    public class XMLTest {
         public static void main(String[] args) throws Exception {
              String input = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" +
                                  "<test>\r\n" +
                                  "</test>";
              System.out.println("Input:");
              lookForCR(input);
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              Document doc = factory.newDocumentBuilder().parse( new ByteArrayInputStream(input.getBytes()) );
              Source source = new DOMSource(doc);
              ByteArrayOutputStream bArrOut = new ByteArrayOutputStream();
              Result result = new StreamResult( new StripOutputStream( bArrOut ) );
              Transformer xformer = TransformerFactory.newInstance().newTransformer();
              xformer.transform(source, result);     
              System.out.println("\nResult:");
              lookForCR(bArrOut.toString());
              System.out.println("\nDone");
         public static void lookForCR(String input) throws Exception {
              char[] chars =input.toCharArray();
              for ( char chr : chars ) {
                   if (chr == 13 ) {
                        System.out.println("Has 0x0D character!!");
    class StripOutputStream extends OutputStream {
         OutputStream out = null;
         public StripOutputStream(OutputStream out) {
              this.out = out;
         @Override
         public void write(int b) throws IOException {
              if ( b != 13 )
                   out.write(b);
    }- Roy

  • Not able to map contents of xml to output using file adapter

    Hi
    i m not able to map the output of file adapter to a variable when reading an xml. the data is coming in the file adapter output variable but it is not mapping to other variable in assign or transform activity.I m using jdeveloper 11.1.1.4.0.Can anbody help me plz.
    Regards
    Sourbh

    i am using file adapter as reference to synchronously read an xml file. i am able to see the flow trace in em console. the output variable of file adapter contains the data but when i m trying to assign the value to a variable i getting error. saying that some xpath is not returing any value.
    i tried with transform activity also but same case is there.

  • Output XML file problem (in FILE to RFC scenario)

    hi,
       my problem is that in the export parameter i have 3 variables but my output xml file shows only 2 parameters . I have checked my mapping all 3 parameters are mapped properly in output mapping .
    Initially when i started the scenario there were only 2 parameters in my export list .
    i completed this suuccesfully and then as per new requirement one more parameter was needed to be added i added a new parameter and reimported my rfc .
    the response tab of the reimported RFC shows me the newly added parameter but my final xml file only shows me the previous 2 it doesnt show me the newly added one is there any seeting which i need to change like in idoc where we have to readd the idoc in IDX2
    With regards
    Bhawarlal Choudhary

    Hi,
    2 Introduction
    Configuring IDoc adapter in Exchange Infrastructure 3.0 requires some configuration on the SAP
    systems, for both XI and the backend system where the IDoc message is to be sent. These steps, although
    simple, are many times missed or mis-configured, causing the delivery of messages to fail.
    Since IDoc adapter uses the ABAP stack, instead of J2EE, the configuration requirements are mainly in
    ABAP.
    Setting up IDoc adapters requires the XI integration server to be able to communicate with the backend
    SAP system, and also to make sure that the Logical System Name used when posting IDoc exists on the
    backend SAP system.
    3 The Step By Step Solution
    The basic steps for the IDoc configuration are outline below:
    1. Configure SM59 on XI to communicate to SAP backend system.
    2. Configure port on XI for IDoc communication.
    3. Create or verify the Logical System Name on the SAP backend system.
    4. Create or verify business system in XI’s System Landscape Directory.
    5. Verify the Logical System Name of the business system.
    6. Verify or add the Logical System Name for the sender business system.
    7. Create/configure the Communication Channel for the IDoc receiver adapter
    3.1 Configure SM59 on XI to communicate to SAP backend system.
    1. Using transaction SM59, create an RFC destination with Connection Type = “3”.
    In this example, the RFC destination name is “NDVCLNT510”.
    2. Enter the logon information:
    3. Test the connection by clicking on “Testing connection” and “Remote logon”.
    Both must be successful.
    3.2 Configure port on XI for IDoc communication.
    4. Go to transaction IDX1 on XI, and create a port. In this example, the Port name is “SAPNDV”.
    •     &#61472;The Port name must be in the form of “SAPxxx”, where xxx is the system ID of the backend SAP
    system.
    •     The Client must be the client number of the backend SAP system.
    •     Select the RFC Destination which was created in the previous step.
    3.3 Create or verify the Logical System Name on the SAP backend system.
    5. Enter transaction SALE on the SAP backend system.
    6. Create or verify the Logical System Name. In our example, NDVCLNT510 is verified.
    3.4 Create or verify business system in XI’s System Landscape Directory.
    The business system name for the SAP backend system must contain a valid Logical System Name. This Logical System Name is the one verified or created in the previous step.
    7. In the System Landscape Directory,  select the SAP backend business system. If one does not exist, then create the business system. Verify the Logical  System Name.
    3.5 Verify the Logical System Name of the business system.
    8. In the Integration Directory, doubleclick on the business system (in our example, it is NDVCLNT510).
    Navigate the menu:
    Service • Adapter Specific Identifiers.
    If information is empty or incorrect, then it will have to be synchronized with the content of the System Landscape Directory. Follow the steps below for synchronization.
    9. (Optional) Synchronization of the business system in Integration Directory to the business system in System
    Landscape Directory.
    •     &#61472;Double-click on the business system in the Integration Directory.
    •     &#61472;Switch to Edit mode.
    •     &#61472;Select menu: Service • Adapter-Specific Identifiers 
    10. (Optional) Within the dialog box, click on the button as indicated below to resynchronize.
    11. (Optional) If the expected data from the System Landscape Directory is not updated, then the SLD cache may need to be cleared first.
    3.7 Create/configure the Communication Channel for the IDoc receiver adapter.
    15. In the Integration Directory, create an IDoc receiver communication channel.
    •     &#61472;The RFC Destination is from step 3.1.
    •     &#61472;The Port is from step 3.2.
    NOTE:
    There is no need to create an IDoc sender Communication Channel for XI. Instead, the backend SAP system must be configure to send the IDoc to XI.
    4 Appendix
    Transaction: IDX2
    There are a couple of situation where IDX2 can be useful on the XI system.
    1. When we want to test connection between the XI and SAP backend system.
    2. When an IDoc has changed, and the meta data stored in XI needs to be update. When an IDoc is sent from the SAP backend system to XI, XI will first check to see if the meta data for the IDoc is already in its persistent cache. If not, then XI will use the configuration in IDX1 to retrieve the IDoc meta data from the backend system. If the
    meta is already in cache, then it will NOT do so. Therefore, when an IDoc has changed, it is necessary to manually update the new meta data on XI, or delete it from the cache, so that the latest version can be retrieved. IDX2 is used for this purpose.
    Go to transaction IDX2 and click on “Create”.
    Enter the IDoc Type and the Source Port as defined in step #2. Click “Continue”.If successful, the following will show up. If error occurs, then the IDX1 configurations will need to be re-checked.
    Regards
    Hemant
    If find helpful plz award points

  • XML stream and stored as an output XML file

    Dear ALL,
    Could you help me in such situation?
    I need create XML file. I have DTD file. I create XML stream and stored as an output XML file. But all the data of my XML file stored in one line.
    How I can create my XML file according to DTD file?
    Thanks a lot.
    Best regards,
    Igor

    hi
    good
    go through this links,hope these would help you to solve your problem
    http://rustemsoft.com/JSPsample.htm
    http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.etools.xmlbuilder.doc/tasks/txmltask.htm
    thanks
    mrutyun^

  • Not receiving the output xml file from BPM

    Hello
    I am doing a scenario where I'd be sending two files in text format to the BPM workflow which would be using Fork and Correlation to merge these two files into one file and send the output xml file as receiver. Problem is that the two files are successfully converted into the xml messages and are displayed in SXMB_MONI but the output file which would be received from BPM engine as receiver is not being generated and displayed in SXMB_MONI as well as RWB. Please suggest any probable solution.
    Thanks.

    I don't think you can manipulate .ai files in Flex /
    AIR.

  • Create XML stream and stored as an output XML file

    Dear ALL,
    Could you help me in such situation?
    I need create XML file. I have DTD file. I create XML stream and stored as an output XML file. But all the data of my XML file stored in one line.
    How I can create my XML file according to DTD file?
    Thanks a lot.
    Best regards,
    Igor

    hi
    good
    go through this links,hope these would help you to solve your problem
    http://rustemsoft.com/JSPsample.htm
    http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.etools.xmlbuilder.doc/tasks/txmltask.htm
    thanks
    mrutyun^

  • Special Characters issue---u00FA ,u00A3---- in Reciver SOAP Adapter

    Hi ,
    I am facing issues with Spceial Characters ú ,£ at the reciver SOAP adapter  ,the messages was stuk in XI with to the following error :An invalid character was found in text content. Error processing resource
    I tried in several ways buy using XMBWS.XMLEncoding=iso-8859-1,
    but it was not resloved still I am getting the same error,
    Any one plz suggest me how to resolve this issue....
    Regards,
    Teja.

    Hi ,
    My scenario is RFC--SOAP ,the messages was successfully rached to RFC adapter and I am facing the issue at the receiver SOAP Adapter ......
    I am getting error messages such as :
    1) 400 Bad Request
    2) In the XML Payload ......It is showing as Invalid Character found ....
    For this I tried ...
    1) In the source payload XML I done the  chages in the encodding part
    encoding part as iso-8859-1instead of utf-8.
    2) I have triggered the message from Integration Engine ....then it was successfully processed through SOAP Adapter
    3) with special characters...means there is no issue at target end.
    4) the issue lies in XI so we have to resolve it.
    I tried by using Adapter paramters  which was provided by SAP but the result is same..
    so the paramters which was provided by SAP are incorrect(for encoding)
    Please help me in resolving this issue .........
    Regards,
    Teja.

  • XSLT transformation in XML to ABAP: special characters issue

    Hi,
    I am parsing well-formed XML file that has the following data (:
    <projects><project><name>Wallis &amp; Futuna</name></project></projects>
    I use XSLT transformation:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="projects">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
            <PROJECTS>
              <xsl:for-each select="project">
                <PROJECT>
                  <NAME>
                    <xsl:value-of select="name"/>
                  </NAME>
                </PROJECT>
              </xsl:for-each>
            </PROJECTS>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    If I use the above example without &amp;amp; everything works fine, but the original XML fails with exception CX_XSLT_DESERIALIZATION_ERROR and message "Error during deserialization". Googling around did not give an answer.
    Any words of wisdom?
    Edited by: Alexei Isaev on Apr 26, 2011 5:04 AM
    Edited by: Alexei Isaev on Apr 26, 2011 5:05 AM

    Hi,
    Please visit the following link for reference.
    http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION.htm
    Thanks & Regards,
    Harish

  • Facing issue while reading XML file 'LPX-00217: '

    Hi Gurus,
    I am facing one issue while reading the xml file in the one my 11g database instance. The same file if I ran in another instance then it is working fine for me.
    I presume it will be related to NLS character. Please help me in finding out character set.
    And the issue where I am getting instance character set is 'US7ASCII', and I am not getting this issue in another instance where the character set is 'UTF8'.
    And here is the issue I am getting when I was trying to load that file.
    Error Occurred :=ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML
    processing
    LPX-00217: invalid character 150 (U+0096)
    Error at line 1
    Pls help me in debugging this issue.
    Regards,
    Nagendra
    Edited by: 838961 on Jul 12, 2011 9:32 PM

    Hi,
    Pls help me in debugging this issue.There's not much to debug actually.
    The US7ASCII charset stores 7-bit characters, but you're trying to insert a value out of range (150). So that's expected behaviour.
    There were some "tricks" to allow that on some versions, using NLS settings, but it's definitely not the clean way to do it so I won't develop.
    The best thing you have to do is to migrate to character set AL32UTF8, which is fully compliant with XML.

  • How to encode an output XML file to UTF-16

    Hi,
      My target is a file system and the output is XML file. I need to encode the same in UTF-16 instead of default UTF-8. I am not using XSLT mapping
    1. How can I do this dynamically by adapter specific message attributes?
    2. Or can I achieve this by some module parameters in communication channel?
    thanks
    francis

    Use the XMLAnonymizerBean for this.
    http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/frameset.htm
    Regards
    Stefan

  • Special Characters issue in DEV and QAS

    Hi,
    I am uploading a file that has special characters (Japanese).
    In the DEV system the special character is converted to #. Which the business wants.
    In QAS system the special character is not converted and is as it is, which makes the business users difficult to find out if any speical characters are there and they don't want the special character as it is
    The file consists millions of record with a possibility of four or five records with special characters
    The special characters on keyboards is not an issue.
    The programs in DEV and QAS system are same and the file tested is also the same but different results.
    Tried in Tcode SNLS to find something but didn't know what and where to look into.
    What could be the issue in this? Looks like this is Basis issue but would like to know if anyone can let me know.......
    Regards
    Sandeep

    Hi ,
    i want to check ur open dataset statement in the program which is being used here if at all in ur case.
    Can you please check the relavant code page in both the D and Q systems and search with the appropriate hexa decimal values(for the special characters ) in both the systems ..
    u can use code page by tcode scp ..
    ex -> as u say a special char sp1 is having entry in q and code page which is being used (like 4200 )
    is not having in d03 .
    then if in d03 this page has no entry then it shows as # , since it is showing in q then it has an entry over there. this is my guess..
    so if at all the client wants not to see this special char's , u need to remove them from this code page.. and check ..
    Cant say if this can solve but u can take this as one more way of dealing with code pages  and special chars....
    br vijay..

  • Turkish Special characters issue in ECC 6.0, while uploading into table

    HI All,
    We are working with Turkish special characters in ECC 6.0
    We are uploading a CSV file containing characters like : İ, Ğ, Ş, Ü, Ö, as soon as the file gets uploaded to application server,
    it gets converted to ? or # or Ý.
    Also, we are reading the file using OPEN DATASET, ENCODING NON-UNICODE, IGNORING CONVERSION ERRORS, the same characters gets uploaded into the custom table  i.e. Ý.
    I have also tried saving the file in UNICODE / UTF-8 format, but the issue still remains.
    I tried searching SAP Notes as well.
    Any pointers to resolve the same will be helpful.
    Regards,
    Siddhesh Sanghvi

    Dear Siddhesh,
    Perhaps OSS note 508854 could help here.
    Also please be aware that Turkish only runs on ISO codepage 8859-9 (aka Latin-5 / SAP codepage 1610).
    I hope this helps.
    Best regards,
    Ian Kehoe

  • Special characters in UTF-8 UNIX file

    We have a program which downloads data from certain info-types in to the UNIX file, Fields are written to the specific position in the UNIX file. Some of the fields contains "Special Characters" in them.
    When we download the file in UTF-8 mode (encoding default) then the file display special characters correctly but the all the characters in that record gets shifted to left.
    When we download the file in ANSI mode then the file display doesn't special characters correctly but the all the characters in that record do not get shifted from their place.
    How can i find the special character in the field and accordingly i will shift the field right so that in the final UNIX file field won't shift their positions.

    Hi Ramnivas.
    Have you tried to read the characters with class: CL_ABAP_CHAR_UTILITIES (transaction SE24, label Attributes)
    For example you can see # in ABAP but in the file will be a new line or a carriage return, you can detect that an adapt it with:
    CL_ABAP_CHAR_UTILITIES=>NEWLINE or CL_ABAP_CHAR_UTILITIES=>CR_LF
    Other hand, if you are using OPEN DATASET to download the file, look at the options of encoding
    See F1 of OPEN DATASET and then encoding..
    OPEN DATASET - encoding
    Syntax
    ... ENCODING { DEFAULT
                 | {UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]}
                 | NON-UNICODE } ... .
    Hope it helps
    Regards.
    Alfonso.

  • How to convert special characters in ABAP to XML?

    Hi All.
    We have a scenario where from XI (exchange Infrastructure), a BAPI is called which returns an XML. From that XML, a PDF is generated.
    Now, if the XML contains any special characters, it will fail.
    So if any CHinese char or >, # etc signs are there, it fails.
    Can you please tell me how to convert my string in ABAP to a proper XML?
    I am new to it and I was trying the following code
    DATA: today TYPE string,
          result TYPE string.
    today = 'This is testing'.
    CALL TRANSFORMATION ID
         SOURCE today = today
         RESULT XML result.
    IF sy-subrc = 0.
      WRITE result.
    ENDIF.
    But it does not return me anything.
    Thanks in adv.

    hi
    good
    go through these links,hope these would help you to solve your problem
    http://www.sap-press.de/download/dateien/792/sappress_abapreference_2edition.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d
    thanks
    mrutyun^

Maybe you are looking for

  • Tax V0 during Import

    Dear Gurus,                    While doing custom MIRO I an encountered with this error 'Tax code V0 country IN does not exist in procedure TAXIN Message no. FF713.' I checked all the possibilities. Please suggest what could be the solution. Note : P

  • System compromised by Choqok

    Hey, I've installed Choqok the day before yesterday and today a Pop-Up warning with an error sound occured (SSL certificate error). There is a strang behaviour: It was published 19.05.2012 21:36 and it's deadline is 20.05.2013 20:59 I'll attach 3 scr

  • Custom Print

    I am trying to print a form with the following measures, height: 404, width: 639. The problem is that when printing, I need to choose the size of A4 paper, but in doing so I lose the positioning settings I had configured in the template of the form.

  • Obiee 11 installation in oel 5 , 64 bit os

    Dear All, when i start the installation using run installer then give the below error. i also download the jre 1.3.1 file and install but give the same error . any help .please Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-0

  • Aperture3.0.1Update Doesn't Find Aperture 3.4

    The 3.0.1 Updater reports that "Aperture 3.0 or later is required to install this update." Of course I have Aperture 3.0 in my Applications folder. How can I get the updater to find Aperture 3.0?