Append XML version tag to PAYLOAD

Hi,
I wanted add XML tag <? xml version="1" conversion="UTF-8"?> to my payload.
please suggest me the way to achieve it.
I tried ora:toCDATA but could not achieve it.
Thanks,
Arun Jadhav.

may b try getting your payload as string using ora:getContentAsString as use a concat operation and add your content and the parse it to XML using parasedEscapedXML
Edited by: Oraacler on May 9, 2010 12:01 PM

Similar Messages

  • Delete xml messagetype tag and xml versioning tag in target xml file

    Hi experts.
    i want to delete the xml version, starting (<MT_ZMPSSERRMSGMST_SEND>*and ending </MT_ZMPSSERRMSGMST_SEND> tags in below message.
    here i am bold the tags which i want to delete. please help me how to delete this.
    <?xml version="1.0"; encoding="UTF-8"?>
    <MT_ZMPSSERRMSGMST_SEND>
       <MESSAGE>
          <TABLENAME/>
          <ACTION/>
          <RECORD>
             <ERRORID/>
             <ERRCLASSID/>
             <SHORTDESC/>
             <DESCRIPTION/>
             <RESOLVE/>
          </RECORD>
       </MESSAGE>
    </MT_ZMPSSERRMSGMST_SEND>

    Hi Srinivas,
    You can delete the required content of the XML by editing the XML.
    Develop a custom adapter module and use the below code to edit the xml and deleting the highlighted content
    // to read the input XML
    strData = xmlData.getText();
    // get the length of <?xml version="1.0"; encoding="UTF-8"?> <MT_ZMPSSERRMSGMST_SEND>
    int strheaderlength = (strData.substring(0,strData.indexOf("<Message>")).length());
    // read the data from <MESSAGE>  to </MESSAGE>
    String payload=strData.substring(strheaderlength,strData.startIndexOf("</MT_ZMPSSERRMSGMST_SEND>"))
    // set the new payload to xmlData
    xmlData.setText(payload);
    appreciate if useful

  • Append xml elements to a file

    Ok. After solve the problem of append to files using a file adapter in osb (Re: Write/Append text file with OSB now i want to know if there is some way to append elements to an existant xml. For each request i will have the following message:
    <root_node>
    <msg>
    <element />
    <element />
    <inner>
    <inner_data />
    </inner>
    <inner>
    <inner_data />
    </inner>
    <msg>
    </root_node>
    And, for two requests ai want to log:
    <root_node>
    <msg>
    <element />
    <element />
    <inner>
    <inner_data />
    </inner>
    <inner>
    <inner_data />
    </inner>
    <msg>
    <msg>
    <element />
    <element />
    <inner>
    <inner_data />
    </inner>
    <inner>
    <inner_data />
    </inner>
    <msg>
    </root_node>
    And no:
    <root_node>
    <msg>
    <element />
    <element />
    <inner>
    <inner_data />
    </inner>
    <inner>
    <inner_data />
    </inner>
    <msg>
    </root_node>
    <root_node>
    <msg>
    <element />
    <element />
    <inner>
    <inner_data />
    </inner>
    <inner>
    <inner_data />
    </inner>
    <msg>
    </root_node>
    As i'm doing (in my tests).
    Thank you.

    do you want to append/insert nodes in the file
    or do you want to construct that xml first in the osb and after that insert the xml in the file ?
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html
    Message Processing Actions
    Insert activity
    you can use the insert activity to insert/append xml parts in your payload, and when the format is done, write it to the file

  • Delete xml version in xml file

    Hello,
    I have a strange thing to do. I need to delete xml version tag (<?xml version="1.0" encoding="utf-8" ?>) from en xml file. I use a receiver file adapter and I want to know how it's possible to delete this tag.
    I need to do that as receiving application collects xml messages and adds xml version in collected xml file.
    Thanks in advance,
    Cédric

    hi Udo,
    >>>and clever...
    so it should be you who proposed it:)
    BTW
    I'm not sure if with XSLT you won't have to
    do it in the commnication channel (and not in the interface mapping) - (the xslt mapping)
    but I cannot test it right now
    Regards,
    michal

  • Unable to pass XMlL version tag to the backend from Proxy Service

    Hi All,
    I have problem in sending xml version tag "<?xml version="1.0" encoding="UTF-8"?>" to a backend as my backend is expecting the input along with the xml version tag.
    I have done with following thing but that doesnot work for me:
    1)What is happening when i am trying to insert the xml tag inside a body.The body is not able to recognise the same and it construct the request without the versioning tag.
    2)In assign node i have tried putting the version tag but here tag is reflected inside the body with "&lt;?xml version="1.0" encoding="UTF-8"?>" it means internally it is making it serialize the and make the starting angle bracket as an HTML tag.In this scenario my backend throws an error "unable to parse the xml".
    3)I have tried with CDATA also but here also the same thing is happening as in case 2.
    Please help me if nay one knows the solution for this.
    Regards,
    Rajeev Goel

    yes. u can pass the parameter by below code
    var myProxy =SOAP.connect('http://localhost:100/Service1.asmx?WSDL');
    var value1="hai";
    var result=myProxy.Helloworld(serverValue:value1);
    app.alert(result);
    The web service Helloworld Method should be like
    string Helloworld(string serverValue)
    return serverValue+" EveryBody";

  • How to change XML version in outbound XML file generated in XI

    Hi, I am getting following two records in the beginnning of my out bound XML file.
    <?xml version="1.0" encoding="utf-8" ?>
    <ns0:MT_WPUUMS01_Salesdata xmlns:ns0="http://ws-sapretail-pos.com/salesdata">
    Is there any control in XI to modify these two lines, in outbound files.
    Also, for inbound files, is there any way to process messages successfully, even if XML files from other systesm comes in different formats (xml version tag and nso tag lines)

    <?xml version="1.0" encoding="utf-8" ?>
    <ns0:MT_WPUUMS01_Salesdata xmlns:ns0="http://ws-sapretail-pos.com/salesdata">
    these two lines will be added when you create the  Message type name
    MT_WPUUMS01_Salesdata  is the message type name
    http://ws-sapretail-pos.com/salesdata"> is the name of your namespace......
    so if you want to chage these two lines in each XML build your MT and namespace accordingly.......
    even when you are importing the XML from o ther systems, you dnt have to worry about these tages as you import them in external definitation and select them only in message interface........should not be a problem if you import the XML from other systems
    whole conecpt is when you add these two lines it will convert the XSD to XML so when you have the XML form other system you only need to crer ate the WSDL out of it...
    let me know if i am not clear or if i understood your question wrong....

  • Append messages with out header tag " ?xml version="1.0" encoding="UTF-8"?

    Hi all,
    I am doing file to file scenario.When I use APPEND in the File adapter it is also adding <?xml version="1.0" encoding="UTF-8" ?>
    I need to send a file for every 10 minutes consolidate all files and send at the end of the day.
    <?xml version="1.0" encoding="UTF-8" ?>
    <ID>31154</ID>
    The next time when i send the file with different< ID>31155</ID>
    it should append ignoring <?xml version="1.0" encoding="UTF-8" ?>
    The consolidated file must look like this...
    <?xml version="1.0" encoding="UTF-8" ?>
    <ID>31154</ID>
    < ID>31155</ID>
    Thanks ,
    Srinivas

    Hey
    as pointed out by everyone else,there is no straight way for this,one thing u can do is that create two separate scenarios.
    in first scenario use content conversion on receiver side and keep on appending the text for 10 mins (guess this is ur pooling interval),now since ur using FCC u wont get <?xml version="1.0" encoding="UTF-8" ?>,you will get a flat file on receiver side.
    after 10 mins u can have one more scenario which picks up this flat file and this time use FCC on sender side so that it will convert this flat file to XML,in this way you will get <?xml version="1.0" encoding="UTF-8" ?> only once.
    hope this solves ur problem.
    just make sure that you specify correct polling intervals for both the scenarios.
    thanx
    ahmad

  • Append with out duplicates ?xml version="1.0" encoding="UTF-8"? in receiv

    Hi,
    When I am Using append mode in file adapter,for each file that i send a seperate <?xml version="1.0" encoding="UTF-8"?>  tag is getting generated in the target.
    eg:
    File 1
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e1</name>
    </DEPT>
    File 2
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e2</name>
    </DEPT>
    Result
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e1</name>
    </DEPT>
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e2</name>
    </DEPT>
    Here <?xml version="1.0" encoding="UTF-8"?> tag is repeated.
    How to remove the same from 2nd time.so that my output file is displayed as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <DEPT>
    <name>e1</name>
    </DEPT>
    <DEPT>
    <name>e2</name>
    </DEPT>
    Thanks in advance
    sree

    Hi
    Did you check the occurence of DEPT Node as 0..unbounded???
    Did You check the output from Test tab of Message Mapping???
    Did You use the Node function in mapping???
    if not
    You better use either Java mapping
    with regards
    Gabriel

  • How to append the declaration tags to generated xml using Xquery

    Hi,
      How to append the declaration tags to generated xml using Xquery.generated XML is like
    <ROOT>
      <CHILD1></CHILD1>
      <CHILD2></CHILD2>
    </ROOT>
    Here I want to append the <?xml version="1.0" encoding="ISO-8859-1"?> and the result xml should be
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ROOT>
      <CHILD1></CHILD1>
      <CHILD2></CHILD2>
    </ROOT>
    Can anybody help to do this.
    Thanks
    Mani

    First assign this element to a temp variable
    <ROOT>
      <CHILD1></CHILD1>
      <CHILD2></CHILD2>
    </ROOT>
    Now in XQuery expression create a new variable
    <?xml version="1.0" encoding="ISO-8859-1"?>
    $temp

  • Leading ? xml version="1.0"? tag when creating / invoking web services

    Hello friends. I'm wondering if anyone has any insight as to why I cannot create
    a fully formed XML document when developing a web service which includes the standard
    <? xml version="1.0" ?> leading tag.
    If I include the leading tag in my XML mapping for a jws method, I am unable to
    compile the service into an ear, getting the following error: "An unexpected
    exception occurred while attempting to process the classes and annotations for
    this Web Service." If I do not include the leading tag, I can compile into an
    EAR file and invoke the web service from a HTTP POST, but I cannot include the
    leading <?xml...> tag in my request. Considering that I'll be asking other vendors
    to submit to my web services and creation of xml documents using DOM or other
    methods automatically generates the <?xml ...>, I'm hoping I'm not going to have
    to tell them to parse out this piece of the files they want to send me. Can anyone
    help?
    Thanks so much!
    CM

    CM,
    I suppose you have set 'http-xml=true' for this to work. For http-xml
    protocol, there is no way to specify the leading <?xml> tag, and hence
    unfortunately the desired functionality cannot be achieved.
    In case, this is very important for you, could you please log a support
    case, and then we can file a bug and ask the Engineering to look into it.
    Thanks,
    Anurag
    "Crackhead Millionaire" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi Anurag -
    Thanks for the response. My problem is that I would like to be able tosubmit
    straight XML (i.e., not SOAP) to a webservice from an application outsideof Weblogic.
    For example, the following code block fails on submission to BEA:
    * Example Simple Integration.
    import java.io.*;
    import java.net.*;
    public class testBEAPost {
    * Null constructor.
    public testBEAPost () {
    super();
    * This method handles creation of a PeopleSoft XML Envelope, wrapping of
    * user input into the envelope, submission of the message to theintegration
    broker
    * and display of the response message to the screen.
    * @created 3.12.2003
    * @param argv java.lang.String[] Standard user entry input
    public static void main(String[] argv) {
    try{
    URL url;
    URLConnection urlConn;
    DataOutputStream printout;
    DataInputStream input;
    // Create the internal XML document which will be to send to BEA.(hardcoded)
    >
    String internalXMLDoc = "<? xml version=\"1.0\"?><newlocationxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><setid>WMS</setid><l
    ocationid>1118UG0000</locationid><description>Electric
    UndergroundLocation</description><exceptionemailaddress>[email protected]<
    /exceptionemailaddress></newlocation>";
    >
    // Define the target URL.
    url = newURL("http://167.75.117.20:7001/WebServices/PeopleSoftWebServices/NewLocation
    Service.jws/createLocation");
    >
    // Open the Conection
    urlConn = url.openConnection();
    // Set necessary connection variables.
    urlConn.setDoInput (true);
    urlConn.setDoOutput (true);
    urlConn.setUseCaches (false);
    // Specify the content type.
    urlConn.setRequestProperty("Content-Type", "text/xml");
    // Send POST output.
    printout = new DataOutputStream (urlConn.getOutputStream ());
    printout.writeBytes (internalXMLDoc);
    printout.flush ();
    printout.close ();
    // Get response data.
    input = new DataInputStream (urlConn.getInputStream ());
    String str;
    while (null != ((str = input.readLine())))
    System.out.println (str);
    input.close ();
    } catch (Exception e)
    System.out.println(e);
    If I run this program, I get a java.io.IOException with the serverreturning a
    500 error code. However, if I strip out the leading <? xml version="1.0"?> tag
    and submit to the web service, it works fine. My program set I createdthis example
    for uses DOM to create the document, so I'm actually creating thedocument, getting
    the String value of it, then parsing out the leading tag beforesubmission. My
    problem is that soon I'll be dealing with third parties who may havetrouble generating
    SOAP requests (don't ask), so I'd like to be able to tell them to generatesimple
    XML documents to send to BEA if at all possible.
    Can you assist? Thanks so much.
    "Anurag Pareek" <[email protected]> wrote:
    CM,
    A SOAP message generated by a Workshop web service, when it acts as a
    client
    to another service, always contains the leading <?xml> tag. Here is a
    sample
    of a SOAP message generated by Workshop:
    POST /TestImport/TestAny/TestAny.jws HTTP/1.0
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
    Protocol 1.0.3705.0; BEA WLW 7.0)
    SOAPAction: "http://www.openuri.org/hello2"
    Host: localhost
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: Keep-Alive
    Content-Length: 398
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <hello2 xmlns="http://www.openuri.org/">
    <o></o>
    </hello2>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    It seems to me that what you are asking for is already there. Could you
    please elaborate your issue further, probably with a sample of a XML
    message
    which you feel is not accepted by Workshop, but should be.
    Thanks,
    Anurag
    "Crackhead Millionaire" <[email protected]> wrote in message
    news:[email protected]...
    Hello friends. I'm wondering if anyone has any insight as to why Icannot
    create
    a fully formed XML document when developing a web service which
    includes
    the standard
    <? xml version="1.0" ?> leading tag.
    If I include the leading tag in my XML mapping for a jws method, Iam
    unable to
    compile the service into an ear, getting the following error: "Anunexpected
    exception occurred while attempting to process the classes and
    annotations
    for
    this Web Service." If I do not include the leading tag, I can compileinto an
    EAR file and invoke the web service from a HTTP POST, but I cannotinclude
    the
    leading <?xml...> tag in my request. Considering that I'll be askingother vendors
    to submit to my web services and creation of xml documents using DOMor
    other
    methods automatically generates the <?xml ...>, I'm hoping I'm notgoing
    to have
    to tell them to parse out this piece of the files they want to sendme.
    Can anyone
    help?
    Thanks so much!
    CM

  • ?xml version="1.0"? tag not appearing as first characters in document

    Hi,
    JSP below successfully creates a XML document but it includes a blank line before the <?xml version="1.0"?> tag.
    This causes my PL/SQL to return a "ORA-20100: Error occurred while parsing: PI names starting with 'xml' are
    reserved." error when using the XMLPARSER package.
    I am outputting the XML to IE5.0 but even if I do a SYSTEM out I get the same blank line before the initial tag.
    There are posts on here that confirm the PI error is caused by the tag not being the first characters in the document, but no solution/fix is provided.
    Any ideas much appreciated.
    JSP Code
    <%@ page import="java.sql.*, oracle.jbo.*, oracle.jdeveloper.cm.*, oracle.jdbc.*,oracle.xml.sql.query.*" %>
    <%String driver="oracle.jdbc.driver.OracleDriver";
    Driver d = new oracle.jdbc.driver.OracleDriver();
    String dbURL="jdbc:oracle:thin:@localhost:1521:mydb";
    String login="i2k";
    String password="fred";
    Connection cn = null;
    cn = DriverManager.getConnection(dbURL,login,password);
    // SQL Statement from URL Parameters
    String sql = request.getParameter("sql");
    if(sql == null){
    sql = "select * from vfi_trans";
    // Create SQL-to-XML Handler
    OracleXMLQuery q = new OracleXMLQuery(cn, sql);
    // Use <TransactionList> as document element for Rowset
    q.setRowsetTag("TransactionList");
    // Use <Transaction> for each row in the result
    q.setRowTag("Transaction");
    // set encoding
    q.setEncoding("iso-8859-1");
    // ensure lower case element names
    q.useLowerCaseTagNames();
    // Generate XML results and write to output
    String xmldoc = q.getXMLString();
    out.println(xmldoc.trim());
    //System.out.println(xmldoc.indexOf("\n"));
    cn.close();%>
    PL/SQL
    PROCEDURE XML_HANDLER2 IS
    -- MODIFICATION HISTORY
    -- Person Date Comments
    vfiURL VARCHAR2(100);
    parser xmlparser.Parser;
    vfiXML xmldom.DOMDocument;
    transactions xmldom.DOMNodeList;
    transactions_found NUMBER;
    curNode xmldom.DOMNode;
    textChild xmldom.DOMNode;
    v_itrans_site vfi_trans.itrans_site%TYPE;
    BEGIN
    dbms_output.put_line('Integrator 2000 Transactions');
    -- This is the URL to browse for an XML-based vfi feed of stories on XML
    vfiURL := 'http://10.1.1.111:7070/i2k25_html/ShowQuery.jsp?sql=select%20*%20from%20vfi_trans';
    -- Set the machine to use as the HTTP proxy server for URL requests
    http_util.setProxy('MYPROXY');
    -- Parse the live XML vfi feed from Moreover.com by URL
    parser := xmlparser.newParser;
    vfiXML := xml.parseURL( vfiURL );
    xmlparser.freeParser(parser);
    -- Search for all <headline_text> elements in the document we recieve
    transactions := xpath.selectNodes(vfiXML,'/TransactionList/ITRANS_ID');
    -- Loop over the "hits" and print out the text of the title
    FOR j IN 1..xmldom.getLength(transactions) LOOP
    -- Get the current <headline_text> node (Note the list is zero-based!)
    curNode := xmldom.item(transactions,j-1);
    -- The text of the title is the first child (text) node of
    -- the <headline_text> element in the list of "hits"
    -- textChild := xmldom.getFirstChild(curNode);
    v_itrans_site := xpath.valueof(curNode, '.');
    dbms_output.put_line('('| |LPAD(j,2)| |') '| | v_itrans_site);
    END LOOP;
    -- Free the XML document full of vfi stories since we're done with it.
    xml.freeDocument(vfiXML);
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END; -- Procedure
    null

    Charles,
    I believe that the blank line is caused by the JSP engine when it strips out the '<%@ page import...>' (replace bracket with brace) statement. God (or at least Larry E) forgive me for posting a link at IBM, but this article speaks to your issue:
    http://www-106.ibm.com/developerworks/library/j-dynxml.html?dwzone=ibm
    Maybe you need to put the <?xml?> tag in the jsp itself and strip it out of your xmldoc before outputting it.
    Good luck.

  • How to remove ?xml version="1.0" encoding="UTF-8"? in receiver payload

    hi experts,
        how to remove <?xml version="1.0" encoding="UTF-8"?> from receiver payload.
    my source srtucture is ,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:entity-data xmlns:ns0="http://www.xxx.com">
    <Customer>
    <CustNo>xxx</CustNo>
    </Customer>
    </ns0:entity-data>
    in receiver payload i dont wont " <?xml version="1.0" encoding="UTF-8"?> "
    i want receiver payload
    <ns0:entity-data xmlns:ns0="http://www.xxx.com">
    <Customer>
    <CustNo>xxx</CustNo>
    </Customer>
    </ns0:entity-data>
    can any one provide me the solution for this.
    regards,
    ganesh

    hi vijayakumar,
         thanx for ur response....

  • Printing ?xml version="1.0"..? tag in xmltype variable

    I created the xmltype "result" by using xmlelement and xmlforest functions in a select query.
    Now I need to add the "<?xml version="1.0" encoding="utf-8"?>" to the xmltype.
    I tried manipulating the clob (result.getclobval()) using dbms_lob.append() ,dbms_lob.write() and dbms_lob.writeappend() functions in various combinations,but nothing seems to work.
    Can anyone help me with this?
    Thanks,
    Aditi

    Hi,
    I want to strip it off because I am apppending the same in a Java Program.
    Please let me know how can it be done.
    Appreciate your inputs.
    Thanks,
    Dibya

  • Client Java Proxy - ?xml version="1.0" encoding="UTF-8" tag missing

    Hi All,
    I have a Java Proxy to File scenario. I am getting the output in the SAP XI but when i check the XML payload <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> is missing from it. Rest of the document is coming fine.
    Any idea how to fix it up?
    Thanks and Regards,
    Anurag Mahendru.

    Here it is:
    Re: ABAP Proxy -> XI - > File on a Website
    As I know, this is still on discussion, if the Java Proxy generation will be replaced by web service proxy generation.
    But existing Java Proxy applications definitivley  will run in PI 7.1 as well.
    Regards
    Stefan

  • Stripping Off ?xml version="1.0" ? tag in the final output XML

    Hi All,
    Is there anyway that we can strip off the tag <?xml version="1.0" ?> from the Final XML generated by BPEL.
    I have commented out<?xml version="1.0" ?> in the XSL mapper file but still it is coming in the output file that is generated.
    Any help or pointer is really appreciated.
    Thanks,
    Dibya

    Hi,
    I want to strip it off because I am apppending the same in a Java Program.
    Please let me know how can it be done.
    Appreciate your inputs.
    Thanks,
    Dibya

Maybe you are looking for

  • Need help for FILE_get_name

    1) For my senario I have to use the function module FILE_GET_NAME. Before using this function module do I configure any thing in 'FILE' transaction. If it is required please let me know the procedure to use this function module

  • Unable to add replication feature in sql server 2012 web edition

    Hi All, We are using SQL Server 2012, Web edition and when it was installed replication is not an added feature so I tried to add this feature but getting below error. Error: There are no SQL Server instances or shared features that can be updated on

  • Cannot connect to the site

    We installed Config manager and only added one admin account. During our install, something happened with Exchange and all of our Domain accounts were deleted during a botched mailbox move. So now, no one is able to access the Config manager sites we

  • When I try to open cs6 it's says my trial is over but I have a years subscription?

    I have paid for a years subscription for cs6 and did so a few months ago and last night it's said my trial has finished. I thought it may not have gone through properly and my girlfriend paid for it all over again. But it's still doesn't work and now

  • Open pdf file in separate window?

    I'm not seeing option to open a link to pdf file in separate window. Is it possible? On this page I would like visitors to be able to open the pdf while continuing to listen to the audio file that's associated with it (audio clips towards bottom of p