How to send SOAP message with attachment?

Hi Experts,
How do I simulate to send a SOAP message with an attachment? Can I use XMLSpy?
Please help.
Thanks,
Shobhit

Ravi,
With the generic SOAP client, it asks for the http based wsdl file location. But my wsdl has been generated by XI and I have the file stored on my desktop.
Something to do with the path http://zpidd01:8030/XISOAPAdapter/MessageServlet?channel=NetworkPartners:NP_Order_BS:NP_SOAP_Sender_CC ??
Stefan,
my scenario is to send a SOAP request with attachment and post the attachment in ECC through the ABAP server proxy.
WebService Client -
SOAP----> XI -
ABAP PROXY CALL ---> ECC
Need further assistance from both of you how to achieve this scenario.
Thanks,
Shobhit
Edited by: Shobhit Swarup Mathur on Jul 24, 2008 4:34 AM

Similar Messages

  • How to send SOAP Message with Oracle B2B

    Hi everyone,
    I need your help to send out from Oracle B2B a SOAP message with attachment of any type of file (image, pdf, etc.). Possibly using a SOA composite application or another way, it doesn't matter. I already create an ebMS partnership with a custom document protocol and I already create a working SOA composite application to send only text message to my trading partner. I have tried this solution: http://anuj-dwivedi.blogspot.it/2011/04/ebms-attachment-handling-in-oracle-b2b.html but it doesn't work for my case... It is to be noticed that I don't give any schema to my component in the SOA application explained firstly, and I select opaque as schema.
    Thanks to all, regards
    Nello

    Hi Anuj and thanks for your help,
    I need to send an ebXML message, with SOAP, and I try to send it with a .war application written in jsp connecting to http://10.85.28.24:8001/b2b/transportServlet to send the SOAP message. The errors reported is:
    javax.xml.soap.SOAPException: Unable to receive message. Received a response from url: http://10.85.28.24:8001/b2b/transportServlet with HTTP status 200 and SOAP content-type: null.
    the code I write is the following (to evaluate the two "null" in the super constructor)
    <%!
    public class EBMSSender extends SOAPRunner
    private String cpaId;
    private String service;
    private String action;
    private String mess;
    private ArrayList<String> allegati=null;
    public EBMSSender(String cpaId, String service, String action, String mess, ArrayList<String> file)
    super("http://10.85.28.24:8001/b2b/transportServlet","null", "null");
    this.cpaId = cpaId;
    this.service = service;
    this.action = action;
    this.mess=mess;
    this.allegati=file;
    @Override
    protected void prepareRequest(SOAPMessage soapMessage, SOAPBody soapBody) throws SOAPException
    soapBody.addChildElement(SOAPUtility.createElement("CPAId", getNsPrefix(), getNsURI(),"agr3"));
    soapBody.addChildElement(SOAPUtility.createElement("service", getNsPrefix(), getNsURI(),"OracleService"));
    soapBody.addChildElement(SOAPUtility.createElement("action", getNsPrefix(), getNsURI(),"Oracletohermesb"));
    soapBody.addChildElement(SOAPUtility.createElement("serviceType", getNsPrefix(), getNsURI(),"OracleServiceType"));
    soapBody.addChildElement(SOAPUtility.createElement("convId", getNsPrefix(), getNsURI(), "convId"));
    soapBody.addChildElement(SOAPUtility.createElement("fromPartyId", getNsPrefix(), getNsURI(), "Oracle"));
    soapBody.addChildElement(SOAPUtility.createElement("fromPartyType", getNsPrefix(), getNsURI(), "Name"));
    soapBody.addChildElement(SOAPUtility.createElement("toPartyId", getNsPrefix(), getNsURI(), "Hermes-b"));
    soapBody.addChildElement(SOAPUtility.createElement("toPartyType", getNsPrefix(), getNsURI(), "Name"));
    attach(soapMessage);
    protected void attach(SOAPMessage soapMessage)
    String h=mess;
    DataHandler dh;
    AttachmentPart ap = soapMessage.createAttachmentPart(h,"text/plain");
    soapMessage.addAttachmentPart(ap);
    if(allegati!=null)
    for(int i=0; i<allegati.size();i++)
    dh=new DataHandler(new FileDataSource(new File(allegati.get(i))));
    ap=soapMessage.createAttachmentPart(dh);
    ap.setContentType(new MimetypesFileTypeMap().getContentType(allegati.get(i)));
    ap.setContentLocation(allegati.get(i));
    soapMessage.addAttachmentPart(ap);
    @Override
    protected void processFault(SOAPFault soapFault) throws SOAPException{}
    @Override
    protected Object processResponse(SOAPMessage responseMessage,SOAPBody responseBody) throws SOAPException
    SOAPElement messageId = SOAPUtility.getChild(responseBody, "message_id", getNsURI());
    return null;
    %>
    The code works fine on the other trading partner side to send ebXML message to Oracle B2B. Apart from this solution (however,it would be my favorite), I find your blog and I try to implement your solution. It works: it sends files with only text payload to the other trading partner without any problem, but if I try to send for example an image in byte array written in a file .txt, the ebxml file received has the byte array with wrong characters. it may be that I have not provided the xsd schema? in case if I wanted to send an ebXML message with text and attachments, what xsd schema do I need to provide?
    or is there another way to implement a SOA composite application to send SOAP messages with attachments?
    Thank for your help!, regards
    Nello

  • How to send SOAP Message with attachments?

    Hi All,
    I am working on a SOAP to RFC Scenario With specific requirement of handling the attachment(Mainly Excel Attachments) at the Sender SOAP Adapter.
    Kindly Suggest.
    I found lot of theoritical stuff but no practical scenario.
    Regards,
    Sachi

    Hi Sachi,
    To handle attachment in SOAP sender adapter  first of all you will have to use the AXIS message protocol.
    Then by using MessageTransformBean you can handle the attachment.
    1) Check this link for the module processing sequence used to get the attachment from SOAP
    SOAP Axis sender with CSV file attachment
    2) Check this blog which will help you on the usage of MessageTransformBean
    Solve Key Field Problem using StructPlain2XML in MessageTransformationBean!!
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm
    using MessageTransformBean you can handle only the text file attachments like comma separated file, pipe separated, fixed lengths etc. But if you are looking to handle a excel file you will have to use a java mapping to get the data from excel attached file. for this have a look at this following blog by Shabarish:
    Excel Files - How to handle them in SAP XI/PI (The Alternatives)
    Do remember to use SOAP Axis adapter and to tick the keep attachment option.
    Hope this helps.
    Regards,
    Aravind

  • Outbound SOAP Message with Attachment

    The requirement is to invoke a web service by sending attachments in the outbound SOAP message. The attachment body needs to be assigned in the message flow, using an element E1 extracted from the message incoming into the flow.
    I am trying to use attachments variable to set content-type (text/xml) and body using E1. However, these are not getting assigned to attachments variable, as seen by logging the variable.
    I was told that $attachments cannot be changed inside the flow (it is marked black in the console unlike the header and body that are marked green). If that is the case, how do we invoke services using attachments from a message flow?
    Any pointers would be appreciated.

    Hi,
    A SOAP message may need to be transmitted together with attachments of various sorts, ranging from facsimile images of legal documents to engineering drawings. Such data are often in some binary format. For example, most images on the Internet are transmitted using either GIF or JPEG data formats. In this document we describe a standard way to associate a SOAP message with one or more attachments in their native format in a multipart MIME structure for transport.
    yes it is possible to send attachment with the SOAP.
    SOAP Message Packages
    A "SOAP message package" contains a primary SOAP 1.1 message. It may also contain additional entities that are not lexically within the SOAP message but are related in some manner. These entities may contain data in formats other than XML. The primary SOAP 1.1 message in a message package may reference the additional entities. Such additional entities are often informally referred to as "attachments." This section describes how to construct SOAP message packages and how SOAP processors will process them.
    A SOAP message package is constructed using the Multipart/Related media type, which is defined in RFC 2387. The rules for the construction of SOAP message packages are as follows:
    The primary SOAP 1.1 message must be carried in the root body part of the Multipart/Related structure. Consequently the type parameter of the Multipart/Related media header will always equal the Content-Type header for the primary SOAP 1.1 message, i.e., text/xml.
    The MIME Multipart/Related encapsulation of a SOAP message is semantically equivalent to a SOAP protocol binding in that the SOAP message itself is not aware that it is being encapsulated. That is, there is nothing in the primary SOAP message proper that indicates that the SOAP message is encapsulated .
    For more details you can refer these links
    http://www.w3.org/TR/SOAP-attachments
    http://www.w3.org/TR/soap12-af/
    regards
    Aashish Sinha
    PS : reward points if helpful

  • Soap message with Attachment

    Hi All,
    I have a requirement wherin I have to send an attachment(image) along with the soap payload.i.e. the soap message contains the payload and an attachment.For eg. the soap message is as shown below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Body>
        <ns1:MT_Soap xmlns:ns1="http://www.adc.com/sample">
             <Record>
                <FieldXML>abc</FieldXML>
                <FieldAthmt />
             </Record>
          </ns1:MT_Soap>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    How can I include the attachment(which is on a local machine) in the above soap message?
    Is it posssible to send the attachment in the field "FieldAtthmt"?
    If it is possible to send an attachment with the soap message then how can that attachment be handled in XI?
    Thanks in advance,
    Vikram

    Hi,
    A SOAP message may need to be transmitted together with attachments of various sorts, ranging from facsimile images of legal documents to engineering drawings. Such data are often in some binary format. For example, most images on the Internet are transmitted using either GIF or JPEG data formats. In this document we describe a standard way to associate a SOAP message with one or more attachments in their native format in a multipart MIME structure for transport.
    yes it is possible to send attachment with the SOAP.
    SOAP Message Packages
    A "SOAP message package" contains a primary SOAP 1.1 message. It may also contain additional entities that are not lexically within the SOAP message but are related in some manner. These entities may contain data in formats other than XML. The primary SOAP 1.1 message in a message package may reference the additional entities. Such additional entities are often informally referred to as "attachments." This section describes how to construct SOAP message packages and how SOAP processors will process them.
    A SOAP message package is constructed using the Multipart/Related media type, which is defined in RFC 2387. The rules for the construction of SOAP message packages are as follows:
    The primary SOAP 1.1 message must be carried in the root body part of the Multipart/Related structure. Consequently the type parameter of the Multipart/Related media header will always equal the Content-Type header for the primary SOAP 1.1 message, i.e., text/xml.
    The MIME Multipart/Related encapsulation of a SOAP message is semantically equivalent to a SOAP protocol binding in that the SOAP message itself is not aware that it is being encapsulated. That is, there is nothing in the primary SOAP message proper that indicates that the SOAP message is encapsulated .
    For more details you can refer these links
    http://www.w3.org/TR/SOAP-attachments
    http://www.w3.org/TR/soap12-af/
    regards
    Aashish Sinha
    PS : reward points if helpful

  • How to send a mail with attaching a report

    hi gurus,
        my requirment is i have to send a mail with attaching the report of a program to the client.. is it possible? help me with sample code.
    Thanks in advance.
    Regards,
    Indira D

    Hi Indira,
    plz check out this code below,
    *& Report  ZATTACH                                               *
    REPORT  ZATTACH                   .
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver
                                      DEFAULT '[email protected]'.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
          wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
      Retrieve sample data from table ekpo
      PERFORM data_retrieval.
      Populate table with detaisl to be entered into .xls file
      PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekpo.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
          Build data table for .xls document
    FORM build_xls_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                 con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
        CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                    wa_charekpo-aedat wa_charekpo-matnr
               INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.
    " POPULATE_EMAIL_MESSAGE_BODY
    <b>
    Reward points if this helps,</b>
    Kiran

  • How to send a message with javamail api

    Hi, anybody can tell me how i do to send a message with javamail?
    Thanks.
    Daniele.

    [rossifumi80],
    Here's a simple JavaMail application SendMessage.java that will connect a SMTP host and send a mail message out:
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    public class SendMessage {
      public static void main (String args[]) throws Exception {
        String host = args[0];
        String from = args[1];
        String to = args[2];
        // Get system properties
        Properties props = System.getProperties();
        // Setup mail server
        props.put("mail.smtp.host", host);
        // Get session
        Session session = Session.getDefaultInstance(props, null);
        // Define message
        MimeMessage message = new MimeMessage(session);
        // Set the from address
        message.setFrom(new InternetAddress(from));
        // Set the to address
        message.addRecipient(Message.RecipientType.TO,
          new InternetAddress(to));
        // Set the subject
        message.setSubject("Hello JavaMail");
        // Set the content
        message.setText("Welcome to JavaMail");
        // Send message
        Transport.send(message);
    }HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • How to send a message with a photo to a company?

    I AM S DISABLED SENIOR WITH SHORT-TERM MEMORY. PLEASE TELL ME HOW TO SEND A MESSAGE AND INCLUDE A PHOTO I HAVE ON MY i-PHONE 5S?
    THANK YOU IN ADVANCE FOR THE ASSISTANCE.
    FLIGHTLEADER-1

    Open the photo, assuming it is in Photos, and then in the lower left corner under the photo is a box with an up-pointing arrow.  Tap that box, and then the photo will have a blue circle with a checkmark in its lower right corner and the word Next at the upper right.  Tap Next, then choose how you want to send the photo, by text message, email, and so on.  Simply address the method you have chosen and put in any text you want to include.

  • Tutorial Announcement :: how to send a message with file attachments

    Hi, everyone
    i made a simple tutorial explains how to send email from your site with attachment, using the ADDT`s send email.
    also it`s useful when you want to receive let`s say the employee c.v resumes, also it can use for many proposes as explained in the tutorial.
    the level for this tutorial is: beginner -- intermediate.
    hope it`s useful.
    - for more dreamweaver developer toolbox please visit:
    www.developer-online.com

    Hi, everyone
    i made a simple tutorial explains how to send email from your site with attachment, using the ADDT`s send email.
    also it`s useful when you want to receive let`s say the employee c.v resumes, also it can use for many proposes as explained in the tutorial.
    the level for this tutorial is: beginner -- intermediate.
    hope it`s useful.
    - for more dreamweaver developer toolbox please visit:
    www.developer-online.com

  • How to send Java mail with attachment?

    Could you please provide the sample codes using the javax.mail api for sending an email with an attachment?

    this is code
    zareen abbas
    <html><body><center>
    <FORM ACTION="/servlet/Attach" method="post">
    <!--I didn,t used this ENCTYPE-->
    <!--ENCTYPE="multipart/form-data" -->
    <table border=0 bgcolor background="#00000">
    <tr><td><font size=4> <b>From: </b> </font> </td>
    <td><input type=text name=from size=40></td></tr>
    <tr><td><font size=4> <b>To : </b> </font> </td>
    <td><input type=text name=to size=40> </td></tr>
    <tr><td><font size=4> <b>CC : </b> </font> </td>
    <td><input type=text name=cc size=40> </td></tr>
    <tr><td><font size=4> <b>BCC : </b> </font> </td>
    <td><input type=text name=bcc size=40> </td></tr>
    <tr><td><font size=4> <b>Subject : </b> </font> </td>
    <td><input type=text name=subject size=40> </td></tr>
    <tr><td><font size=4> <b>Body : </b> </font> </td>
    <td><textarea name=body rows=15 cols=40> </textarea> </td></tr>
    </table>
    <p>Select a file:<input type=file name=attach>
    <input type=submit value="send">
    <input type=reset name=reset1
    value="Clear"></Form></center></body></html>
    here the servlet code
    File file = new File(filename);
    if (file.exists())
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setText(text);
    MimeBodyPart mbp2 = new MimeBodyPart();
    FileDataSource fds = new FileDataSource(filename);
    mbp2.setDataHandler(new DataHandler(fds));
    mbp2.setFileName(fds.getName());
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    message.setContent(mp);
    else
    message.setText(text);
    Transport.send(message);

  • How to send an email with attachment to dynamic emial address using PL/SQL

    Hi,
    i want to send an automated email with attachment everyday to differnet people so number people is not static.
    so is it any way using PL/SQL ?
    thanks for your support!

    i want to send an automated email with attachment everyday to differnet people so number people is not static.
    Why? Explain it.
    You can create a table and store your email id through front-end application day to day.
    The table should look like this ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.04
    satyaki>
    satyaki>
    satyaki>create table email_master
      2    (
      3       email_grp_header         varchar2(30) not null,
      4       craete_time                  timestamp,
      5       constraints pk_header primary key(email_grp_header)
      6    );
    Table created.
    Elapsed: 00:00:02.12
    satyaki>
    satyaki>create table email_chld
      2    (
      3       email_grp_header          varchar2(30) not null,
      4       email_recepient             varchar2(100),
      5       craete_time                   timestamp,
      6       constraint fk_header foreign key(email_grp_header) references email_master(email_grp_header)
      7    );
    Table created.
    Elapsed: 00:00:00.09
    satyaki>
    satyaki>
    satyaki>insert into email_master values('GRP_INVENTORY',systimestamp);
    1 row created.
    Elapsed: 00:00:00.07
    satyaki>
    satyaki>
    satyaki>insert into email_master values('GRP_PURCHASE',systimestamp);
    1 row created.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>commit;
    Commit complete.
    Elapsed: 00:00:00.04
    satyaki>
    satyaki>select * from email_master;
    EMAIL_GRP_HEADER               CRAETE_TIME
    GRP_INVENTORY                  24-OCT-08 08.55.36.190000 PM
    GRP_PURCHASE                   24-OCT-08 08.55.54.481000 PM
    Elapsed: 00:00:00.18
    satyaki>
    satyaki>
    satyaki>insert into email_chld values('GRP_INVENTORY','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.07
    satyaki>
    satyaki>insert into email_chld values('GRP_INVENTORY','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.04
    satyaki>
    satyaki>insert into email_chld values('GRP_INVENTORY','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>insert into email_chld values('GRP_PURCHASE','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>insert into email_chld values('GRP_PURCHASE','[email protected]',systimestamp);
    1 row created.
    Elapsed: 00:00:00.11
    satyaki>commit;
    Commit complete.
    Elapsed: 00:00:00.05
    satyaki>
    satyaki>select * from email_chld;
    EMAIL_GRP_HEADER               EMAIL_RECEPIENT                                                                                      CRAETE_TIME
    GRP_INVENTORY                  [email protected]                                                                                      24-OCT-08 08.56.46.107000 PM
    GRP_INVENTORY                  [email protected]                                                                                         24-OCT-08 08.57.03.551000 PM
    GRP_INVENTORY                  [email protected]                                                                                    24-OCT-08 08.57.36.277000 PM
    GRP_PURCHASE                   [email protected]                                                                                      24-OCT-08 08.58.06.129000 PM
    GRP_PURCHASE                   [email protected]                                                                                    24-OCT-08 08.58.26.900000 PM
    Elapsed: 00:00:00.10
    satyaki>And, then based on the group header you can get the list of recipient and use it dynamically inside your PL/SQL Application.
    Regards.
    Satyaki De.

  • How to send SMS Message with Automator

    I find the Action listed but I don't know where I type my message.

    I discovered that I have to add the action Ask for Text prior to the Send SMS Message. Also, I found it odd that I am sending to my iPHone which is AT&T here in the US, but I have to choose Cingular from the carrier dropdown before the text comes through.

  • How to send JMS Message with use title, content, and attach file

    I use OpenJMS server such as Message server
    and use Tomcat 4.0 as web server.
    I want to use JMS to send Message that message have
    title, content, and can attach file.

    You probably wanna use SOAP. SOAP is based on XML, it has a soapheader (can have the title) the soapbody (has your actual message) and it can also have files attached.
    read more here
    http://www.w3.org/TR/SOAP/
    The only thing you have to be carefull with is that when you want to put a SOAPMessage on a JMS queue, you have to serialize it
    kind regards

  • Scenario: SOAP message with attached .zip file to FTP ?

    Hi all,
    I've searched SDN etc but got no good hints to my problem.
    My scenario is tht we are receiving an XML message via SOAP adapter and this is a MIME multipart message so it carries also a attached zip-file.
    The XML and the attached zip-file should then be saved over FTP.
    It enters IS correctly and I can see that I have the attachment and it goes to AE. I can see payload and attachment in the statusreport on receiver cc.
    The FTP adapter saves the payload XML correctly but the attachment is not saved anywhere.
    I have not configured any modules, BIC etc in the FTP adapter and I need some input on how to set this up tp put both files on FTP server.
    In the future the FILE adapter will be used and then I wounder if I will get the same problem there?

    I dont think there is a direct way of doing this. I can suggest you a method. In the directory receiver determination use 2 receivers with no condition. You message will get split in to two now. Create the interface determinations and receiver agreements. Complete one of them normally. It will sav the xml t FTP. For the other one, in the adapter use the payloadswapbean. It will swap the attachement to payload. THis one would save your zip on the ftp server.
    Hope its clear..!!
    VJ

  • How to send UDP message with flash CS5.5?

    Hi,
    I want to send a single UDP message when a button is clicked on an iOS and android device.
    Does anyone know how this is done in Flash?
    Regards,
    Frank

    This doesn't apply directly to iOS and Android but to AS3 in general. I'm not sure how well it'll work since it is noted to be in a beta stage, but:
    http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/net/Datagram Socket.html
    and some examples:
    http://help.adobe.com/en_US/as3/dev/WSb2ba3b1aad8a27b0-181c51321220efd9d1c-8000.html#WSb2b a3b1aad8a27b0-181c51321220efd9d1c-7ffe

Maybe you are looking for

  • Share CUPS-PDF trough SAMBA

    Hello I am having trouble making a working installation of CUPS-PDF to be shared through SAMBA. Windows XP can't find the shared printers, the archbox can find it's own printer shares but can not use cups-pdf through SAMBA because of "Idle - Tree con

  • Tuxedo JCA Adapter Configuraton

    Hello, I'm trying to configure Tuxedo JCA Adapter and have got troubles with making bdmconfig.xml file. First, my enviroments are that Tuxedo 11gR1 and WAS 7 are installed on separate machines. And sample Tuxedo service is bankapp service using oracl

  • Configuring optimizeit profiler for multiple kjs

    Hi, I am facing problems in configuring optimizeit profiler for multiple kjs. It works fine if i have a single kjs in my app server and i am able to read the profiler output. I am using iAS6.0sp2. When i try to change the script that attaches the pro

  • Check constraint generation in physical model in 3.1.1.

    My question: Is it possible to set Use Domain Constraints ticked as default (or another way to get them in DDL) if the Domain with Check constraint is set for the column. I assume it's logical as if I bind a column to the domain then use the domain c

  • Full optimize WinVista for the good developtment of Photoshop x64

    I want to full optimize WinVista 64bits  because my photoshop is a little slow. Thanks.