Adding additional XML Header in Target XML structure

Hi all,
I have a requirement that i need add one additional XML header to target XML messages. At the moment i can see default XML header as ,
<?xml version="1.0" encoding="UTF-8" ?>
<Test>
<Add>Test Mesage</Add>
</Test>
But i would like to have one more additional header like below,
<?xml version="1.0" encoding="UTF-8" ?>
<?Siebel-Property-Set EscapeNames="false"?>
<Test>
<Add>Test Mesage</Add>
</Test>
Can some one help me to find a way to adding this additional header?
Thanks in advance.
Prasad Babu.

Hi Prasad,
Yes it is possible by Java Mapping. Please check my response for similar thread
Re: Add XML header?

Similar Messages

  • Adding additional instances of xml tags/nodes

    Hi,<br /><br />I have an xml structure attached to a generated pdf that looks something like this:<br /><br />   <page><br />      <page_item><br />         <page_no>0</page_no><br />         <page_read_yn>N</page_read_yn><br />      </page_item><br />   </page><br /><br />and I would like to insert some additional <page_item> nodes into this structure. I have tried using the instanceManager as shown, but I am getting the message that "xfa.record.page.page_item.instanceManager has no properties".<br /><br />try {<br />  xfa.record.page.page_item.instanceManager.addInstance(1); <br />} catch(e) {<br />  app.alert(e);<br />}<br /><br />Just wondering how to add data nodes to the xml attached to the form.<br /><br />thanks,<br />John

    [email protected] wrote:
    > Hi Justin,
    >
    > thanks for the reply.
    >
    > I understand that the instanceManager is used for adding instances of subforms. I am using this effectively in the documents that I have created. I was looking for the xml equivalent of the instanceManager. In talking with premium support, the tech did not have an answer for me, so I thought that I would try the forum.
    >
    > I found a vague reference on one of the replies that suggested this was possible.
    >
    > John
    John,
    Look at the XMLData object in the Acrobat JavaScript Scripting Reference. This might give you
    the capability you're looking for. I've never used it...I just know of its existence.
    Justin Klei
    Cardinal Solutions Group
    www.cardinalsolutions.com

  • Mapping complete input XML structure into one field on target

    Hi,
    I have a scenario where I need to map the complete input XML structure as it is, into one field on target side. so can we achieve this in Graphical Mapping? If yes, please share your valuable info.
    Regards,
    Shiva.

    Hello,
    this is the java map code.just compile it and made a .zip file import it and use it Interface Mapping.
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.Map;
    import java.io.*;
    public class PayloadToXMLField1 implements StreamTransformation {
        String strXML = new String();
       //Declare the XML tag for your XML message
       String StartXMLTag = "<DocumentBody>";
       String EndXMLTag = "</DocumentBody>";
       //String StartXMLTag1 = "<Code>";
       //String EndXMLTag1 = "</Code>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = in.read(b)) != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            String outputPayload =
                StartXMLTag
             + "<![CDATA["
             + strXML
             + "]]>"
             + EndXMLTag;
            try {
                out.write(outputPayload.getBytes());
             trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;

  • Special characters in XML structure when prepared using String

    Hi,
       I am preparing an XML structure using 'String'. I print the prepared XML structure in the server log. Issue is that I am seeing extra characters([[ and ]]) that I am not printing.
    Please let me know how to get rid of those.
    Code Excerpt
            String xmlHeader = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
            String lsb_xmlcon = xmlHeader;
            logger.info("ReqXMLString Process  1  --->" + lsb_xmlcon);
            lsb_xmlcon = lsb_xmlcon +("\n");
            logger.info("ReqXMLString Process  1.1  --->" + lsb_xmlcon);
            lsb_xmlcon = lsb_xmlcon +("<REQUEST>");
            lsb_xmlcon = lsb_xmlcon +("\n");
            logger.info("ReqXMLString Process  1.2  --->" + lsb_xmlcon);
    Log
    ReqXMLString Process  1  ---><?xml version="1.0" encoding="utf-8" ?>
    ReqXMLString Process  1.1  ---><?xml version="1.0" encoding="utf-8" ?>[[
    ReqXMLString Process  1.2  ---><?xml version="1.0" encoding="utf-8" ?>[[
    <REQUEST>
    Thanks,
    Message was edited by: 996913
    This issue is observed only while running the code in server, not from Jdev.
    When we append the additional tags without new line character, "\n", there are no extra characters being added. Also, in other case also. where we used "Marshaller" to prepare the XML, we have seen this issue.
    After we set the below property to false, we got rid of the extra characters.
                            jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, false);
    Apparently the insertion of new line when the code runs on server(Weblogic 10.3.6.0) is creating the issue.
    Please let me know if anyone has come across a similar scenario.
    Thanks,

    I am building this XML in a servlet so ,right, DOM does process XML (even though a valid HTML file can be loaded into a DOM object) but if you build XML using DOM then write the XML out using PrintWriter and Transformer objects this will cause the XML to print out in your browser. If you view source on this XML you will see that the DOM object has translated all special characters to there &xxxx; equivalent. For a example: when the string (I know "cool" java) gets loaded into a attribute using the DOM object then wrote back out it looks like (I know &xxx;cool&xxx; java) if you view the source in your browser. This is what it should do, but the DOM object is not change the � to the "&xxxxx;". This servlet is acting as a gateway between a Java API and a windows asp. The asp will call the servlet expecting to get XML back and load it directly into a DOM object. When the windows DOM object gets the xml that I am returning in this servlet is throws a exception "invalid character" because the � was not translated to &xxxx; like the other characters were. According to the book HTML 4 in 24 hours (and other references) the eacute; or #233; are how you say "�" in HTML or XML. How do you say it?

  • XML structure and FCC parameters

    Hi Experts,
    Kindly help me with the XML structure and  FCC parameters for the following sample of text file
    I am new to Text Files and FCC.
    =================================================================================
    Header
    " name of the company " ,1   
    " abc 2,10/01/1972",4
    Line items
    "ADFERT",KARNATAKA,CHIPS,G,45.560000,72.190000,100.983000,76.266000,J
    "GHTJEN",KERALA,BANANAS,G,1.135000,0.714850,1,0.755000,J
    Trailer
    DDDDDDDDD,B
    ================================================================================
    It is a CSV
    Header 1st line , first field is Variable length and 2nd field is 1 char
    Header 2nd line , first field is Variable length and 2nd field is date and last field is 1 char
    Line items
    first field fixed length 6 char but
    2nd field can be of any length
    3rd field can be of any length
    4th field 1 char
    5th field can be of any length
    6th field can be of any length
    7th field can be of any length
    8th field can be of any length
    9th field 1 char
    and then the Trailer
    Please help in the structure and content conversion parameters
    also following questions :
    a)  I have to pick up this file and pass to a proxy in AbAP on target side , so do i just create a service interface and in ECC --> Sproxy and identify my SI and do a Create Proxy ? or is there anything else required ?
    b) The Date in the header needs to be passed onto ECC as a parameter so in my XML structure in the data type do i include that as a field in the mapping ..Can any one please guide me to create the Data type structure for the above file ?
    c) DO I NEED A MAPPING FOR THIS ?? THERE ARE NO CONVERSIONS required ? what are the IR and ID steps required
    if it is a FILE to Proxy scenario with no mappings 
    Please help
    thanks
    Dev

    Hi Dev,
    Full Data type is as follows
    Sender_DT
    order_recordset  0..1
    order_header                 0..1
      header-1    0..1
      date            0..1
    order_Item                      0..unbound
      item-1          0..1
      item-2          0..1
      item-3          0..1
      item-n          0..1
    order_Trailer                    0..1
      trailer-1  0..1
      trailer-2  0..1
      trailer-n  0..1
    > What about the File Content conversion parameters , can you help me with those
    order_header.fieldNames     : f1,date
    order_header.fieldSeparator : <give the fiels separater , [if it is comma])
    order_header.endSeparator   : 'nl' (if it is new line characters)
    order_item.fieldNames     : i1,i2,.....
    order_item.fieldSeparator : :
    order_item.endSeparator   : 'nl'
    order_Trailer.fieldNames     : t1,t2,.....
    order_Trailer.fieldSeparator : :
    order_Trailer.endSeparator   : 'nl'
    If any of the two structures (header, item or trailer) in the field name is same then we have to use the key field
    Check this link
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID1157374550DB11273870171440820710End?blog=/pub/wlg/3228
    > b) In FCC what will be the values for fieldnames ?
    Check this link
    https://wiki.sdn.sap.com/wiki/display/XI/XI_File_Content
    Regards
    Ramesh

  • One Communication Channel for two XML-Structure

    Hi to all!
    i'm Newbee in XI.
    i register one Communication Channel to recieve two different XML-Structure and when i sent second structure there was a Mapping error, because XI waiting for first XML-Structure.
    I'd like to ask if there are any additional condition that i must tune up to make it possible or just it's impossible?

    Hi,
    Please refer below links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/121b053d-0401-0010-539f-f9295efb7bad
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3a913f71-0601-0010-7a83-dfd3208a9a0b
    how to find the URL of deployed Web services?
    Creating .NET Web service
    http://www.15seconds.com/issue/010430.htm
    Also refer SOAP Framework to generate the common wsdl for both the messages with single SOAP CC
    http://help.sap.com/saphelp_nw04s/helpdata/en/bb/ddb33d2ae46b3be10000000a114084/frameset.htm
    Thanks
    swarup

  • How to use For-Each Structure with Multiple node XML structure

    Hi,
      How to use for-each (BPEL 2.0) construct for Multinode XML structure.
    Here is the easy case: I have list of suppliers specified by supplier
    <supplierList>
    <supplier>1</supplier>
    <supplier>2</supplier>
    <supplier>3</supplier>
    </supplierList>
    Now there is a web service http://hostname/getsupplierdetails/wsdl which accepts one supplier at a time.
    like
    <supplier>1</supplier>
    reponse object is
    <message> notfound/found </message>
    But how can I use for each of XML node to call this service and collect the result like
    <supplierList1>
         <Suppinfo>
            <supplier>1</supplier>
            <message> not found</message>
    </suppinfo>
        <suppinfo>
            <supplier>1</supplier>
            <message> not found</message>
    </suppinfo>
    </supplierlist1>
    Thanks

    For looping you use foreach loop and , loop for the number of occurences and when constructing response, adding a new element you have to use bpelx:append.  Good sample at Enterprise Integration: Oracle SOA Suite 11g: Populating a list or an array in BPEL without using XSLT.

  • Converting XML structure to SQL string

    Hi,
    how can I convert an existing XML structure into a SQL string? It's important to do this manually, because there are additional data necessary to complete the recordset.
    The XML structure is:
    <File>
    <Recordset>
    <Column>Data</Column>
    </Recordset>
    </File>
    The additional data are 4 columns for each recordset to implement into the SQL string.
    The SQL string should be something like
    "INSERT INTO table (Add_Column, Column, Column, Column) VALUES (Add_Data, Data, Data, Data)"
    If anyone has source code performing operations like that I'd be grateful 'cause I'm quite new to Java and have not the experience in such transform ops.

    Which package includes xml sax?You can download it from,
    http://java.sun.com/xml/download.html.
    I can send you some sample pgms too, if you want.If you would, I'd be grateful.
    Marko

  • XML Structure Conversion using JAVA Mapping

    Hi Experts,
    I am having a requirement in which i want to convert the contents of source xml structure into a string and map it to the target field.
    Source Structure:
    <SRC>
    <Node1>ABCD</Node>
    <Node2>XYZ</Node2>
    <Node3>1234</Node>
    </SRC>
    Target Structure:
    <TRG>
    <Node1>ABCDXYZ</Node1>
    </TRG>
    Both the source and target structures are in xml format only.....just the condition is that I have to use Java mapping to achieve it.
    The contents of Source node Node3 are not to be mapped.
    Since I have very less knowledge of Java it will be very helpful if you provide the complete code to me.
    Thanks,
    Abhishek.

    Hello Udo,
    Thank you for reply. It seems ABAP mapping is easier.
    What do you think about the idea of using Value Mapping for such conversion task? In this case is it obligatory to use Java coding? And how about performance - will it be better than in case of ABAP mapping, can you say?
    Thank you,
    Igor

  • XML structure - mapping one Oracle column to many XML attributes

    Hi,
    I need to insert data into EMP table reading from xml file and this is how the file would look like....
    <?xml version='1.0'?>
    <ROWSET>
    <ROW num="1">
    <EMPLOYEE_ID>7369</EMPLOYEE_ID>
    <LAST_NAME>Smith</LAST_NAME>
    <FIRST_NAME>JOHN</FIRST_NAME>
    <PHONE> 905000123</PHONE>
    <PHONE> 905000456</PHONE>
    <PHONE> 905000789</PHONE> ...... n
    (There could be many phone numbers in the xml file and I need to concatenate all the numbers and insert in the PHONE column of emp table)
    <SALARY>800</SALARY>
    </ROW>
    <!-- additional rows ... -->
    </ROWSET>
    I am new to XML and would to know the set of lines required to read the data from xml and insert into EMP table. All this is for Oracle 10g R2.
    Please let me know solution using XSU if possible.

    Hi,
    Chk this:
    /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
    Re: Conversion of source XML structure to single string using PI 7.1
    Thanks
    Amit

  • Convert IDOC XML structure to flat file - and now?

    Hi,
    we are working with input message ORDERS05 and want to convert it to flat file.
    So we used the implementation description from "how to convert an IDOC-XML structure to a flat file....".
    Looks like this is a standard procedure described here fitting for all IDOCs.
    We followed the guide, making XI ready for Abap-Mapping, implemented the Abap class like described, added an interface mapping with source ORDERS05 to a mess.type dummy destination, added with type Abap-class the class implemented from the guide and completed the Int.Dir. implementation.
    For comparism purpose we have two systems as receiver, one with a standard flat file with regular graph.mapping in XI, one with the Abap mapping.
    Result:
    Error description in SXMB_MONI:
    Didn´t expect something like that! The IDOC was delivered successfully to the other simple flat file receiver.
    Any idea what we made wrong (we are on SP17) or if there is a standard mistake you can do when following the guide?
    Best regards
    Dirk

    Hi,
    I've got the same problem. He the solution in my case:
    The problem is:
    My IDOC has no element <STDMES>, but the method IF_MAPPING~EXECUTE from the 'HOW-TO Guide' does not check this situation:
    el_element = idocument->find_from_name('STDMES').
    ls_edidc-stdmes = el_element->get_value().
    thows the exception.
    Solution:
    make shure that the field STDMESis set or change the method to:
    el_element = idocument->find_from_name('STDMES').
    if not el_element is initial.
        ls_edidc-stdmes = el_element->get_value().
    endif.
    Best regards
    Dieter

  • Converting string data from a web service respons into XML structure of XI

    Hi,
    We receive a string structure from a web service.
    The string structure has an xml type format, that is all the tags and its content are in one line .
    The WSDL file of the webservice defines its response structure as a string type.
    How do i convert this string into proper XML structure (predefined by me in Integration repository).
    OR how do i make XI understand this string as an XML structure for further processing.
    Later i have to map this XML message type into IDoc.
    Himani

    Hi Himani,
    Please find the code for ur requirement -
    String need to parse -<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>
    Below mentioned code will convert it to -<MT_DATA><FROMDATE>20080202</FROMDATE><TODATE>20080101</TODATE></MT_DATA>
    Create a Message type and map it like this using java mapping ( no need to use Graphical mapping).
    Use MT_DATA as source and map it to your target structure .
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.StringReader;
    import java.util.HashMap;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.TransformerFactoryConfigurationError;
    import org.w3c.dom.DOMException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    public class XMLParser {
         private Map param = null;
         public static void main(String[] args) {
              try {
                   XMLParser wdb = new XMLParser();
                   wdb.parse();
              } catch (Exception e) {
                   e.printStackTrace();
         public void setParameter(Map param) {
              this.param = param;
              if (param == null) {
                   this.param = new HashMap();
         public void parse() {
              String document = "<response_webservice><from_date>20080101</from_date><to_date>20080202</to_date></response_webservice>";
              try {
                   Document sdoc;
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   // Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   // parse using builder to get DOM representation of the XML file
                   sdoc = db.parse(new InputSource(new StringReader(document)));
                   Element docEle = sdoc.getDocumentElement();
                   NodeList nl = docEle.getElementsByTagName("from_date");
                   Element lstElmnt = (Element) nl.item(0);
                   NodeList nl1 = docEle.getElementsByTagName("to_date");
                   Element fstElmnt = (Element) nl1.item(0);
                   System.out.println(fstElmnt.getFirstChild().getNodeValue());
                   System.out.println(lstElmnt.getFirstChild().getNodeValue());
                   Document tdoc = db.newDocument();
                   Element structure = createElement("MT_DATA", null, tdoc);
                   tdoc.appendChild(structure);
                   Element statement = createElement("FROMDATE", fstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement);
                   Element statement2 = createElement("TODATE", lstElmnt.getFirstChild().getNodeValue(), tdoc);
                   structure.appendChild(statement2);
                   System.out.println("Struct is :::"+tdoc.getDocumentElement().toString());               
              } catch (DOMException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              }  catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (FactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (ParserConfigurationException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SAXException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (TransformerFactoryConfigurationError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         static Element createElement(String elementName, String content,
                   Document document) {
              Element returnElement;
              returnElement = document.createElement(elementName);
              if (content != null) {
                   Text T = document.createTextNode(content);
                   returnElement.appendChild(T);
              return returnElement;
         static Element createElement(String elementName, String content,
                   String attributeName, String attributeValue, Document document) {
              Element returnElement = createElement(elementName, content, document);
              returnElement.setAttribute(attributeName, attributeValue);
              return returnElement;
    Regards,
    Kishore

  • Mapping flat xml file to xml Structure

    Hi all,
    i have to map an xml file, wich is incoming via a RFC call in a flat import field, to a xml-Structure. The xml Structure has the same Structure except that it is not flat but even as a xml-Structure in the Repository. Ist ther a way to make a 1:1 - Mapping?
    Regards Mathias

    Hi,
    This can be done very easily using Java Mapping.
    Parse the flat xml String using Dom4j and directly set this as the target structure.
    eg code:
    public void execute(InputStream in, OutputStream out) throws StreamTransformationException{
    String flatXml = "the flat xml string";
    Document doc = DocumentHelper.parseText(flatXml) ;
    out.write(doc.asXML().getBytes());
    Regards,
    P.Venkat

  • How to map a deep xml structure to flat structure

    Hi, I'm trying to map a deep xml structure to a flat file structure. See this:
    <SalesPoint>
             <header>
                  <idTx></idTx>
                  <opCode></opCode>
             </header>
             <body>
              <DataSet>
                   <codOperacion></codOperacion>
                   <codCanalDeVenta></codCanalDeVenta>
                   <cuitDeposito>
                   <docMinorista>
                   <fechaOperacion>
                   <codCC>
                   <Details>
                         <Dato>
                                        <nroSerieEquipo></nroSerieEquipo>
                            <codNMU></codNMU>
                            <codOrigenEquipo></codOrigenEquipo>
                            <codConcepto></codConcepto>
                             <codSegmento></codSegmento>
                            <motivoSiniestro></motivoSiniestro>
                         </Dato>
                   </Details>
              </DataSet>
             </body>
    </SalesPoint>
    to:
    <SalesPoint>
            <idTx></idTx>
            <opCode></opCode>
         <codOperacion></codOperacion>
         <codCanalDeVenta></codCanalDeVenta>
         <cuitDeposito></cuitDeposito>
         <docMinorista></docMinorista>
         <fechaOperacion></fechaOperacion>
         <codCC></codCC>
            <nroSerieEquipo></nroSerieEquipo>
            <codNMU></codNMU>
         <codOrigenEquipo></codOrigenEquipo>
         <codConcepto></codConcepto>
         <codSegmento></codSegmento>
         <motivoSiniestro></motivoSiniestro>
    </SalesPoint>
    Thanks in advance!!!!

    I do not think this is a complex XML structure. All that you need to take care is about the contexts. How ever it is not possible to give u the complete mapping here. If you have tried mapping already and facing some issues.. please put it here.. so that some one can help you.
    VJ

  • Query Regarding Occurance in xml structure

    Hi frnds,
    I have an xml structure like this both on inbound and outbound
    MT_ORDER1
    -- Node1 (0:1)
         Val;period(1:10)
    ---Node2 (1:1)
    While trying to test this when i dont give any value for node1 its throwing up an error saying dont have enough values in the queue to produce target element..when we give value for the node its able to pass successfully..
    but the occurance of node1 is 0:1 rite.. do i need to change its occurance in PI?

    No,
    What is your structure, what you have posted bit confusing ,i am asuming your structure like below, Node1 not element right?
    MT_ORDER1
    Node1 (0:1)
         Valperiod(1:10)
      Node2 (1:1)
    Regards,
    Raj

Maybe you are looking for