JAVA MIME Content Type text/xml - as inline mail text

I have code currently which uses Java Mail to post an email having xml contents. I used the MIME content type as text/xml however the way outlook is showing the mail is as an attachment. I was expecting it to show it inline. Is there any way i can display the text as inline using text/xml. I tried using text/html and the XML message is being displayed as inline, however i wanted text/xml to work. Please suggest a possible solution.

You want a page which lists all of the possible e-mail clients (Outlook, Hotmail, Lotus Notes, Eudora, Yahoo, Gmail, and dozens of others) and describes how they handle all of the several hundred valid MIME types? Good luck with that.
No. E-mail clients will handle text/plain inline. Most of them will handle text/html inline most of the time. Anything else, forget it.

Similar Messages

  • Content-type: application/xml and Application server 9

    I have a web service running on Application server 9, implemented using netbeans and JAX-WS.
    When a client sends a request to it with:
    Content-type: application/xml
    the request is rejected because the server does not recognise the mime type.
    Specifically, the response is:
    HTTP/1.1 415 Unsupported Media Type
    X-Powered-By: Servlet/2.5
    Content-Type: text/plain; charset=iso-8859-1
    Date: Fri, 01 Sep 2006 14:49:04 GMT
    Server: Sun Java System Application Server Platform Edition 9.0
    Connection: close
    Everything works fine when the request has:
    Content-type: text/xml
    Is there a way to make my web service accept content type of 'application/xml'?
    -Tony Beaumont
    Aston University
    beaumoaj

    I have fixed this for myself, i.e. decompile, replace in jar.
    My problem was that most tools define the encoding but code was simply testing
    if( contentType.equalsIgnoreCase( "text/xml" ) )
    so sending xml from other tools that send contentType
    "text/xml;encoding=UTF-8" or some such, like soap tools, would mean no XML was seen.
    Is the proper source available for XSQL?

  • Content-type multipart/voice is coming as text/plain ( getContentType() )

    Even though the actual E-mail message has the content type as multipart/Voice as shown below the getContentType() is shown as
    the following.
    getContentType()
    TEXT/PLAIN; charset=us-ascii
    THE ACTUAL MESSAGE :
    # cat 2.msgReturn-path: <[email protected]>
    Received: from localhost.localdomain ([192.18.74.46])
    by millerite.red.iplanet.com
    (Sun Java(tm) System Messaging Server 7.0-99.01 64bit (built Aug 12 2008))
    with ESMTP id <[email protected]> for
    [email protected]; Mon, 15 Sep 2008 15:42:28 -0700 (PDT)
    Original-recipient: rfc822;user51
    Date-warning: Date header was inserted by millerite.red.iplanet.com
    Date: Mon, 15 Sep 2008 15:42:28 -0700 (PDT)
    Message-id: <[email protected]>
    From: [email protected]
    To: [email protected]
    Content-type: Multipart/voice
    X-Message-Type: Multipart/voice
    Subject: Test Mail
    START
    =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB1KB
    JAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVAJAVA
    =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
    END

    Mon Sep 15 17:50:43 PDT 2008
    DEBUG: JavaMail version 1.4.1
    DEBUG: not loading file: /usr/jdk/instances/jdk1.5.0/jre/lib/javamail.providers
    DEBUG: java.io.FileNotFoundException: /usr/jdk/instances/jdk1.5.0/jre/lib/javamail.providers (No such file or directory)
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.providers
    DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
    DEBUG: Tables of loaded providers
    DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
    DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
    DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
    DEBUG: !anyLoaded
    DEBUG: not loading resource: /META-INF/javamail.address.map
    DEBUG: not loading file: /usr/jdk/instances/jdk1.5.0/jre/lib/javamail.address.map
    DEBUG: java.io.FileNotFoundException: /usr/jdk/instances/jdk1.5.0/jre/lib/javamail.address.map (No such file or directory)DEBUG: getProvider() returning javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc]
    DEBUG: mail.imap.fetchsize: 16384
    * OK [CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ENABLE CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCH_RES XSENDER X-NETSCAPE XSERVERINFO X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP X-ANNOTATEMORE XUM1 STARTTLS AUTH=DIGEST-MD5 AUTH=PLAIN AUTH=CRAM-MD5] millerite.red.iplanet.com IMAP4 service (Sun Java(tm) System Messaging Server 7.0-99.01 64bit (built Aug 12 2008))
    IMAP DEBUG: AUTH: DIGEST-MD5
    IMAP DEBUG: AUTH: PLAIN
    IMAP DEBUG: AUTH: CRAM-MD5
    A0 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ENABLE CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCH_RES XSENDER X-NETSCAPE XSERVERINFO X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP X-ANNOTATEMORE XUM1 STARTTLS AUTH=DIGEST-MD5 AUTH=PLAIN AUTH=CRAM-MD5
    A0 OK Completed
    IMAP DEBUG: AUTH: DIGEST-MD5
    IMAP DEBUG: AUTH: PLAIN
    IMAP DEBUG: AUTH: CRAM-MD5
    DEBUG: protocolConnect login, host=millerite.red.iplanet.com, user=user51, password=<non-null>
    A1 AUTHENTICATE PLAIN
    +
    dXNlcjUxAHVzZXI1MQB1c2VyNTE=
    A1 OK User logged in
    A2 CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT CATENATE URLAUTH LANGUAGE ESEARCH ESORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ENABLE CONTEXT=SEARCH CONTEXT=SORT WITHIN SASL-IR SEARCH_RES XSENDER X-NETSCAPE XSERVERINFO X-SUN-SORT ANNOTATE-EXPERIMENT-1 X-UNAUTHENTICATE X-SUN-IMAP X-ANNOTATEMORE XUM1 STARTTLS
    A2 OK Completed
    A3 LIST "" INBOX
    * LIST (\NoInferiors) "/" INBOX
    A3 OK Completed
    Sep 15, 2008 5:50:47 PM com.sun.comms.iss.indexapi.parser.EmailParser bootstrapEvent
    INFO: [ Begin: Mon Sep 15 17:50:47 PDT 2008 ] Processing User - user51 On Host - millerite.red.iplanet.com
    DEBUG: connection available -- size: 1
    A4 EXAMINE INBOX
    * FLAGS (\Answered \Flagged \Draft \Deleted \Seen NonJunk)
    * OK [PERMANENTFLAGS ()]
    * 5 EXISTS
    * 0 RECENT
    * OK [UIDVALIDITY 1217896692]
    * OK [UIDNEXT 7]
    A4 OK [READ-ONLY] Completed
    A5 FETCH 1 (BODYSTRUCTURE)
    * 1 FETCH (BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 0 0 NIL NIL NIL NIL))
    A5 OK Completed
    A6 FETCH 1 (UID)
    * 1 FETCH (UID 2)
    A6 OK Completed
    A7 FETCH 1 (ENVELOPE INTERNALDATE RFC822.SIZE)
    * 1 FETCH (INTERNALDATE "15-Sep-2008 15:42:29 -0700" RFC822.SIZE 2257 ENVELOPE ("Mon, 15 Sep 2008 15:42:28 -0700 (PDT)" "Test Mail" ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user51" "red.iplanet.com")) NIL NIL NIL "<[email protected]>"))
    A7 OK Completed
    A8 FETCH 1 (FLAGS)
    * 1 FETCH (FLAGS (\Seen NonJunk))
    A8 OK Completed
    A9 CLOSE
    A9 OK Completed
    DEBUG: added an Authenticated connection -- size: 1
    A10 LIST "" INBOX
    * LIST (\NoInferiors) "/" INBOX
    A10 OK Completed
    DEBUG: connection available -- size: 1
    A11 EXAMINE INBOX
    * FLAGS (\Answered \Flagged \Draft \Deleted \Seen NonJunk)
    * OK [PERMANENTFLAGS ()]
    * 5 EXISTS
    * 0 RECENT
    * OK [UIDVALIDITY 1217896692]
    * OK [UIDNEXT 7]
    A11 OK [READ-ONLY] Completed
    A12 FETCH 2:5 (BODYSTRUCTURE)
    * 2 FETCH (BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 0 0 NIL NIL NIL NIL))
    * 3 FETCH (BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 0 0 NIL NIL NIL NIL))
    * 4 FETCH (BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 0 0 NIL NIL NIL NIL))
    * 5 FETCH (BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "us-ascii") NIL NIL "7BIT" 0 0 NIL NIL NIL NIL))
    A12 OK Completed
    A13 FETCH 2 (ENVELOPE INTERNALDATE RFC822.SIZE)
    * 2 FETCH (INTERNALDATE "15-Sep-2008 15:42:29 -0700" RFC822.SIZE 2257 ENVELOPE ("Mon, 15 Sep 2008 15:42:28 -0700 (PDT)" "Test Mail" ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user51" "red.iplanet.com")) NIL NIL NIL "<[email protected]>"))
    A13 OK Completed
    A14 FETCH 2 (UID)
    * 2 FETCH (UID 3)
    A14 OK Completed
    A15 FETCH 2 (FLAGS)
    * 2 FETCH (FLAGS (\Seen NonJunk))
    A15 OK Completed
    A16 FETCH 3 (ENVELOPE INTERNALDATE RFC822.SIZE)
    * 3 FETCH (INTERNALDATE "15-Sep-2008 15:42:29 -0700" RFC822.SIZE 2257 ENVELOPE ("Mon, 15 Sep 2008 15:42:28 -0700 (PDT)" "Test Mail" ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user51" "red.iplanet.com")) NIL NIL NIL "<[email protected]>"))
    A16 OK Completed
    A17 FETCH 3 (UID)
    * 3 FETCH (UID 4)
    A17 OK Completed
    A18 FETCH 3 (FLAGS)
    * 3 FETCH (FLAGS (\Seen NonJunk))
    A18 OK Completed
    A19 FETCH 4 (ENVELOPE INTERNALDATE RFC822.SIZE)
    * 4 FETCH (INTERNALDATE "15-Sep-2008 15:42:29 -0700" RFC822.SIZE 2257 ENVELOPE ("Mon, 15 Sep 2008 15:42:28 -0700 (PDT)" "Test Mail" ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user51" "red.iplanet.com")) NIL NIL NIL "<[email protected]>"))
    A19 OK Completed
    A20 FETCH 4 (UID)
    * 4 FETCH (UID 5)
    A20 OK Completed
    A21 FETCH 4 (FLAGS)
    * 4 FETCH (FLAGS (\Seen NonJunk))
    A21 OK Completed
    A22 FETCH 5 (ENVELOPE INTERNALDATE RFC822.SIZE)
    * 5 FETCH (INTERNALDATE "15-Sep-2008 15:42:29 -0700" RFC822.SIZE 2257 ENVELOPE ("Mon, 15 Sep 2008 15:42:29 -0700 (PDT)" "Test Mail" ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user35" "red.iplanet.com")) ((NIL NIL "user51" "red.iplanet.com")) NIL NIL NIL "<[email protected]>"))
    A22 OK Completed
    A23 FETCH 5 (UID)
    * 5 FETCH (UID 6)
    A23 OK Completed
    A24 FETCH 5 (FLAGS)
    * 5 FETCH (FLAGS (\Seen))
    A24 OK Completed
    A25 CLOSE
    A25 OK Completed
    DEBUG: added an Authenticated connection -- size: 1
    A26 LIST "" INBOX
    * LIST (\NoInferiors) "/" INBOX
    A26 OK Completed
    IMAP DEBUG: IMAPProtocol noop
    A27 NOOP
    A27 OK Completed
    A28 LOGOUT
    * BYE LOGOUT received
    A28 OK Completed
    DEBUG: IMAPStore connection dead
    DEBUG: IMAPStore cleanup, force false
    DEBUG: IMAPStore cleanup done
    Mon Sep 15 17:50:47 PDT 2008Edited by: SpaceShuttle on Sep 15, 2008 5:59 PM
    Edited by: SpaceShuttle on Sep 15, 2008 6:00 PM

  • Changing content type of xml file to pdf

    Hello,
    I have an xml file (extension is *.xdp) which can locally be opened with Adobe Reader and displays as a regular pdf file. Adobe has a technology that allows xml to be merged with a pdf shell, and thus populating the pdf file with the values retrieved from the xml file.
    My issue is that I want this to be done on an application server level (jboss in particular). In a servlet, I stream the xml file for the contents to be printed out within a browser (IE). I specify the content type to be application/pdf, however, the data is not being displayed within Adobe Reader, but rather as a regular xml file.
    Any help is greatly appreciated. Here is the code below:
    response.setHeader("Pragma", "public");
    response.setHeader("Cache-Control", "max-age=30");
    response.setContentType("application/pdf");
    ServletOutputStream out = response.getOutputStream();
    byte[] fileBytes = readFile();
    out.write(fileBytes);

    Yes, the xml does contain a reference to the shell pdf. This works fine if I do so manually (open the xml file using Adobe Reader). However, through a browser, it seems that the forced content type is completely ignored:
    <?xml version="1.0"?>
    <?xfa generator="XFA2_0" APIVersion="1.4.4127.0"?>
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
    <xfa:datasets xmlns="" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
    <xfa:data>
    <DocRoot>
    <Cldemographics<Cldatecreated>7/21/05</Cldatecreated...
    </DocRoot>
    </xfa:data>
    </xfa:datasets>
    <pdf href="/opt/jboss-tomcat-server-build-4.0.0-2/.../pdfShell/Shell.pdf"
    xmlns="http://ns.adobe.com/xdp/pdf/"/>
    </xdp:xdp>

  • MIME Content Type in HTTP Headers - They don't exist for TIFF images

    Hello,
    I think this may be a bug...
    In an effort to stop client browsers from attempting to render TIF images served up from UCM 11g, I would like to change the MIME Typte to: application/octet-stream
    Supremely, a browser would see this in the HTTP header and simply provide the "OPEN or SAVE" dialog.
    Seems easy enough - from the UCM Configuration Manager, I can set/edit all the mime types I want. I did set .tiff and .tif to application/octet-stream. Apparently Weblogic does NOT honor these settings.
    When I click on a PDF file, I get: application/pdf
    When I click on a TXT file, I get: text/plain
    When I click on a TIF file, I get: NOTHING - no mime type specified in the HTTP header at all.
    Does anybody know where in the stack of Weblogic/UCM 11g that mime types are set? Does anybody know why I'm not seeing ANY mime type when I click on a tif?
    Please let me know.
    Thanks!
    JDM

    Yeah, that does seem a bit unwieldy. Try the following instead:
    Navigate to the "<Middleware_home>/user_projects/domains/<yourdomain>/config/" directory and there create the following file :
    mimemappings.properties
    In this file add the below mapping :
    tiff=application/octet-stream
    Save the changes , restart UCM server and then test to see if the issue still shows up .

  • Content-Type of XML-Element?

    This might be a very easy question:
    Is there a possibility to find out which kind of object a certain xml-element is?
    PageItem, Movie, Sound, Graphic, Story, Text, Cell or Table
    Thanks
    Huksy

    Alright, then I get the content of the element. But how do I know the certain element is a cell?
    This didn't work:
    if(myElement[i].xmlContent == Cell) {
    alert ("Found Cell!");
    H.

  • Can not type on bottom row - safari, mail, text messages

    I am unable to type on the bottom row when in safari (only in portrait) - when flipped to landscape it is fine. Therefore, I can not hit the spacebar - and makes typing almost impossible. I have latest version of software, have reset and retried. Any help or comments would be appreciated.

    Just to note. I am having the exact same problem.
    Restarting both the app and the iPhone do not seem to resolve the problem.

  • MIME type text/xml shown as inline in email applications

    Hi, I am currently using MimeBodyPart object to set the text for the email, using the setDataHandler() method. The problem is when i use the MIME content as text/plain or text/html, the text is showing inline in my email application.
    However problem arises when i use the text/xml MIME content type, the text is not shown as inline, it is set as an attachment. I want to know if at all text/xml can be shown as inline text in an email application or will it be always appear as an attachment.

    Hi Saurab,
    Currently im also facing the same issue as urs. Im trying to send a disclaimer in the email which contains some special characters such as / : ;
    The client is also using MS outlook to read the mails. They are receiving the disclaimer as an attachment instead of as plain text.Below is the format of my email:
    1. Body of the mail
    2. Actual report of the client sent as an attachment
    3. disclaimer
    In the forum(http://forums.sun.com/thread.jspa?threadID=5323022) it was mentioned that if the attachment is sandwitched with test, then the text following the attachment will also be sent as an attachment. Hence i just swapped the steps 2 and 3 and had the report as a final one.but still the client receives the disclaimer as an attachment. Your help will be appreciated.

  • How to change content/type from applicaiton/xml to text/xml??

    Hi B2B Gurus,
    Now that i have worked out file transfer. I was now trying to post the same document onto a HTTP URL.
    I see in the headers that the
    Content-Type=application/XML
    However i need the Content-Type to be text/XML
    Where can i get this changed?
    Edited by: user773213 on Apr 8, 2009 4:48 AM

    i tried it but it still shows the same content-type
    ***************************B2B.LOG************************************************
    2009.04.08 at 18:45:29:500: Thread-10: Repository - (INFORMATION) BIND VARS = (5B7A966871774858A1C935F4ADEECA85-95-1, 95, 1, N, http://ap604fin.us.oracle.com:7787/HTTPService/Receiver, <0AB05E5912085DE6D600000082D60500@AS2_Mycompany>, null, null, , Processing, oracle.tip.repos.core.driver.BinaryImpl@10bbd42, , null, , oracle.tip.repos.core.driver.BinaryImpl@1b6772a, null, null, null, HTTP, , 1.0, Wed Apr 08 18:45:29 GMT+05:30 2009, , Message-ID=<0AB05E5912085DE6D600000082D60500@AS2_Mycompany>
    Content-Transfer-Encoding=binary
    MIME-version=1.0
    From=AS2_Mycompany
    Receipt-Delivery-Option=file://localhost/ORACLE_HOME\MyCompany
    Disposition-Notification-To=[email protected]
    AS2-To=AS2_Supplier1
    User-Agent=AS2 Server
    Date=Wed, 08 Apr 2009 13:15:17 GMT
    AS2-Version=1.1
    AS2-From=AS2_Mycompany
    Content-Type=application/XML; name=ShipOrder
    Connection=close
    , null, 0AB05E5912085DE72520000082D60600, null, 3C4DF09FF3304FA698C287DA35154FDB, 826050DF70374FF389E372DB6D126D46)
    2009.04.08 at 18:45:29:906: Thread-10: Repository - (DEBUG) CatalogDriver.writeObjectList()
    ***********************************************************************************

  • Accessing Java webservice (XML over http) via WCF or HTTP adapter with content-type and authorization HTTP headers with POST method

    Hi Team,
    I need to access Java web service which is simple service and accepts and returns XML over HTTP. No credentials are needed to access the service. We need to pass following two HTTP headers (Content-Type and Authorization) along with XML request message:
    <GetStatus> message is being constructed in the orchestration and URI is constant to access.
    Which adapter shall I use to get the response back? I tried using WCF-WSHttp with Security Mode = Transport, and different options of client credential types but every time, error returned stating:
    System.Net.WebException:
    The HTTP request is unauthorized with client authentication scheme 'Basic'. The
    authentication header received from the server was 'Basic realm='.
    Authentication failed for principal Basic. Message payload is of type:
    String 
    In Fiddler, request looks line following
    POST <https://URL/GetServiceReopnse HTTP/1.1
    Content-Type: application/xml
    Authorization: Basic cmVmU3RhdHN2Y19kgeRfsdfs=
    Host: <Server name>
    <GetStatus XMLNS="http://server.com/.....">
    <OrgId>232323</OrgId>
    <HubId>3232342323</HubId>
    </GetStatus>
    MMK-007

    First, you should not use the HTTP Adapter because it's been deprecated and replaced by WCF.
    Start with the WCF-Custom Adapter and select the customBinding.
    You should start with the textMessageEncoder and httpTransport and go from there.

  • Unsupported Content-Type: application/soap+xml

    I've created a simple composite application with a bpel jbi module using glassfishesbv21.
    The bpel process starts when I invoke a webservice (soap-binding).
    When I run a test case for the ca everything works fine.
    When I call the webservice from an external web application, the client (created with netbeans wizard bundled in glassfishesbv21) obtains the response as expected and doesn't report any exception while the server rises a com.sun.xml.ws.server.UnsupportedMediaException.
    Googoling I found that this maybe caused by the use of soap1.1 and soap1.2 but is also true that JAX-WS runtime should look into the WSDL to determine the binding being used and configures itself accordingly.
    the stacktrace is:
    Finished processing outbound messages.
    Request doesnt have a Content-Type
    com.sun.xml.ws.server.UnsupportedMediaException: Request doesnt have a Content-Type
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:267)
    at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
    at com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:341)
    at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.processAsynchRequest(JAXWSGrizzlyRequestProcessor.java:386)
    at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.service(JAXWSGrizzlyRequestProcessor.java:220)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
    at com.sun.jbi.httpsoapbc.embedded.JBIGrizzlyAsyncFilter.doFilter(JBIGrizzlyAsyncFilter.java:95)
    at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
    at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
    at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
    Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    ====[com.sun.xml.ws.assembler.server:request]====
    <?xml version="1.0" ?>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soap-env:Header>
    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</wsa:Action>
    <wsa:To>http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort</wsa:To>
    <wsa:ReplyTo>
    <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:MessageID>uuid:778b135f-3fdf-44b2-b53e-ebaab7441e40</wsa:MessageID>
    </soap-env:Header>
    <soap-env:Body></soap-env:Body>
    </soap-env:Envelope>
    ============
    ====[com.sun.xml.ws.assembler.server:response]====
    <?xml version="1.0" ?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <S:Fault xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns="">
    <faultcode>S:Server</faultcode>
    <faultstring>javax.jbi.messaging.MessagingException: HTTPBC-E00798: Message normalization failed</faultstring>
    </S:Fault>
    </S:Body>
    </S:Envelope>
    ============
    Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
    ====[com.sun.xml.ws.assembler.server:request]====
    <?xml version="1.0" ?>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soap-env:Header>
    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</wsa:Action>
    <wsa:To>http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort/mex</wsa:To>
    <wsa:ReplyTo>
    <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:MessageID>uuid:778b135f-3fdf-44b2-b53e-ebaab7441e40</wsa:MessageID>
    </soap-env:Header>
    <soap-env:Body></soap-env:Body>
    </soap-env:Envelope>
    ============
    the wsdl is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <definitions name="coreAnagrafeUpdateService"
    targetNamespace="http://service.box.nexus.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://service.box.nexus.com/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <types>
         <xsd:schema>
    <xsd:import namespace="http://service.box.nexus.com/" schemaLocation="core_anagrafe.xsd"/>
    </xsd:schema>
    </types>
    <message name="coreAnagrafeUpdateOperationRequest">
    <part name="parameters" element="tns:requestParameter"/>
    </message>
    <message name="coreAnagrafeUpdateOperationResponse">
    <part name="parameters" element="tns:coreAnagrafeResponse"/>
    </message>
    <message name="coreAnagrafeUpdateOperationFault">
    <part name="part1" element="tns:faultMessage"/>
    </message>
    <portType name="coreAnagrafeUpdatePortType">
    <operation name="coreAnagrafeUpdateOperation">
    <input message="tns:coreAnagrafeUpdateOperationRequest"/>
    <output message="tns:coreAnagrafeUpdateOperationResponse"/>
    <wsdl:fault name="fault1" message="tns:coreAnagrafeUpdateOperationFault"/>
    </operation>
    </portType>
    <binding name="coreAnagrafeUpdateBinding" type="tns:coreAnagrafeUpdatePortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="coreAnagrafeUpdateOperation">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    <wsdl:fault name="fault1">
    <soap:fault use="literal" name="fault1"/>
    </wsdl:fault>
    </operation>
    </binding>
    <service name="coreAnagrafeUpdateService">
    <port name="coreAnagrafeUpdatePort" binding="tns:coreAnagrafeUpdateBinding">
    <soap:address location="http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort"/>
    </port>
    </service>
    </definitions>
    Can anyone help me to understand the problem and solve it?
    Thanks in advance.

    Hi,
    Content-Type: application/xml
    ...check for the content type of the message that is sent ot the WS.....with the above mentioned content-type going to the WS currently...WS is not able to parse the req and hence the error....in other words wrong format being being passed.
    Regards,
    ABhishek.

  • Content type headers and spam checks within Java MAil

    Hello there
    I have successfully created a java mail api to send any one of the following
    plain/text message, with or without attachments, with or without the body of the email to be HTML
    I have a question on how to ensure that the email is not marked spam? Sometimes the Spam score goes high if there is olly html for an email that is text/html type.;
    What are the possible values for content/type of Mime Message header for following scenarios
    An Email message that may have its bodypart as html and may have attachments
    An Email message that will have plain text messages along with attahcments and HTML concattenated with text messages ( LIke google maps along with text message]
    IF I do messaget.set ("This is my message") andthen I add attachments to the message body part, is it advisable to have two seperate content-type mime headers for these messages? wrt not having higher spam score.
    Or Is it advisable to have seperate mime type content headers for text part and sperate for message part.
    IS the attachment part also has a seperate mime header content type value?
    does the header's content type value is plain/text for messages that are text messages with attachments>?
    IS there a way to chek spam scores for messages generated by java mail? The ides is to create java mail API customsied sot hat the sent emails are not marked spams ?
    In order for the mail to be having zero spam scrore, it is helpful to have seprate mime content type headers?
    Edited by: user9328023 on May 23, 2011 1:45 PM

    If you want to create a message that has both plain text and html versions of the main
    message content, you want to create a multipart/alternative message, as described in
    this FAQ entry.
    If that message also needs to have attachments, you should embed the multipart/alternative
    part in a multipart/mixed message, along with the attachment parts.
    If the html part needs to reference images included with the message, you would replace
    the text/html part with a multipart/related part, as described in this FAQ entry.
    Combining all these techniques together can seem a bit complicated unless you understand
    recursion! :-) Remember that in addition to creating a body part with a text content type,
    you can create a body part with a multipart content type, and use that body part in the same
    places you would use a text body part.
    As for making sure your message isn't marked as spam, well, you're probably asking in the
    wrong place, but the simple answer is to make sure that it's actually not spam! Usually the
    structure of the message isn't as important as the content of the message.

  • DeliveryException: invalid content type for SOAP: TEXT/PLAIN; HTTP 302 Move

    Hi everyone,
    Hello all,
    I have an RFC->XI->Web Service (SOAP) synchronous scenario.
    I'm trying to send a message from the the RFC, and in the message monitoring (SXMB_MONI) I'm getting this error message:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Inbound Message
      -->
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/PLAIN; HTTP 302 Moved Temporarily</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I have as the TARGET URL: http://webservices.iter.dk/calculator.asmx?WSDL
    SOAP ACTION: http://www.iter.dk/webservices/calculator.asmx/Add
    As the content type in the WSDL file: application/text
    What could be wrong? thanks...
    Felipe

    Hi Felipe
    This i think is due to incorrect address or redirection failure which is one of the major reason for 302 as per my knowledge.
    You try to post the content and test it without using XI. Download SOAP UI and test it once and let me know
    http://www.soapui.org/
    helpful blog
    Troubleshooting - RFC and SOAP scenarios *** Updated on 20/04/2009 ***
    Thanks
    Gaurav

  • Getting invalid content type for SOAP: TEXT/HTML exception for Soap Adapter

    I am trying to invoke Webservice using SOAP Receiver Adapter
    but I am getting error
    <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML</SAP:AdditionalText>
    Pls let me know
    Regards

    HI,
    see
    •     Q: What character encoding is supported by the SOAP sender adapter?
               A: The SOAP sender adapter can accept any character encoding supported by the local JDK. When you are using a particular character encoding with content type text/xml, you must make sure that the encoding name given in the content type and in the XML declaration must be consistent. What makes this more complex is that the default values. The default encoding for "text/xml" is US-ASCII, whereas the default encoding for the XML declaration is UTF-8 or UTF-16. The following examples show several valid combinations of content-type and XML declartion:
               text/xml
               <?xml version='1.0' encoding='us-ascii'?>
               text/xml; charset='utf-8'
               <?xml version='1.0' encoding='utf-8'?>
               text/xml; charset='utf-8'
               no declaration
               text/xml; charset='iso-8859-1'
               <?xml version='1.0' encoding='iso-8859-1'?>
               application/xml
               <?xml version='1.0' encoding='iso-8859-1'?>
               The response message from the SOAP sender is normally encoded in UTF-8. If you want to change this encoding, for instance to iso-8859-1, you can supply the encoding information with the xmlenc variable in the request URL as in:
               http://host:port /XISOAPAdapter/MessageServlet?channel=p:s:c&xmlenc=iso-8859-1
               Related Questions "What character encoding is supported by the SOAP receiver adapter?"
    Regards
    Chilla

  • How Do I Set XML Content-type in Flex 3

    Hi,
    My Flex 3 project makes an ExternalInterface call to some Javascript. The Javascript is then turned into XML.
    But, my xml isn't parsing in IE. It works in all other browsers. I think that the problem is that I haven't set the XML's content-type. As I understand it IE requires that the Content-type be set. Is this correct?
    My code looks like:
    myReturn =  '<myXMLReturn>' + myReturn + '</myXMLReturn>';
    myReturn = '<?xml version="1.0" encoding="UTF-8"?>' + myReturn;
    xmlReturn = new XML(myReturn);
    How would I set: header('Content-type: application/xml'); for an ExternalInterface call?
    Thank you.
    -Laxmidi

    Okay. I figured it out. I don't need to set the Content-type.
    I had a case sensitivity problem in parsing the xml. Thank you.
    -Laxmidi

Maybe you are looking for