How to change XML Header in  file

Hi,
How to have the following XML output header XML with simple transformation:
<?xml version="1.0"> encording="ISO-8859-1"?>
When I used the following transformation template:
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
I get the following output header and file is not readable.
<?xml version="1.0" encoding="utf-16" ?>
If i call tranformation without encoding option file is creted and readable. Does there is any impact on functionality if file is without header.
Thanks
anya

Hi,
you could use the below alternative solution also as some Web services do not accept the message , if Content type is application/XML in the HTTP Header, it will accept only Text/XML. So While calling the Web service, the content has to be changed, This is possible using Module of the adapter as shown in the screen shot.
HTTP Header field values before using the module
User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505
content-id: [email protected]
content-type: application/xml
Content-Length: 1280
Module name - localejbs/AF_Modules/MessageTranspormationBean
Type - Local Enterprise Bean Module - This is defined by the user, but the same name should be given in the module configuration for passing the parameters. In this case “transform” In the module configuration ,
Module key - In this case “transform”
Parameter name - Transform.ContenType
Parameter Value - text/xml;charset=utf-8
Here you could use the required parameters and pass the values....:-))
Thanks
Swarup

Similar Messages

  • How to change the default "Safe" files in Safari?

    I would really appreciate if anybody could teach me how to change the default "Safe" files using AppleScripts, Folder Actions or .plist files. I really would like to have some files to open automatically after download, specially .pps files, and safari doesn't recognize such files as "safe". I tried to find out reading the help files but got lost.
    I posted a reply in an old topic for somebody who seemed to know, but it was not related to that topic, so I decided to open a new one.
    I'll be gratefull for any help. Thanks.

    Hi MDRC,
    Have a read of [this topic|http://discussions.apple.com/thread.jspa?threadID=1237961] to see if that helps.

  • How to change the default password file's name and path when the database created?

    how to change the default password file's name and path when the database created?
    null

    Usage: orapwd file=<fname> password=<password> entries=<users>
    where
    file - name of password file (mand),
    password - password for SYS and INTERNAL (mand),
    entries - maximum number of distinct DBA and OPERs (opt),
    There are no spaces around the equal-to (=) character.

  • In R12 how to change concurrent output/log file name prefix?

    how to change concurrent output/log file name prefix?

    but i want to change change concurrent output/log file name prefix?You cannot, and I believe it is not supported for all concurrent requests -- Please log a SR to confirm this with Oracle support.
    Thanks,
    Hussein

  • How to change the output executable file name(a.prj:(output)--- b.exe)

    LabWindows / CVI: how to change the output executable file name
                For example, I have an A project a.prj, I do not want to compile the output file is a.exe, but b.exe.
    I will try to save as a.prj b.prj, a.cws save as b.cws
    eg:a.prj  ---->(output)--->b.exe
    Solved!
    Go to Solution.

    You can go to Build >> Target Settings menu item, select Release (or Release 64) in the Configuration filed and set the name of the executable to create in Application FIle field, withouyt need to change the prj or cws filename.
    See the complete description of available options here.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to Change Journal Header name to Custom Header Name while GL Importing?

    Hello Experts,
    I am in situation where customer wanted to keep their own journal header naming conventions to imported journals in Oracle GL for custom Journal sources.
    As I know while importing journals, Oracle Creates the Journal Name based on the below mentioned logic.
    "Journal Import creates a default journal entry name using the following format:
    (Optional User-Entered REFERENCE4)(Category Name)(Currency)
    (Currency Conversion Type, if applicable)
    (Currency Conversion Rate, if applicable)
    (Currency Conversion Date, if applicable) (Encumbrance Type ID, if applicable)
    (Budget VersionID, if applicable). If you enter a journal entry name,
    Journal Import prepends the first 25 characters of your journal entry name to
    the above format"
    But then How it is possible to only allow journal header Name to be used present in REFERENCE4 excluding all other string provided by Oracle? Instead of using omitted string custmoer wanted to keep their own parameters. Example - REFERENCE4.A.B.C etc.
    Is it possible to solve this using seeded setup or modifying some hook packages or anything else?
    As far as I know there can be one workaround to be use of updating journal header name after journal import being completed successfully for custom journal source. But only fear is Oracle doesnt allow updating the base table without API. Am I rght?
    So it would be really great if anyone of you can suggest the best solution or best possible workaround.
    Thanks

    Duplicate - How to Change Journal Header name to Custom Header Name while GL Importing?

  • How to store xml data into file in xml format through java program?

    HI Friends,
    Please let me know
    How to store xml data into file in xml format through java program?
    thanks......
    can discuss further at messenger.....
    Avanish Kumar Singh
    Software Engineer,
    Samsung India Development Center,
    Bangalore--560001.
    [email protected]

    Hi i need to write the data from an XML file to a Microsoft SQL SErver database!
    i got a piece of code from the net which allows me to parse th file:
    import java.io.IOException;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import org.apache.xerces.parsers.SAXParser;
    import java.lang.*;
    public class MySaxParser extends DefaultHandler
    private static int INDENT = 4;
    private static String attList = "";
    public static void main(String[] argv)
    if (argv.length != 1)
    System.out.println("Usage: java MySaxParser [URI]");
    System.exit(0);
    String uri = argv[0];
    try
    XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    MySaxParser MySaxParserInstance = new MySaxParser();
    parser.setContentHandler(MySaxParserInstance);
    parser.parse(uri);
    catch(IOException ioe)
    ioe.printStackTrace();
    catch(SAXException saxe)
    saxe.printStackTrace();
    private int idx = 0;
    public void characters(char[] ch, int start, int length)
    throws SAXException
    String s = new String(ch, start, length);
    if (ch[0] == '\n')
    return;
    System.out.println(getIndent() + " Value: " + s);
    public void endDocument() throws SAXException
    idx -= INDENT;
    public void endElement(String uri, String localName, String qName) throws SAXException
    if (!attList.equals(""))
    System.out.println(getIndent() + " Attributes: " + attList);
    attList = "";
    System.out.println(getIndent() + "end document");
    idx -= INDENT;
    public void startDocument() throws SAXException
    idx += INDENT;
    public void startElement(String uri,
    String localName,
    String qName,
    Attributes attributes) throws SAXException
    idx += INDENT;
    System.out.println('\n' + getIndent() + "start element: " + localName);
    if (localName.compareTo("Machine") == 0)
    System.out.println("YES");
    if (attributes.getLength() > 0)
    idx += INDENT;
    for (int i = 0; i < attributes.getLength(); i++)
    attList = attList + attributes.getLocalName(i) + " = " + attributes.getValue(i);
    if (i < (attributes.getLength() - 1))
    attList = attList + ", ";
    idx-= INDENT;
    private String getIndent()
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < idx; i++)
    sb.append(" ");
    return sb.toString();
    }// END PRGM
    Now , am not a very good Java DEv. and i need to find a soln. to this prob within 1 week.
    The next step is to write the data to the DB.
    Am sending an example of my file:
    <Start>
    <Machine>
    <Hostname> IPCServer </Hostname>
    <HostID> 80c04499 </HostID>
    <MachineType> sun4u [ID 466748 kern.info] Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 360MHz) </MachineType>
    <CPU> UltraSPARC-IIi at 360 MHz </CPU>
    <Memory> RAM : 512 MB </Memory>
    <HostAdapter>
    <HA> kern.info] </HA>
    </HostAdapter>
    <Harddisks>
    <HD>
    <HD1> c0t0d0 ctrl kern.info] target 0 lun 0 </HD1>
    <HD2> ST38420A 8.2 GB </HD2>
    </HD>
    </Harddisks>
    <GraphicCard> m64B : PCI PGX 8-bit +Accel. </GraphicCard>
    <NetworkType> hme0 : Fast-Ethernet </NetworkType>
    <EthernetAddress> 09:00:30:C1:34:90 </EthernetAddress>
    <IPAddress> 149.51.23.140 </IPAddress>
    </Machine>
    </Start>
    Note that i can have more than 1 machines (meaning that i have to loop thru the file to be able to write to the DB)
    Cal u tellme what to do!
    Even better- do u have a piece of code that will help me understand and implement the database writing portion?
    I badly need help here.
    THANX

  • How to change the header and footer in the Section Breaks Next Page using OpenXML?

    I have a word document file in which I added a Section Break of Next Page, now I want to change the header and footer of that page.
    Scenario of example, I have a doc file which has four pages with headers and footers and added fifth page in the section break next page, I want to change the header and footer of the fifth page only. This is achievable manually by deselecting the Link to Previous
    button in the Word Application but I don't know how to change it using XML?
    My code that adds the new page in the section breaks is:
    class Program
    static void Main(string[] args)
    string path = @"C:\Riyaz\sample.docx";
    string strtxt = "Hello This is done by programmatically";
    OpenAndAddTextToWordDocument(path,strtxt);
    public static void OpenAndAddTextToWordDocument(string filepath, string txt)
    using (DocX document = DocX.Load(@"C:\Riyaz\sample.docx"))
    document.InsertSectionPageBreak();
    Paragraph p1 = document.InsertParagraph();
    p1.Append("This is new section");
    document.Save();
    Please help.

    Here is the sample for your reference:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using DocumentFormat.OpenXml;
    using DocumentFormat.OpenXml.Packaging;
    using DocumentFormat.OpenXml.Wordprocessing;
    namespace WordAddNewFooterHeader
    class Program
    static void Main(string[] args)
    string path = @"E:\Document\TestHeaderandfooter-Copy.docx";
    string strtxt = "OpenXML SDK";
    OpenAndAddTextToWordDocument(path, strtxt);
    public static void OpenAndAddTextToWordDocument(string filepath, string txt)
    // Open a WordprocessingDocument for editing using the filepath.
    WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(filepath, true);
    MainDocumentPart part = wordprocessingDocument.MainDocumentPart;
    Body body = part.Document.Body;
    //create a new footer Id=rIdf2
    FooterPart footerPart2 = part.AddNewPart<FooterPart>("rIdf2");
    GenerateFooterPartContent(footerPart2);
    //create a new header Id=rIdh2
    HeaderPart headerPart2 = part.AddNewPart<HeaderPart>("rIdh2");
    GenerateHeaderPartContent(headerPart2);
    //replace the attribute of SectionProperties to add new footer and header
    SectionProperties lxml = body.GetFirstChild<SectionProperties>();
    lxml.GetFirstChild<HeaderReference>().Remove();
    lxml.GetFirstChild<FooterReference>().Remove();
    HeaderReference headerReference1 = new HeaderReference() { Type = HeaderFooterValues.Default, Id = "rIdh2" };
    FooterReference footerReference1 = new FooterReference() { Type = HeaderFooterValues.Default, Id = "rIdf2" };
    lxml.Append(headerReference1);
    lxml.Append(footerReference1);
    //add the correlation of last Paragraph
    OpenXmlElement oxl = body.ChildElements.GetItem(body.ChildElements.Count - 2);
    ParagraphProperties paragraphProperties1 = new ParagraphProperties();
    SectionProperties sectionProperties1 = new SectionProperties() { RsidR = oxl.GetAttribute("rsidR", oxl.NamespaceUri).Value };
    HeaderReference headerReference2 = new HeaderReference() { Type = HeaderFooterValues.Default, Id = part.GetIdOfPart(part.HeaderParts.FirstOrDefault()) };
    FooterReference footerReference2 = new FooterReference() { Type = HeaderFooterValues.Default, Id = part.GetIdOfPart(part.FooterParts.FirstOrDefault()) };
    PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U };
    PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
    Columns columns1 = new Columns() { Space = "720" };
    DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };
    sectionProperties1.Append(headerReference2);
    sectionProperties1.Append(footerReference2);
    sectionProperties1.Append(pageSize1);
    sectionProperties1.Append(pageMargin1);
    sectionProperties1.Append(columns1);
    sectionProperties1.Append(docGrid1);
    paragraphProperties1.Append(sectionProperties1);
    oxl.InsertAt<ParagraphProperties>(paragraphProperties1, 0);
    body.InsertBefore<Paragraph>(GenerateParagraph(txt, oxl.GetAttribute("rsidRDefault", oxl.NamespaceUri).Value), body.GetFirstChild<SectionProperties>());
    part.Document.Save();
    wordprocessingDocument.Close();
    //Generate new Paragraph
    public static Paragraph GenerateParagraph(string text, string rsidR)
    Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = rsidR };
    ParagraphProperties paragraphProperties1 = new ParagraphProperties();
    Tabs tabs1 = new Tabs();
    TabStop tabStop1 = new TabStop() { Val = TabStopValues.Left, Position = 5583 };
    tabs1.Append(tabStop1);
    paragraphProperties1.Append(tabs1);
    Run run1 = new Run();
    Text text1 = new Text();
    text1.Text = text;
    run1.Append(text1);
    Run run2 = new Run();
    TabChar tabChar1 = new TabChar();
    run2.Append(tabChar1);
    paragraph1.Append(paragraphProperties1);
    paragraph1.Append(run1);
    paragraph1.Append(run2);
    return paragraph1;
    static void GenerateHeaderPartContent(HeaderPart hpart)
    Header header1 = new Header();
    Paragraph paragraph1 = new Paragraph();
    ParagraphProperties paragraphProperties1 = new ParagraphProperties();
    ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" };
    paragraphProperties1.Append(paragraphStyleId1);
    Run run1 = new Run();
    Text text1 = new Text();
    text1.Text = "";
    run1.Append(text1);
    paragraph1.Append(paragraphProperties1);
    paragraph1.Append(run1);
    header1.Append(paragraph1);
    hpart.Header = header1;
    static void GenerateFooterPartContent(FooterPart fpart)
    Footer footer1 = new Footer();
    Paragraph paragraph1 = new Paragraph();
    ParagraphProperties paragraphProperties1 = new ParagraphProperties();
    ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Footer" };
    paragraphProperties1.Append(paragraphStyleId1);
    Run run1 = new Run();
    Text text1 = new Text();
    text1.Text = "";
    run1.Append(text1);
    paragraph1.Append(paragraphProperties1);
    paragraph1.Append(run1);
    footer1.Append(paragraph1);
    fpart.Footer = footer1;
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to change XML Tag sequence in XML Publisher Reports

    Hi Experts,
    I am working on XML Publisher reports, EBS 11I and Database 9i. I have standard report 'PO Printed Purchase Order Report (XML)', it's output type is XML. I want to change the sequence of groups in XML file.
    I am getting XML tags like below at present:
    LIST_G_HEADERS \ G_HEADERS \ LIST_G_HEADER_NOTES
    I want to change the sequence of groups like below.
    LIST_G_HEADERS \ G_HEADERS \ LIST_G_LINES \
    Could somebody help me how to change the sequence of XML Groups.
    Thanks in advance.

    Paul,
    This works.  Thanks!
    I am still working through the implications of having a data connection defined.  I notice that every time I submit, it creates two records in my database, one with all the fields blank, and one with the data and attachment.
    I will have to do some more digging into the double submission, but at least it is uploading the file.
    Thanks again,
    Ed

  • How to change xml declaration using jaxb Marshaller

    please, my xml declaration, in the output file generated by jaxb: javax.xml.bind.Marshaller is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    I need to change it in:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="style.xsl"?>
    I don't have idea about how to change.
    thanks a lot alessandro

    Hello.
    public void saveJaxbObjectToFile(String packageName, Object myJaxbObject, String fileName)
    throws JAXBException, ParserConfigurationException, TransformerConfigurationException,
    TransformerException, FileNotFoundException, IOException {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();
    org.w3c.dom.Document document = db.newDocument();
    JAXBContext jAXBContext = JAXBContext.newInstance(packageName);
    Marshaller m = jAXBContext.createMarshaller();
    m.marshal(myJaxbObject, document);
    ProcessingInstruction processingInstruction = document.createProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"style.xsl\"");
    Node rootElement = document.getDocumentElement();
    document.insertBefore(processingInstruction, rootElement);
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer = transformerFactory.newTransformer();
    transformer.setOutputProperty("indent", "yes");
    transformer.setOutputProperty("encoding", "UTF-8");
    transformer.setOutputProperty("version", "1.0");
    FileOutputStream fos = new FileOutputStream(fileName);
    transformer.transform(new DOMSource(document), new StreamResult(fos));
    fos.flush();
    fos.close();
    Good luck.

  • How to change default application in file context menu

    I know you can change the application that opens a file in the file;s info window (command i) and then double clicking the file opens it in that application. However the context menu still shows the same original default application. How to change what is shown as default in context menu?

    You can't. You can change the default app in Get Info which will change the first listed app in the context menu to that default app. How the context menu is built is not under user control.

  • How to change numbers of PDF file in Adobe Acrobat Pro Extended #9

    I just combined 3 PDF files that had their own numbering into one. I have searched how to change this file into a consecutive numbering with no success. I do the steps outlined to open the Number options, but when filling in the blanks, and making choices, nothing changes on the pages ... just in the thumbnail section.
    HELP!

    Post your question in a forum for Acrobat. Adobe Reader can't change page numbers.

  • How to change column heading in line item report

    Hello Experts,
    How to change the column heading in the line item report CJI4 or CJI3  ?
    for eg: The field WBS will show as Object in the heading. Here  I would like to change to WBS.
    Is there a way to do this without changing ABAP code
    FATMAN

    Not possible through standard I guess.
    Enhancement you should be looking is COOMEP01 which includes the component EXIT_SAPLKAEP_009
    i.e., Line Item Reports: Customer-specific Formatting of the Lists.You use this enhancement to modify column headings.
    Regards
    Sreenivas

  • How to change name of uploaded file

    I am using the a multi-part form and the pl/sql gateway to enable users to upload files to portal. The files automatically get stored in the wwdoc_document$ table. The key to the file is a column called "name" which consists of a sequence number and the file type e.g. 4747.gif.. I want to change this name to a different value.
    When I change it using the standard sql Update statement, none of the pdk apis work on the record; they all return errors. I am able to change this value as long as I use a unique value, I just can't run any of the wwdoc apis against the row after that.
    Does anyone know how to change this value for a given row???
    Mike Kleiman

    See Upload taglib in Coldtags suite:
    http://www.servletsuite.com/servlets/uptag.htm

  • How to catch XML Publisher bursted file from Workflow

    Hello,
    I have to catch xml publisher bursted file in oracle workflow and send it as the content of mail (not like attachment).
    Does anyone know if this is possible and how can I do it?
    Any help is appreciated, thanks in advance!
    Regards
    Ive

    oracle seeded XDO regions is available to integrate concurrent program in the page.
    You got to extend this RN oracle.apps.xdo.oa.common.DocumentViewerRn.xml
    And oracle.apps.xdo.oa.common.DocumentHelperAPI, should help you to download or View from the page
    Its straight forward , given in the doc i guess.
    Let me pull the metalink note for this.

