MultiPart message parts extraction help

http://fisheye5.cenqua.com/browse/~raw,r=1.2/glassfish/mail/src/java/demo/msgshow.java
This is a demo of multipart message handling, and i see the recursion (implemented exactly like this) not to fit in this particular case (mine), and i seek another solution.
In general i have 2 questions. Is it a typical case when the message has nested mutiparts ?
and: can i introduce a method which translates the "nested" mutipart tree into a sequential list which is returned, and then processed by the main handler method, or i must make use of the depth levels ?
Thanks.

Well.. Is it an error if i dont handle all parts ?Depends on your application. What will your application do if it encounters a message it can't
handle? Ignore it? Is that ok with you?
What are these mime types, multipart/mixed, mutipart/alternative etc. why do i need them ?
What is the minimum i need to implement in order to handle the basic case, as for example in the typical web-mail sites (some text, and some attachments)? what mechanism i need to use for reporting the not supporting of any "advanced" features.
In what case does the nested thing arise ?You have much to learn!
I'd suggest one of the books referenced here:
[http://java.sun.com/products/javamail/community/books/index.html|http://java.sun.com/products/javamail/community/books/index.html]
or the online resources here:
[http://java.sun.com/products/javamail/community/links/index.html|http://java.sun.com/products/javamail/community/links/index.html]
You'll also find the JavaMail specification helpful. (It's included in your JavaMail download bundle.)
Common causes of nested multiparts are:
A message with both plain and html alternate bodies, and also an attachment.
Signed or encrypted messages with attachments.
A forwarded message that contains attachments.

Similar Messages

  • Error during saving a multipart message

    Hi All,
                 We are currently integrating third party system with SAP ECC as a part of our FICA implementation.
    We have configured soap adapter initially at the sender side and IDoc adapter at the reciever intially. After looking at the performnace of the soap adapter, we thought of using HTTP sender instead of a soap sender, so that the webservice makes a direct call to PI integration engine instead of Adapter engine.
    Now my scenario looks like.
    Java/J2EE client -> webservice call > XI pipeline>SAP.
    So here , i havent used http adapter at the source side.
    My problem is when i call the XI pipleine url as suggested by the below blog
    <a href="/people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine Soap Inbound channel of the Integration engine</a>
    I am getting the follwoing error as seen below
    <b>May 31, 2007 6:05:50 PM com.sun.xml.messaging.saaj.soap.MessageImpl saveChanges
    </b>
    <b>SEVERE: SAAJ0540: Error during saving a multipart message</b>
    But for my scenario, i havent used any soap with attachments to pass through PI.
    My soap message is a simple soap envelope with soap part-message.(body).
    Please do help me out in resolving this issue.
    Thanks & Regards,
    Dhana
    null

    Hi Steve,
                   My Soap Action is already applied and I traced out few options after googling it up and added few jars (xalan.jar and saxon8.jar). Even now I am getting the same error.
    Please do tell me what to do in this regard.
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header>
    </SOAP:Header>
    <SOAP:Body>
    <SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>SOAP:Client</faultcode><faultstring>Error during conversion of XI message</faultstring><faultactor>http://sap.com/xi/XI/Message/30</faultactor><detail><SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIProtocol</SAP:Category><SAP:Code area="PARSER">UNEXPECTED_VALUE</SAP:Code><SAP:P1>Main/@versionMajor</SAP:P1><SAP:P2>000</SAP:P2><SAP:P3>003</SAP:P3><SAP:P4/><SAP:AdditionalText/><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>XML tag Main/@versionMajor has incorrect value 000; expected value is 003
    </SAP:Stack></SAP:Error></detail></SOAP:Fault>
    </SOAP:Body>
    </SOAP:Envelope>
    Soap Error message:Error during conversion of XI message
    Thanks,
    Dhana

  • Mail adapter multipart message problem

    Hello everyone.
    I'm experiencing problem with receiver mail adapter. In XIPAYLOAD mode (keeping attachments, use mail package, content encoding - none) messages that has multipart mime type (multipart/alternative exactly) are processing strange way (messages are made from MS Outlook). XI keeps service information and change  some symbols words become  unreadable. For example.
    --_000_135E4C842D542241894122FD84C52E1D4134A33A81mail2itransit_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello world! This is text of multipart message! --_000_135E4C842D542241894122FD84C52E1D4134A33A81mail2itransit_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
    Hello world! T= his is text of multipart message!
    000135E4C842D542241894122FD84C52E1D4134A33A81mail2itransit_
    You can see T= his instead of This. And also why in main payload (<Content> field) it keeps info about all parts of  whole message.
    Attachments are kept correctly.
    Any suggestions how to avoid this problem and keep just useful info (just text with correct symbols)?
    I'm running XI 7.0 SP18.
    Thanks in advance.
    Edited by: Yaroslav Isachenko on Mar 24, 2010 2:31 PM
    Edited by: Yaroslav Isachenko on Mar 24, 2010 2:42 PM

    An OSS would not help, as this is an Outlook issue.
    As far as i know, multipart/mixed works with all mail systems. maybe you give a try?
    Could you post the first lines of your entries in Content tag and the entry and content-type also?

  • Multipart message has "text/plain" content type.

    Hi all,
    I am developing an application which can send and receive email messages including attachments.Because i dont have easy access to real mail servers at the moment, i am using my laptop to test everything("localhost"). my code so far have been able to send,receive and display text messages. it can also send email messages with attachments. The problem comes when i want to retrieve the attachment messages from the "multipart" message. message.isMimeType("multipart/*") returns false and getContentType() method on the message returns "text/plain". as a result my code can not start retreiving the attachments.
    I saved the email message after Transport.Sent(mymsg). Content of the file looks like bellow.
    From: user1@localhost
    To: user2@localhost, user1@localhost
    Message-ID: <22643639.0.1212046661890.JavaMail.user1@localhost>
    Subject: test
    MIME-Version: 1.0
    Thu May 29 10:37:41 EAT 2008: Thu May 29 10:37:41 EAT 2008
    Date: Thu, 29 May 2008 10:37:42 +0300 (EAT)
    ------=_Part_1_30831739.1212046661890
    This is text body part.
    ------=_Part_1_30831739.1212046661890
    Content-Disposition: attachment; filename=testfile1.txt
    content of testfile1.txt
    ------=_Part_1_30831739.1212046661890
    Content-Disposition: attachment; filename=card1.pub
    content of card1.pub
    ------=_Part_1_30831739.1212046661890
    I can also see the received messages in the inbox( JAMES mail server is in my local machine). when opened using notpad, content of these messages is same as the content of the sent messages.
    I am a biginner to java mail(using 1.4.1). so any kind of help would be appreciated. can this problem be linked to using my local machine as mail server or what? I have uninstalled AVG antivirus thinking that it can be interfering. but to no vail. am really stuck at the moment.
    Regards

    Are you sure you're using JavaMail 1.4.1? It looks like you're running into
    an issue that existed back in JavaMail 1.2. How are you saving the message
    to the file?
    Try call msg.saveChanges() before sending the message.
    Also, try using the demo programs that come with JavaMail to see if they're
    working correctly, e.g., msgmultisendsample.java.

  • Getting a NPE when calling the getContent of a multipart message

    Hi,
    I get a NPE when I try to get the body of a multipart MIME message. The BODYSTRUCTURE returns the number of bytes of a bodypart before any decoding is done, the getContent then expects server to return that many bytes when it does something like "aa fetch 1 BODY[0]<0.16384>", when the server does not return anything a NPE is thrown. The exception is as follows
    java.lang.NullPointerException
         at com.sun.mail.iap.Response.parse(Response.java:64)
         at com.sun.mail.iap.Response.<init>(Response.java:32)
         at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:24)
         at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:99)
         at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:112)
         at com.sun.mail.iap.Protocol.command(Protocol.java:167)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:646)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:637)
         at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:474)
         at com.sun.mail.imap.IMAPInputStream.fill(IMAPInputStream.java:52)
         at com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:80)
         at java.io.FilterInputStream.read(FilterInputStream.java:66)
         at java.io.PushbackInputStream.read(PushbackInputStream.java:120)
         at com.sun.mail.util.QPDecoderStream.read(QPDecoderStream.java:33)
         at com.sun.mail.util.QPDecoderStream.read(QPDecoderStream.java:86)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:404)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:442)
         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:179)
         at java.io.InputStreamReader.read(InputStreamReader.java:167)
         at com.sun.mail.handlers.text_plain.getContent(text_plain.java:63)
         at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:755)
         at javax.activation.DataHandler.getContent(DataHandler.java:511)
         at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:231)
    Did anybody see this exception ?
    Thanks
    Nina

    I get this error too when:
    Part part = message;      
    while(i < path.length && part != null) {
    MimeMultipart multipart = getMultipart(part);
    if (multipart == null)
         throw new IOException("not multipart.");
    part = findPart(multipart, path);     
    i++;     
    if (part == null)
    throw new IOException("not a part of message.");
    InputStream in = part.getInputStream();
    int b = 0;
    while((b = in.read()) != -1)
    out.write(b);
    at part.getInputStream() i get:
    java.lang.NullPointerException
    at com.sun.mail.iap.Response.parse(Response.java:99)
    at com.sun.mail.iap.Response.<init>(Response.java:68)
    at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:31)
    at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:105)
    at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:153)
    at com.sun.mail.iap.Protocol.command(Protocol.java:215)
    at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:882)
    at com.sun.mail.imap.protocol.IMAPProtocol.fetch(IMAPProtocol.java:874)
    at com.sun.mail.imap.protocol.IMAPProtocol.fetchBody(IMAPProtocol.java:677)
    at com.sun.mail.imap.IMAPInputStream.fill(IMAPInputStream.java:74)
    at com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:131)
    at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:156)
    at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:54)
    at se.illuminet.httpd.mail.MailXMLService.serviceXml(MailXMLService.java:354)
    Any resolution to this yet?
    It worked up until I changed to an SSL connection to IMAP.
    Could this affect at this level?
    Help appriciated.
    best
    Jonas

  • Incorrect display of MIME Multipart message

    I have non critical, yet annoying problems.
    My problem is similar to:
    https://support.mozilla.org/en-US/questions/992656?esab=a&as=aaq
    I have a single sender who email's do not display the proper Mime attachment inline. What I have found is that the order of the mime parts seems to be important. In my case, the "HTML" content is listed first in the message, and the "text" content is second. In this case, the "text" is the body part that is displayed.
    I have access to the source message. I simply reversed the order of the body parts in the source message, then the HTML version is displayed.
    I did installed the addon https://support.mozilla.org/en-US/kb/viewing-all-body-parts
    I am able to see both parts when I set the correct settings.
    My questions seem to be, (why) does Thunderbird care what order the body parts are in? If I choose view "original html", shouldn't thunderbird display the HTML if it exists?
    I can post the source message if you think it will help. However as I said, simply re-order the body parts, I get the HTML when it is the 2nd / last body part.

    It is standard practice for the body parts to be Text then HTML.
    I think the RFC explains the situation fairly well
    http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
    To quote
    As a very simple example, the following multipart message has two parts, both of them plain text, one of them explicitly typed and one of them implicitly typed:
    From: Nathaniel Borenstein <[email protected]>
    To: Ned Freed <[email protected]>
    Subject: Sample message
    MIME-Version: 1.0
    Content-type: multipart/mixed; boundary="simple
    boundary"
    This is the preamble. It is to be ignored, though it
    is a handy place for mail composers to include an
    explanatory note to non-MIME compliant readers.
    --simple boundary
    This is implicitly typed plain ASCII text.
    It does NOT end with a linebreak.
    --simple boundary
    Content-type: text/plain; charset=us-ascii
    This is explicitly typed plain ASCII text.
    It DOES end with a linebreak.
    --simple boundary--
    This is the epilogue. It is also to be ignored.
    The use of a Content-Type of multipart in a body part within another multipart entity is explicitly allowed. In such cases, for obvious reasons, care must be taken to ensure that each nested multipart entity must use a different boundary delimiter. See Appendix C for an example of nested multipart entities.
    The use of the multipart Content-Type with only a single body part may be useful in certain contexts, and is explicitly permitted.

  • Error while deploying a composite  (Message part "body" is undefined)

    Hi All,
    I am trying to deploy a composite but i am getting the following error.
    Buildfile: C:\Oracle\MiddlewareJdev\jdeveloper\bin\ant-sca-compile.xml
    scac:
    [scac] Validating composite "C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\composite.xml"
    [scac] /C:/JDeveloper/mywork/Sample/SampleDequeueBPEL/Outputftp.wsdl: error: Message part "body" is undefined [element = EmpCollection
         [scac] Setting BPELC option 'classpath' to C:\Oracle\MiddlewareJdev\jdeveloper\jdev\extensions\oracle.sca.modeler.jar;C:\Oracle\MiddlewareJdev\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;C:\Oracle\MiddlewareJdev\jdeveloper\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;C:\Oracle\MiddlewareJdev\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;C:\Oracle\MiddlewareJdev\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator_client.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.adf.model_11.1.1\adfbcsvc.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.adf.model_11.1.1\adfbcsvc-share.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\commonj.sdo_2.1.0.jar;C:\Oracle\MiddlewareJdev\modules\org.eclipse.persistence_1.1.0.0_2-1.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.webservices_11.1.1\wsclient.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.web-common_11.1.1.jar;;C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\SCA-INF\classes
    [scac] C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\composite.xml:21: error: SCAC-50012
    BUILD FAILED
    C:\Oracle\MiddlewareJdev\jdeveloper\bin\ant-sca-compile.xml:272: Java returned: 1 Check log file : C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\SCA-INF\classes\scac.log for errors
    Total time: 4 seconds
    This is an integration from Dequeue to FTP . Dequeue have a payload of message type which is transformed to Ftp message type. Below is the wsdl file where i am getting error
    <wsdl:definitions
         name="Outputftp"
         targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Sample/SampleDequeueBPEL/Outputftp"
         xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/Sample/SampleDequeueBPEL/Outputftp"
         xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
        >
      <plt:partnerLinkType name="Put_plt" >
        <plt:role name="Put_role" >
          <plt:portType name="tns:Put_ptt" />
        </plt:role>
      </plt:partnerLinkType>
        <wsdl:types>
          <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Sample/SampleDequeueBPEL/Outputftp"
                  xmlns="http://www.w3.org/2001/XMLSchema" >
            <include schemaLocation="xsd/FileFTP.xsd" />
          </schema>
        </wsdl:types>
        <wsdl:message name="Put_msg">
            <wsdl:part name="body" element="EmpCollection"/>
        </wsdl:message>
        <wsdl:portType name="Put_ptt">
            <wsdl:operation name="Put">
                <wsdl:input message="tns:Put_msg"/>
            </wsdl:operation>
        </wsdl:portType>
    </wsdl:definitions>XSD of FTP:
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:element name="EmpCollection">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="Emp" maxOccurs="unbounded" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element type="xs:string" name="name"/>
                                <xs:element type="xs:byte" name="id"/>
                                <xs:element type="xs:byte" name="dept"/>
                                <xs:element type="xs:string" name="address"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:schema>Could someone help me on this. Thanks in advance.
    Thanks
    Gnanaprakasam R

    Gnanaprakasam ,
    Check log file : C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\SCA-INF\classes\scac.log for errorsDid you managed to look into logs.
    Try to reconfigured the ftp adapter from scratch.
    I had ran into same error as yours what i did was, restarted the Jdeveloper and was able to compile !!
    Regards,
    Abhinav Gupta

  • Can anyone help me? The iTunes update corrupted my program. I uninstalled, and then reinstalled iTunes; only to find an error message about iTunes Helper. After several fruitless, repeat attempts, I am at a loss. Please help-

    Can anyone help me? The iTunes update corrupted my program. I uninstalled, and then reinstalled iTunes; only to find an error message about iTunes Helper. After several fruitless, repeat attempts, I am at a loss. Please help…

    Many thanks.
    With the Error 2, let's try a standalone Apple Application Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of the issue.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR suitable for your PC (there's a 32-bit Windows version and a 64-bit Windows version):
    http://www.rarlab.com/download.htm
    Right-click the iTunesSetup.exe (or iTunes64Setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
    Go into the folder and doubleclick the AppleApplicationSupport.msi to do a standalone AAS install.
    Does it install properly for you?
    If instead you get an error message during the install, let us know what it says. (Precise text, please.)

  • Difficulty in a Oracle SOA web-service with 2 message parts

    Hi,
    I am developing a web-service which should take 2 inputs - a string and a datetime. Also I have an xsd which I am importing into the wsdl to define the message elements.
    I have 2 options to do this:
    Option-1: Bundle these 2 input parameters into a single complex type in the xsd and then expose this complex-type as a single message part in the input message element. The wsdl operation tag then looks something like this:
    +<wsdl:message name="RetrieveLoVRecordsRequest">+
    +<wsdl:part name="part1" element="inp1:LoVInput"/>
    +</wsdl:message>+
    Option-2: Put these both these simple-types (the string & datetime inputs) in separate message parts. So wsdl operation looks like:
    +<wsdl:message name="RetrieveLoVRecordsRequest">+
    +<wsdl:part name="part1" element="inp1:LoVName"/>+
    +<wsdl:part name="part2" element="inp1:LoVEffectiveDate"/>+
    +</wsdl:message>+
    I need 2 wsdl interfaces with one with option-1 & other with option-2
    The web-service works fine in option-1. But for strange reason does not work correctly for option-2.
    In option-2 the 1^st^ difficulty was that after I coded the wsdl in jdeveloper and did not attach an explicit binding to it, the message-part part2 does not show-up at all in the enterprise manager when I go to the web-service test page. When opened the WSDL URL in the browser it indicated that the SOAP sytle/encoding as Document/literal. Perhaps that's what it dafults to when no explicit binding is specified. I got around this problem by explicitly specifying a RPC/literal binding in the WSDL in jdeveloper. This then showed-up the 2 parts distinctly in the EM test console.
    The 2^nd^ problem (which the main problem now) was that the web-service now started failing complaining about xsl transformation in the mediator
    +ORAMED-01201:[Error in transform operation]Error occurred while transforming payload using "{0}" for target part "{1}".Possible Fix:Review the XSL or source payload. Either the XSL defined does not match with the payload or payload is invalid.+
    Strangely I have correctly mapped the input & output parameters and the xsl is very simple having the 2 input parameters on the left being mapped to 2 corresponding parameters for the SQL where clause.
    And when I went to the EM dashboard to inspect the failure, the input payload did not show any input being passed to the xsl transform in the mediator. This is how the input looks
    +<message>+
    +<properties>+
    +<property name="tracking.compositeInstanceId" value="80053"/>+
    +<property name="tracking.ecid" value="f2d97d6a53d56c9f:-58326bb8:13e15e68aab:-8000-000000000000113d"/>+
    +<property name="transport.http.remoteAddress" value="10.110.173.159"/>+
    +</properties>+
    +<parts/>+
    +</message>+
    As you see above, the parts tag is blank; where it should contain part1 & part2
    To summarise, when I add an RPC/literal binding to the WSDL the input to the wsdl seems to get chopped off !
    Looking fwd to your help.
    -Sudripta
    Edited by: Sudripta on Apr 17, 2013 8:55 PM
    Edited by: Sudripta on Apr 17, 2013 9:05 PM

    Hi Boatseller,
    I will put this in simple way.
    Can we set properties in biztalk wcf_custom adaptor like 
    1. <security authenticationMode="UserNameOverTransport" 
    2. enableUnsecuredResponse="True" 
    or 
     includeTimestamp="false"
    3. <textMessageEncoding
    messageVersion="Soap11"/>
    <httpsTransport/>
    I am unable to find these properties in BizTalk wcf_custom adaptor properties. It will be great help if you could guide me in right direction . My problem is to receive response message into orchestration which is not having header. But the response is coming
    from web service. I saw that in fiddler.
    Also, If there is any steps to make these properties available in machine config, please share 
    Thanks in advance
    Vivek

  • BPEL Compilation Error: Load of wsdl "with Message part element undefined..

    Hi Friends,
    I am getting following error while compiling my BPEL process:
    Error: Load of wsdl "FTPWrite.wsdl with Message part element undefined in wsdl [file:/D:/MyData/_MyProjects/052_Amazon_MetadataInterface/001_SVN/002_Intl/trunc/MetadataInterfaceIntl_2013Apr15_WorkingCode/MetadataInterface_Intl/MetadataInterface_Intl.wsdl] part name = reply     type = {http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types}processResponse" failed
    However the reply message is already defined in the MetadataInterface_Intl.wsdlas shown below:
    Code for MetadataInterface_Intl.wsdl::::
    "<?xml version= '1.0' encoding= 'UTF-8' ?>
    <wsdl:definitions
    name="MetadataInterface_Intl"
    targetNamespace="http://xmlns.oracle.com/MetadataInterfaceIntl/MetadataInterface_Intl/MetadataInterface_Intl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:inp1="http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types"
    xmlns:tns="http://xmlns.oracle.com/MetadataInterfaceIntl/MetadataInterface_Intl/MetadataInterface_Intl"
    >
    <wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:import namespace="http://com.fox.metadata/MetadataInterfaceIntl/MetadataInterface_Intl/types" schemaLocation="xsd/Metadata_Interface.xsd"/>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="requestMessage">
    <wsdl:part name="request" element="inp1:process"/>
    </wsdl:message>
    *<wsdl:message name="replyMessage">*
    *<wsdl:part name="reply" element="inp1:processResponse"/>*
    *</wsdl:message>*
    <wsdl:portType name="execute_ptt">
    <wsdl:operation name="execute">
    <wsdl:input message="tns:requestMessage"/>
    <wsdl:output message="tns:replyMessage"/>
    </wsdl:operation>
    </wsdl:portType>
    </wsdl:definitions>"
    Surprisingly, this same code was compiling file last week and now I have no clue why I am getting this error. Can someone please shade some light on this issue?
    Thanks,
    Sachin.

    Hello
    I have had the same problem in Oracle BPM and solved it using the following steps:
    1- In your application navigator window, expand the project that contains the business rule.
    2- In the SOA Content, double click on your wsdl file.
    3- When the file opens, select the schema view from the bottom of the page.
    4- In the schema view, expand all the schema nodes and check if you see any values in red. If you see one, that value has probably caused the error and you should correct it using the property inspector window.
    In my case, the schema location value was set to a wrong path, so I changed it and the error resolved.
    Also, some error that appear as warning in the rule editor will show as compile error later, such as input types not being used and such, so those must be resolved before compiling.
    Hope that was helpful
    good luck

  • Multipart message in Webservice.

    Hello,
    I am calling a webservice which is having multipart message as follows:
    - <wsdl:message name="PricingAndAvailabilityRequest">
      <wsdl:part name="PricingAndAvailabilityRequestBody" element="pa:PricingAndAvailability" />
      <wsdl:part name="header" element="ebxml:MessageHeader" />
      </wsdl:message>
    - <wsdl:message name="PricingAndAvailabilityResponse">
      <wsdl:part name="PricingAndAvailabilityResponseBody" element="par:PricingAndAvailabilityResponse" />
      <wsdl:part name="header" element="ebxml:MessageHeader" />
      </wsdl:message>
    - <wsdl:portType name="PricingAndAvailabilityServicePort">
    - <wsdl:operation name="PricingAndAvailability">
      <wsdl:input message="avl:PricingAndAvailabilityRequest" />
      <wsdl:output message="avl:PricingAndAvailabilityResponse" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="PricingAndAvailabilityServiceBinding" type="avl:PricingAndAvailabilityServicePort">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="PricingAndAvailability">
      <soap:operation soapAction="" />
    - <wsdl:input>
      <soap:body parts="PricingAndAvailabilityRequestBody" use="literal" />
    - <soap:header message="avl:PricingAndAvailabilityRequest" part="header" use="literal">
      <soap:headerfault use="literal" part="header" message="avl:PricingAndAvailabilityRequest" />
      </soap:header>
      </wsdl:input>
    - <wsdl:output>
      <soap:body parts="PricingAndAvailabilityResponseBody" use="literal" />
    - <soap:header message="avl:PricingAndAvailabilityResponse" part="header" use="literal">
      <soap:headerfault use="literal" part="header" message="avl:PricingAndAvailabilityResponse" />
      </soap:header>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    When i am sending the message to Webservice, After mapping,Request message is having Header and body together.
    I would like to know whether  xi soap receiver adapter able to include Header in SOAP-HEADER and Body in SOAP-BODY as shown in wsdl definiton and will it support multipart messages.
    Thanks in Advace.
    Regards,
    Sreenivas.

    I would like to know whether xi soap receiver adapter able to include Header in SOAP-HEADER
    and Body in SOAP-BODY as shown in wsdl definiton and will it support multipart messages
    there is a piece of information given in SAP note for this....check if you can get some lead from it:
    https://service.sap.com/sap/support/notes/856597
    From the SAP note:
    My web service expects a SOAP with multiple elements in the SOAP body. How can I create such SOAP message?
    Regards,
    Abhishek.

  • Multipart/related part specifiers

    Hi, this query is perhaps the result of my own limited knowledge regarding MIME types and part specifiers but here goes....
    Based on the following BODYSTRUCTURE, I am attempting to determine the associated part specifiers so I may get the MIME headers for said part (i.e. A12 UID FETCH 147859 (BODY.PEEK[1.MIME])).
    A11 UID FETCH 147859 (BODYSTRUCTURE)
    * 1 FETCH (BODYSTRUCTURE (("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "QUOTED-PRINTABLE" 911 16 NIL NIL NIL)(("TEXT" "HTML" ("CHARSET" "US-ASCII") NIL NIL "QUOTED-PRINTABLE" 2716 46 NIL NIL NIL)("IMAGE" "BMP" ("name" "ExchangeBabs.bmp") "<297231021@11102006-1D66>" NIL "BASE64" 2634474 NIL ("inline" ("filename" "ExchangeBabs.bmp")) NIL)("APPLICATION" "OCTET-STREAM" ("name" "Presence_K1=XItJBkk1xQi8X5JIgeeyjkn9EJTYKfxg9AogMsw3qHMhNnawbZ5wVWrmDFYTq1yP&MODE=IMG") NIL NIL "BASE64" 732 NIL ("inline" ("filename" "Presence_K1=XItJBkk1xQi8X5JIgeeyjkn9EJTYKfxg9AogMsw3qHMhNnawbZ5wVWrmDFYTq1yP&MODE=IMG")) NIL)("IMAGE" "GIF" ("name" "Blank Bkgrd.gif") "<297231021@11102006-1D6D>" NIL "BASE64" 202 NIL ("inline" ("filename" "Blank Bkgrd.gif")) NIL) "related" ("boundary" "-------45363d5545363d55") NIL NIL) "alternative" ("boundary" "-------446e3c8d446e3c8d") NIL NIL) UID 147859)
    The com.sun.mail.imap.protocol.BODYSTRUCTURE object generated is shown below (I've omitted most of the fields and left what I considered relevent, simply enough to show the nesting):
    bs= BODYSTRUCTURE  (id=181)
         bodies= BODYSTRUCTURE[2]  (id=199)
              [0]= BODYSTRUCTURE  (id=207)
                   bodies= null
                   encoding= "QUOTED-PRINTABLE"
                   subtype= "PLAIN"
                   type= "TEXT"
              [1]= BODYSTRUCTURE  (id=208)
                   bodies= BODYSTRUCTURE[4]  (id=213)
                        [0]= BODYSTRUCTURE  (id=216)
                             bodies= null
                             encoding= "QUOTED-PRINTABLE"
                             subtype= "HTML"
                             type= "TEXT"
                        [1]= BODYSTRUCTURE  (id=217)
                             bodies= null
                             encoding= "BASE64"
                             subtype= "BMP"
                             type= "IMAGE"
                        [2]= BODYSTRUCTURE  (id=218)
                             bodies= null
                             encoding= "BASE64"
                             subtype= "OCTET-STREAM"
                             type= "APPLICATION"
                        [3]= BODYSTRUCTURE  (id=219)
                             bodies= null
                             encoding= "BASE64"
                             subtype= "GIF"
                             type= "IMAGE"
                   subtype= "related"
                   type= "multipart"
         subtype= "alternative"
         type= "multipart"This particular message has a multipart/related content-type:
    MIME-Version: 1.0
    Content-Type: multipart/related;
         type="text/html";
         boundary="----_=_NextPart_001_01C6ED7A.EC20BF80"So, it has 4 part specifiers, one for each part in multipart/related. Now, the question to all this is can I determine from the BODYSTRUCTURE object what the root part is (i.e. that it's multipart/related)? Or am I going about this the wrong way (i.e. should I be examining the content-type header first to find out that its multipart/related and the first part is "text/html")?

    Basically, I'm trying to fetch various attributes of a message. In this case, the MIME headers of the various message parts (perhaps I'm stating the obvious but I'm not sure how to better explain what I'm trying to accomplish).
    I've made some "progress". This morning when I continued working with the message described above, all of a sudden, the BODYSTRUCTURE I get back is different and as a result, the BODYSTRUCTURE object generated is different.
    1 uid fetch 148032 (BODYSTRUCTURE)
    * 1 FETCH (BODYSTRUCTURE (("TEXT" "HTML" ("charset" "iso-8859-1") NIL NIL "QUOTED-PRINTABLE" 2792 47 NIL NIL NIL)("IMAGE" "GIF" ("name" "Blank Bkgrd.gif") "<297231021@11102006-1D6D>" "Blank Bkgrd.gif" "BASE64" 202 NIL ("inline" ("filename" "Blank Bkgrd.gif")) NIL)("IMAGE" "BMP" ("name" "ExchangeBabs.bmp") "<297231021@11102006-1D66>" "ExchangeBabs.bmp" "BASE64" 2630728 NIL ("inline" ("filename" "ExchangeBabs.bmp")) NIL)("APPLICATION" "OCTET-STREAM" ("name" "Presence_K1=XItJBkk1xQi8X5JIgeeyjkn9EJTYKfxg9AogMsw3qHMhNnawbZ5wVWrmDFYTq1yP&MODE=IMG") NIL "Presence_K1=XItJBkk1xQi8X5JIgeeyjkn9EJTYKfxg9AogMsw3qHMhNnawbZ5wVWrmDFYTq1yP&MODE=IMG" "BASE64" 732 NIL ("inline" ("filename" "Presence_K1=XItJBkk1xQi8X5JIgeeyjkn9EJTYKfxg9AogMsw3qHMhNnawbZ5wVWrmDFYTq1yP&MODE=IMG")) NIL) "related" ("type" "text/html" "boundary" "----_=_NextPart_001_01C6ED7A.EC20BF80") NIL NIL) UID 148032)
    1 OK FETCH completed.
    bs= BODYSTRUCTURE  (id=89)
         bodies= BODYSTRUCTURE[4]  (id=104)
              [0]= BODYSTRUCTURE  (id=115)
                   bodies= null
                   encoding= "QUOTED-PRINTABLE"
                   subtype= "HTML"
                   type= "TEXT"
              [1]= BODYSTRUCTURE  (id=116)
                   bodies= null
                   encoding= "BASE64"
                   subtype= "GIF"
                   type= "IMAGE"
              [2]= BODYSTRUCTURE  (id=117)
                   bodies= null
                   encoding= "BASE64"
                   subtype= "BMP"
                   type= "IMAGE"
              [3]= BODYSTRUCTURE  (id=118)
                   bodies= null
                   encoding= "BASE64"
                   subtype= "OCTET-STREAM"
                   type= "APPLICATION"
         encoding= null
         subtype= "related"
         type= "multipart"NOTE: The UID differs from the previous example I'd given because I had archived the message and then moved it back to my Inbox.
    Any ideas why the BODYSTRUCTURE reported by the server today is different from what it reported before? I have this message on both an Exchange 2000 and Mirapoint server. 2 days ago they both reported the BODYSTRUCTURE I indicated before, now they both have the BODYSTRUCTURE above.
    PS. Sorry that this issue isn't really Javamail related anymore but I'd appreciate any input.

  • Really stuck with multipart message...

    I post below the essence of my code... I read a lot of pages on the internet but my multipart message doesn't want to work :
    With Outlook the mailer says that the encoding is unsupported and it attaches the multipart as a text file...
    In outlook express the message is ok but the images used as datasources are attached a second time, as regular files. I have checked everything several times...
    Thanks for any hint, I lost my day :-(
    I use javamail API 1.3, jaf 1.0.2, jdk 1.3.1
    I have an ArrayList for the datasources, one for their headers, another one for the urls to the fiels to attach and a last one for the file names. I have 3 datasources (gif images) and 2 attachments (xml and pdf). The multipart message code is snipped at the bottom.
    Barbara
    // creates mail session and mime message
    this.mailSession = javax.mail.Session.getDefaultInstance(this.props, null);
    this.msg = new MimeMessage(mailSession);
    MimeBodyPart mbp1 = new MimeBodyPart();
    Multipart mmp = new MimeMultipart();
    //set from, to and cc fields ok
    try{
    this.msg.setSubject(this.subject,this.mimeCharSet);
    this.msg.setSentDate(new java.util.Date());
    catch(Exception e){}
    // html ?
    try{
    if(html){
    mbp1.setContent(this.body,"text/html");
    mbp1.addHeaderLine("Content-Type: text/html;charset=" + this.mimeCharSet +"\"");
    mbp1.addHeaderLine("Content-Transfer-Encoding: quoted-printable");
    else{
    mbp1.setContent(this.body, "text/plain");
    mbp1.addHeaderLine("Content-Type: text/plain;charset=" + this.mimeCharSet +"\"");
    mbp1.addHeaderLine("Content-Transfer-Encoding: 8bit");
    mmp.addBodyPart(mbp1);
    catch(Exception e){System.out.println("bug with content : " + e);}
    // datasources and headers
    try{
    if(this.dataSources != null){
    for(int j=0;j < this.dataSources.size();j++){
    BodyPart mbp2 = new MimeBodyPart();
    javax.activation.DataSource aSource = new URLDataSource(new URL((String) this.dataSources.get(j)));
    mbp2.setDataHandler(new DataHandler(aSource));
    mbp2.setHeader("Content-ID",(String) dsHeaders.get(j));
    System.out.println("added datasource : " + this.dataSources.get(j));
    mmp.addBodyPart(mbp2);
    catch(Exception e){
    System.out.println("bug with add datasources " + e);
    // other attachments
    try{
    if(this.file != null){
    for(int j=0;j < this.file.size();j++){
    BodyPart mbp2 = new MimeBodyPart();
    javax.activation.DataSource aSource = new URLDataSource(new URL((String) this.file.get(j)));
    mbp2.setDataHandler(new DataHandler(aSource));
    System.out.println("attached file : " + this.file.get(j));
    try{
    mbp2.setFileName((String) fileName.get(j));
    catch(Exception e){// no filename
    mmp.addBodyPart(mbp2);
    this.msg.setContent(mmp);
    catch(Exception e){
    System.out.println("bug with add files " + e);
    try{
    javax.mail.Transport.send(this.msg);
    catch(Exception e){
    System.out.println("send mail failed : " + e);
    Now the multipart message :
    Received: from <snip> with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21)
         id P63WS3KF; Mon, 9 Sep 2002 16:57:07 +0200
    Message-ID: <4650852.1031581670610.JavaMail.[snip]>
    Date: Mon, 9 Sep 2002 16:27:49 +0200 (CEST)
    From: =?iso-8859-1?Q?Barbara=A0Post?= <[snip]>
    To: <snip>
    Subject: Some subject
    Mime-Version: 1.0
    Content-Type: multipart/mixed; boundary="----=_Part_0_8194658.1031581669238"
    ------=_Part_0_8194658.1031581669238
    Content-Type: text/html;charset=iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    <snip of html code>
    ------=_Part_0_8194658.1031581669238
    Content-Type: image/gif
    Content-Transfer-Encoding: base64
    Content-ID: 69zzz@pc01
    <snip of first included image code>
    ------=_Part_0_8194658.1031581669238
    Content-Type: image/gif
    Content-Transfer-Encoding: base64
    Content-ID: 69zzz@pc00
    R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAQAICRAEAOw==
    ------=_Part_0_8194658.1031581669238
    Content-Type: image/gif
    Content-Transfer-Encoding: base64
    Content-ID: 69zzz@pc02
    <snip of third included image code>
    ------=_Part_0_8194658.1031581669238
    Content-Type: text/xml; name=nop41.xml; charset=Cp1252
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: attachment; filename=nop41.xml
    <snip of xml attachement code>
    ------=_Part_0_8194658.1031581669238
    Content-Type: application/pdf; name=nop41lt.pdf
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename=nop41lt.pdf
    <snip of pdf attachement code>
    ------=_Part_0_8194658.1031581669238--

    Basic message structure required is
    *{HEADERS}
    *{MULTIPART MIME MESSAGE (RELATED)}
    *>>>{PART 1 MULTIPART PART (ALTERNATIVE)}
    *>>>>>>{PLAIN TEXT PART}
    *>>>>>>{HTML TEXT PART}
    *>>>{END PART 1 MULTIPART PART (ALTERNATIVE)}
    *>>>{PART 2 INLINE IMAGE FILE (GIF/JPEG etc}
    *>>>......
    *>>>{PART n     }
    *{END MULTIPART MIME MESSAGE (RELATED}
    Snippet of code I use, but be aware all the html references to images etc are converted to cid:xxxxxxxxxxxx format outside of this code. No point in sending the image in the message if you refer to it by a url like http://www.foo.org/image1.gif
    SH
    <Code Snippet>
    // create a message
    msg = new MimeMessage(session);
    msg.setFrom(new InternetAddress(from));
    msg.setSubject(subject);
    // create and fill the first message part with the Title and plain text
    MimeBodyPart mbpa1 = new MimeBodyPart();
    mbpa1.setText(ho.getTitle() + "\n" + ho.getText());
    mbpa1.addHeaderLine("Content-Type: text/plain; charset=\"iso-8859-1\"");
    mbpa1.addHeaderLine("Content-Transfer-Encoding: quoted-printable");
    // Create and fill the second message part with the HTML code
    MimeBodyPart mbpa2 = new MimeBodyPart();
    mbpa2.setText(ho.getHTMLCode());
    mbpa2.addHeaderLine("Content-Type: text/html; charset=\"iso-8859-1\"");
    mbpa2.addHeaderLine("Content-Transfer-Encoding: quoted-printable");
    // create the Multipart and its parts to it
    Multipart mp = new MimeMultipart("related");
    Multipart mp2 = new MimeMultipart("alternative");
    mp2.addBodyPart(mbpa1);
    mp2.addBodyPart(mbpa2);
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setContent(mp2);
    mp.addBodyPart(mbp1);
    if (inline) {
    // Enumerate the Image Names and add them to the message
    for (Enumeration e = ho.getImageNames(); e.hasMoreElements();) {
    String str = e.nextElement().toString();
    MimeBodyPart mpi;
    URL url2;
    String fullStr = ho.getImageUrl(str);
    if (inlineAll || ho.isImageLocal(fullStr)) {
    if (debug)
    System.out.println("Adding: " + fullStr);
    url2 = new URL(fullStr);
    mpi = new MimeBodyPart();
    URLDataSource fds2 = new URLDataSource(url2);
    mpi.setDataHandler(new DataHandler(fds2));
    // mpi.addHeaderLine("Content-Location: " + fullStr);
    if (ho.getCidValue(str).length() > 0)
    mpi.setHeader("Content-ID", ho.getCidValue(str));
    mp.addBodyPart(mpi);
    // add the Multipart to the message
    msg.setContent(mp);
    // set the Date: header note that the java.sql package also defines date
    msg.setSentDate(new java.util.Date());
    </Code Snippet>

  • How to properly store multipart messages

    Hello all !
    How can I properly store a multipart message ?
    For example in a database, is it proper to use a structure like that:
    (pseudocode)
    class Part {
          Set<Part> children;   //  (for multipart message the field is set, else is null)
          [fields of the part or]
          byte[] content;
    }or should I stick to the simple case where i have a text message with several attachments ?
    in case the message is HTML newsletter how to handle "embedded" images or content, and how is the general case of manipulating such messages ?
    Thank you
    Edited by: javaUserMuser on Jul 24, 2008 10:18 AM

    OMG.... That I DIDNT THINK OF !!!!!!
    Man, thats so original, and very simple anyway... and very functional ! Its very good approach I am considering.
    But anyway...
    If i want to implement efficient search functionality I shall implemement a respective custom word/component index as opposed to native database indices (for the blob). Is this correct ?
    Anyway, can u suggest a/the correct way of storing the (plain/nested) parts/data as an alternative of the approach u suggest. THANKS ! :)))

  • Message part element undefined

    I get the following error on defining a new wsdl operation:
    Error(16,104): Load of wsdl "GetElligibility.wsdl with Message part element undefined in wsdl [oramds:/apps/com/tel/bdi/cp/Service.wsdl] part name = parameters     type = {http://dsd.cp.bd.tel.com/}GetElligibilityResponse" failed
    it points to
    <import namespace="http://bd.tel.com/ps/cp/Service"
    location="oramds:/apps/com/tel/bd/ps/cp/Service.wsdl" importType="wsdl"/>
    I am unable to figure out what exactly the problem may be. Help Required!!!

    have you improted oramds.jar? I haven't used oramds addresses but i'm sure we need to some settings in order to use oramds addresses both in jdev and soa suite.
    this link may help you http://boardreader.com/thread/11g_Deploying_SOA_Composite_that_uses_or_lh9dXlbmr.html

Maybe you are looking for

  • Itunes 12.2.2 wont open on mac desktop

    I have a desktop mac with OS X 10.6.8.  Processor 2 GHz Intel Core 2 Duo. Memory: 4 GB 667 MHz DDR2 SDRAM .I rarely do updates, but I recently updated iTunes and now when I click on iTunes, either it bounces 3 times and then disappears or it won't op

  • Cannot find message resources under key

    Hi All, I get the following error in the JSP page in weblogic 9.2 environment. The same JSP works fine in 8.1 Cannot find message resources under key ${language}' javax.servlet.jsp.JspException: Cannot find message resources under key ${language} at

  • Do I have to use icloud.

    Have ipod touch 3rdGen.  Primarily use for itunes music .  Do I have to use icloud.  If not, how do I delete (disable) Mobile Me?  It causes issues with my MS Outlook 2007.

  • Tips for a CS4 compatible graphic card?

    Hi! Time to build a new machine. One of the things that use to mess up is the choice of graphic card. I always pic the wrong one, it seems. It would be great for any tip. The machine is going to be a Asus P6T Deluxe with Intel i7 processor and 6 or 1

  • Regarding date formatt

    Hi   Can anyone give me sample code to fetch the date as: YYYYMMDD. Points are assured for correct answers. Regards, Sreeram