XML file with an attached MIME encoded ZIP file

Hi all,
I'm new to SAP WAS and MIME encoding/decoding, and I'm trying to generate an XML file with an attachment which is also MIME encoded.
1) I have dummy files (1.jpg, 2.jpg) and I'm trying to zip these files into one zip file (files.zip).
2) I'm trying to MIME encode/decode this zip file.
3) I'm trying to attach this MIME encoded zip file to existing XML file.
Which FMs could I use to accomplish this?  Your help is very appreciated.
Thank you.
below is a file example that I'm trying to generate.
MIME-Version: 1.0
Content-Type: multipart/mixed;
     boundary="--XXXXboundary text"
Content-Transfer-Encoding: 7bit
This is a multi-part message in MIME format.
--XXXXboundary text
Content-Type: text/xml;
     charset="utf-8"
Content-Transfer-Encoding: 8bit
<?xml version="1.0" encoding="utf-8"?>
<abc/>
<def/>
--XXXXboundary text
Content-Type: application/octet-stream;       name="files.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
UEsDBBQAAAAIAI9EejAs5k34H84DAAYgBAAMAAAAMDAyMjQ5MTEucGRmnLsJWBNJ2zb6jmJIIIFE
BAMIJGEVBSKGRRAhEGQNoGwKYoiAEnYRUFGIkBAQFzYXRNHAAEGQZRy2ATFDUAHfGScSIUwQMMrM
ECGADptA0n/jzLtc//dd51znVAKdru6uqn7q6fu5764qQz

Just create an applet (extend JApplet)... add a JTextArea to it....fill the text area with the text from an XML doc.
To get the text of the XML doc just do something like..
File xmlFile = new File("<path to xml file>");
FileInputStream fis = new FileInputStream(xmlFile);
byte[] bytes = new byte[(int) xmlFile.length()];
fis.read(bytes);
fis.close();
String xmlText = new String(xmlBytes);
textArea.setText(xmlText);
...try something like that (assuming..i understand what it is u want)