Maybe you are looking for

  • How to use a batch file to ...

    Every time I go winlogo + R, cmd. I have to do two things quick religiously which get to be a pain. I am wondering if there is any way to set these properties to be remembered staticly or as a "last used" option of some sort. I first of course have t

  • IBooks Author strips tab stops from Table of Contents

    Tab stops that are generated from section names are stripped from published iBooks Author files.   When I click on Table of Contents in iBooks Author, I can see it exactly like it should be.  Please see the screenshot that I have uploaded tabs.jpg. 

  • HT201363 I have never seen the rescue email address i don't know what it is!

    Okay so my apple id has asked me to verify my security questions, i made the id so long ago that i can't remember the questions! i was going to send it my my rescue email but i dont know what the email is and i have never seen the email address befor

  • Item category TA YTAK cannot be invoiced with billing type F2

    Hi Experts, Error message in creating billing I did not make shipment and directly make delivery PGI This is transportation relevance showing in delivery. Is this reason preventing from creating F2 blling type? I am getting error for item category YT

  • Slow after RAM-upgrade

    My PB 1.33 GHz PB has slowed down A LOT after switching RAMs to a larger piece. These are the specs of the module: "Kingston ValueR DDR SO-DIMM PC2700 1024MB Non-ECC, 2.5V, 128M x 64, 200p, CL2.5" The machine slows down continuously after some use to