Similar Messages

  • I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it.

    I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like.  I am trying to  drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though.  I tried resetting the folder, and deleting the DS files. No luck.

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

  • How can I edit a file which is attached in a pdf file?

    I want to edit a bmp image file which is attached in a pdf file. I have Adobe Acrobat Professional installed. Actually, I have two questions.
    1 How can I change the default viewer of bmp file into Mspaint?
    2 Can I edit it in Mspaint and save it directly?

    1
    open windows explorer and find a .bmp
    right click
    select open with
    choose the program you want from the list
    - or navigate to program if not in list
    check the box that says always use this program
    2
    never tried, don't know

  • Reading a Compressed File from a ZIP File, which is an entry of ZIP File

    Hello, Experts,
    Would it be possible somebody to help me with code example for the following problem?
    I want to read a compressed file from a ZIP file, which is an entry of ZIP File, without extacting/writing files on file system. Is this possible?
    Lets say we have a ZipFile1. There is ZipFile2 inside ZipFile1. And inside ZipFile2 is FileA. The scenario is reading FileA without extracting on file system.
    Thank you in advance for your help.
    Cheers
    RADY

    The classes you want to be using are java.util.zip.ZipInputStream and and ZipEntry from the same package. Construct the ZipInputStream with the input you have for the outer zip. Loop with ZipInputStream.getNextEntry until you find the inner zip you're looking for - that method returns a ZipEntry, and you get the name of the zip entry with ZipEntry.getName. Read the ZipInputStream from that point into some buffer, and read that buffer into a new ZipInputStream - rinse and repeat until you have the contents of the file in the zip in the zip...

  • When i convert a word file with a hyperlinks to a PDF file it doesn't work ?? thanks in advance for helping me

    when i convert a word file with a hyperlinks to a PDF file it doesn't work ?? thanks in advance for helping me

    using microsoft word.
    the hyperlink doesn't work in the pdf file (adobe reader).
    adobe reader xi.
    my operating system windows 8.1.
    the attached screen is appeared.

  • Zip file exxtracting error of these two zip files

    Hi
    i download both zip files. when i click on these zip files, i receive a messeage that "NO ZIP FILE, BAD ZIP FILE OR PART OF A SPANNED/SPLIT ZIP FILE". When i try to extract it again show me error . Please guide me. when i download it , it download very smothly.
    Thanks
    Atiq

    please provide exact filesizes when you report such installation/unzip issues, also, you can compare the md5sum with the one posted on the website.
    sizes / name / md5sum:
    2055432139 RHEL3-DVD1-Oracle-v1.4.zip c571eec50edfd8c032e86cfacc7976cc
    812339260 RHEL3-DVD2-Linux-v1.4.zip 756444bc87871ed52eee9baeb1880390
    for md5sum on windows you can use: http://www.md5summer.com/
    on linux just type md5sum <filename>
    99.99% it's the download, based on the size/md5sum you'll know which zip you'll need to redownload.
    enjoy.

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • Problems with reading XML files with ISO-8859-1 encoding

    Hi!
    I try to read a RSS file. The script below works with XML files with UTF-8 encoding but not ISO-8859-1. How to fix so it work with booth?
    Here's the code:
    import java.io.File;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.net.*;
    * @author gustav
    public class RSSDocument {
        /** Creates a new instance of RSSDocument */
        public RSSDocument(String inurl) {
            String url = new String(inurl);
            try{
                DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document doc = builder.parse(url);
                NodeList nodes = doc.getElementsByTagName("item");
                for (int i = 0; i < nodes.getLength(); i++) {
                    Element element = (Element) nodes.item(i);
                    NodeList title = element.getElementsByTagName("title");
                    Element line = (Element) title.item(0);
                    System.out.println("Title: " + getCharacterDataFromElement(line));
                    NodeList des = element.getElementsByTagName("description");
                    line = (Element) des.item(0);
                    System.out.println("Des: " + getCharacterDataFromElement(line));
            } catch (Exception e) {
                e.printStackTrace();
        public String getCharacterDataFromElement(Element e) {
            Node child = e.getFirstChild();
            if (child instanceof CharacterData) {
                CharacterData cd = (CharacterData) child;
                return cd.getData();
            return "?";
    }And here's the error message:
    org.xml.sax.SAXParseException: Teckenkonverteringsfel: "Malformed UTF-8 char -- is an XML encoding declaration missing?" (radnumret kan vara f�r l�gt).
        at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
        at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
        at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
        at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at getrss.RSSDocument.<init>(RSSDocument.java:25)
        at getrss.Main.main(Main.java:25)

    I read files from the web, but there is a XML tag
    with the encoding attribute in the RSS file.If you are quite sure that you have an encoding attribute set to ISO-8859-1 then I expect that your RSS file has non-ISO-8859-1 character though I thought all bytes -128 to 127 were valid ISO-8859-1 characters!
    Many years ago I had a problem with an XML file with invalid characters. I wrote a simple filter (using FilterInputStream) that made sure that all the byes it processed were ASCII. My problem turned out to be characters with value zero which the Microsoft XML parser failed to process. It put the parser in an infinite loop!
    In the filter, as each byte is read you could write out the Hex value. That way you should be able to find the offending character(s).

  • What to do with phoney iTunes gift cert Zip File? (After I opened it)

    I foolishly opened the Zip file that came along with an email claiming to be an iTunes gift certificate (iT6561.zip).
    I trashed the attachment, and emptied the trash. when I recognized my mistake. But, because i opened it first, I'm worried the next time I open iTunes, my iTunes account information will be stolen.
    How do I get rid of the, now unzipped file that is lurking around in my system? (A spotlight search doesn't locate it). How do protect my iTunes account info next ime I open iTunes?
    If this should be in a different discussio, please let me know where it should.
    Any help is appreciated.

    The tunes that are on the desk top - will they play in iTunes without moving them OR do you get the (!)?
    The thing to be aware of it that the iTunes Library and the iTunes Music Library.xml are what keeps track things for iTunes and other apps. These files by default are in HD>user>User Account>Music>iTunes. If they get moved then iTunes will create 2 new files and all you old info is gone.
    If you are getting the you can try to put the tunes that are on the desktop back into the iTunes Music folder and see if iTunes will find them again.
    If not, then you need to add those tunes that are on the desktop - but not in library. Once ALL the tunes are in one place then you should be able to delete the extras.
    Don't delete the purchased tunes without having a backup of those tunes. iTMS is clear about the download policy. It is a one time download.
    MJ

  • Mail program converts my csv attachment into a zip file that i am unable to open

    when i receive email thecsv attachment is being converted in zip files that i am unable to open does anyone know why this is is happening is this a apple iisue or something to do with my exchange server?

    Exe files are Microsoft Windows executables and will not work on Macs. Your Office 2008 is Microsoft Office 2008 for Mac. That's why it works.

  • File with an Attachment to Mail with an Attachment

    I'm using File adapter and using additional Files option to attach another attachment. I have to send mail out using Mail receiver adapter and should use same attachment name File adapter picked up. I tried several options using MessageTransformBean, PayloadSwapBean etc with no Luck. mail going out to Goole and exchange server as Untitiled.txt . Im using Mail package as Receivers of the mail are dynamic. How can I sent Mail attachment with name dynamically set ?.
    Thanks for any help.
    Krish.
    Edited by: krishvamsi on Oct 15, 2010 1:44 AM

    There are several MIME headers that play a role in how the mail client retrieves the file name of an attachment. This behavior differs among various mail clients.  Some mail clients use the name parameter in the Content-Type header. While some other use the Content-Disposition or Content-Description value as the file name. To avoid potential interpretation problems, it is recommended to combine the use of these headers. Ideally, your mail header should look something like :
    Content-Type: application/text; name="myfile.txt";
    Content-Description: myfile.txt
    Content-Disposition: attachment; filename="myfile.txt";;
    Check whether the mail header generated by PI mail adapter sets all these MIME attributes.
    Regards,
    TK
    Edited by: Sameej T.K. on Oct 21, 2010 1:05 AM

  • Cannot save a file with Windows Latin 1 encoding or Mac OS Roman encoding.  Has anything changed about character encodings, Cannot save a file with Windows Latin 1 encoding or Mac OS Roman encoding.  Has anything changed about character encodings

    Hi everybody,
    I am in France. I have juste installed Lion.  I have to regularly send php files on to a website on a Linux Gentoo under Apache webserver. Up until now I used Smultron (a text and code editor) and saved the files in Mac Os Roman Character encoding.  This does not work anymore and the French accuentated characters are not displayed correctly on the web site. The website is ISO-8859-1.
    I have tried within Smultron but also within TextEdit, to copy and paste a correctly accentuated version of one of the php files and then save it in another encoding but neither apps let me use Mac Os Roman or Windows Latin or even Latin 1, I can only save using UTF8 and I have the following message :
    " This document can no longer be saved using its Western (Iso Latin 1) encoding"
    If I type a small text with accents and save it as a php file in Iso Latin 1, it works, but not the big files with php code within...
    Anybody can help ?  I cannot send links to the web pages because they are password protected.
    Thank You very much

    I find part of your post rather confusing.  MacRoman and ISO-8859-1 are totally different and one would not expect the former to display correctly if viewed as the latter.
    If TextEdit will only save as UTF-8, it seems like your file must have some character in it, perhaps difficult to see, which is not contained in Latin 1.  If you could send me a copy of a file where you have this problem, I could take a look (tom at bluesky dot org).

  • ODI : create an XML model with UBL  technology instead of XSD file

    Hello,
    I have several xsd files which contain UBL (Universal Business Language) and all these files are linked between them. In Oracle Data Integrator, I would like generate a XML model from these files as I use to do with the standard xsd files. Unfortunately, it doesn't work with the driver I use usually.
    Do you know if you can generate an xml model from xsd files which contain UBL and if yes, could you say me all the steps I must do to that successfully please?
    Thank you in advance.
    Olivier

    Hello All,
    What I mean is :
    when an xsd file calls an other xsd files by using the namespaces (when 2 xsd files are linked), is there a way to create an xml model matching with the contain of these 2 xsd files?
    Can someone say me if the only solution to generate a xml model is to have only one xsd file?
    Thank you in advance

  • Speed of Lightroom with files on network attached storage if preview files are already generated

    I'm trying to figure out if it's practical to use Lightroom to access/manipulate files on network attached storage.
    Specifically, suppose I've already generated the 1:1 preview files, and these preview files are on the local hard drive.  Does it matter then if the raw files are located physically on a NAS v. on the local hard drive in terms of the speed of Lightroom and ease with navigating from image to image?

    Andrew,
    Unfortunately the catalogs can have multiple issues when saved over network due to lot of network variables.
    The same is covered under Lightroom FAQ's as below:
    Can I store my catalog on a network?
    No. There are too many variables in a network configuration to guarantee that the catalog won't get corrupted.
    Source: http://helpx.adobe.com/lightroom/kb/catalog-faq-lightroom.html
    Mandhir

  • I have a 2007 iMac with version 10.6.8.  When downloading "some" files to my computer, these files become "zip files."  When I open the zip file, it produces a document in some coding language. How can I open the file to produce a legible document?

    I have a 2007 iMac with version 10.6.8 and 4GB of expanded memory.  When downloading "some" emailed documents, the downloaded file becomes a "zip file," which when opened looks like a coded message.  How can I open the "zip file" so that it produces a legible document?  Please, help!!  thank you!!!

    A "zip file" is a compressed file. "Zipping" in principle does not and cannot change the contents. So that if the contents before zipping are garbage, or unreadable on a Mac, when you expand the file you will get garbage or an unreadable file.
    The first thing to verify therefore is whether the file, before it was zipped, was in a "Mac friendly" format. Can you do that?
    You do not need an App to zip or unzip. These functions are built in on our Macs.
    And yes, zipping and unzipping using the built in functionality, work fine in OS 10.6.8. And 10.7 and 10.8 and 10.9.

Maybe you are looking for