(SOAP)File Attachment

Hi All,
I am currently working on SOAP Attachments. My requirement is to send a file as an attachment ( SOAP req containing an attachment),BPEL when receicves the Input should process it to a file adapter which will write the file (attached file) to a particular location.
can any one help me out out of this
Thanks
Surya
Edited by: 944642 on Jul 30, 2012 4:51 AM

Ex:-
Send a SOAP Request having file attached to it ( ex:- a text file) . BPEL or Mediator should be able to process the request (request containing an attachment , in our case a text file)
, route to a file adapter.
-The File Adapter should write the file to some location on the file system.
-For schemas I referred to [http://www.w3.org/TR/2004/WD-xml-media-types-20041102/].
-Sample SOAP request having Image attached to it should look like :-
The following example shows a SOAP 1.1 message with an attached facsimile image of the signed claim form (claim061400a.tiff):
MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml;
start="<[email protected]>"
Content-Description: This is the optional message description.
--MIME_boundary+
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <[email protected]>
+<?xml version='1.0' ?>+
+<SOAP-ENV:Envelope+
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+<SOAP-ENV:Body>+
+..+
+<theSignedForm href="cid:[email protected]"/>+
+..+
+</SOAP-ENV:Body>+
+</SOAP-ENV:Envelope>+
--MIME_boundary+
Content-Type: image/tiff
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>
+...binary TIFF image...+
MIME_boundary+
But My SOAP request having image attached to it looks like
POST http://localhost:7001/soa-infra/services/default/bpel-111-soap-attachments/Mediator1_ep HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/related; type="application/xop+xml"; start="<[email protected]>"; start-info="text/xml"; boundary="----=_Part_33_1143898358.1343888133522"
SOAPAction: "execute"
MIME-Version: 1.0
Content-Length: 2124
Host: localhost:7001
Proxy-Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
------=_Part_33_1143898358.1343888133522
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <[email protected]>
*<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ct="http://example.com/ct-required">*
*<soapenv:Header/>*
*<soapenv:Body>*
*<ct:MyBinaryData ct:contentType="image/jpeg"><inc:Include href="cid:1236481897083" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></ct:MyBinaryData>*
*</soapenv:Body>*
*</soapenv:Envelope>*
------=_Part_33_1143898358.1343888133522
Content-Type: image/jpeg; name=javaicon32.jpeg
Content-Transfer-Encoding: binary
Content-ID: <javaicon32.jpeg>
Content-Disposition: attachment; name="javaicon32.jpeg"; filename="javaicon32.jpeg"
*<*** Here I am able to see the encoded image*****>*
Kindly guide me in this regard.
Hope the above mentioned Information describes my requirement clearly.
Thanks

Similar Messages

  • Issue in File to SOAP as Attachment

    Hi,
    I have scenario from File to SOAP.
    I ma to send two files one file as content of SOAP request and other one as file attachment. The problem is i cannot send message both file content and file attachment.
    Because when i select the "keep attachment" in the SOAP adapter  both content and attachment become attachment, but if i didn't tick, only content is display by the recipient without the attachment.
    How can i configure SOAP adapter so the recipient can receive both  content file and attachment file.
    Solution will be rewarded
    Thanks
    Jaideep Baid

    hi gaurav,
       actually my SOAP payload will be a file only but I wnat to send till a perticular node as a SOAP payload and rest part as an attachment.
    like
    message----Root node
          field 1
          field 2
          field 3
             subfield 1
             subfield 2
             subfield 3
             subfield 4
    SO i want till field2 it should go as payload and from field 3 i should go as attachment.
    OR i can make two files of different name.
    file1's content
       field 1
       field 2
    file2's content
        field 3
             subfield 1
             subfield 2
             subfield 3
             subfield 4
    Now in this case file 1 should go as SOAP payload and File2 as attachment.
    So that In XI i can see two different file one named as mainDocument and other one name as Attachment.
    Plzz suggest any solution
    Thanks
    Jaideep jain

  • SOAP Axis sender with CSV file attachment

    Hi Experts,
    I have a requirement where I receive a CSV file attachment from a Web Service post ( i.e a SOAP sender with attachment). I decided to use SOAP with Servlet(Axis) protocol, since standard SOAP sender does not allow modules to be used.
    I am able to test this interface through SOAPUI with attachment to the point where I can get the attachment payload as my main payload in IE, but it fails in mapping since CSV needs to be converted to XML. I have following queries for proceeding ahead with this scenario:
    1. How do I convert the CSV attachment to XML inorder for mapping to be used in IE. Is there a standard axis handler available for this ???? Also where should this handler be called in the sequence of Axis modules ???
    2. Can I use MessageTransformationBean for converting plain to XML ??? If yes where should this module be called in the sequence of Axis modules. I tried using this module between the CallSapAdapter and the first AdapterBean but it returns exception in SOAPUI saying " Messaging exception: No Main"
    3. Is there a blog available which illustrates about using additional modules/handlers in Axis. I have had a look at the FAQ note of Axis but it just gives the overview.
    Thanks.
    Siddhesh S.Tawate

    Solved :).
    1     AF_Adapters/axis/HandlerBean                     Local Enterprise Bean                              xireq
    2     AF_Adapters/axis/AFAdapterBean                     Local Enterprise Bean                              afreq
    3     localejbs/AF_Modules/MessageTransformBean    Local Enterprise Bean                     Plain2XML
    4     CallSapAdapter                                          Local Enterprise Bean                              sap
    5     AF_Adapters/axis/AFAdapterBean                    Local Enterprise Bean                             afresp
    6     AF_Adapters/axis/HandlerBean                    Local Enterprise Bean                             xires
    Above sequence worked. I guess I was missing some parameter in content conversion earlier.
    Thanks.

  • How to extract data from OMElement object file attachment SOAP Service

    We are having Axis2 Tomcat6 Webservice on SOAP WSDL
    The Webservice method is like this
    public String uploadGpxFile(OMElement omEle) throws AxisFault {
        // Extract file attachment from omEle
       // store in database
       return "ok";
    So, I just went through the documentation and executed
    omEle.getText();
    This printed the attached data like this
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
       <soapenv:Body>
          <ns:uploadGpxFileResponse xmlns:ns="..........">
             <ns:return><![CDATA[ MY REQUIRED XML DATA IS HERE ]]></ns:return>
          </ns:uploadGpxFileResponse>
       </soapenv:Body>
    </soapenv:Envelope>
    So, I essentially want to extract this data and store in database. My simple question is how to do it!
    It sounds crazy but, I am quite new to Java. I was actually debugging client and found there is a problem in server and started fixing it!! It would be very helpful if someone helps

    Hi,
    as far as i know you have to use sql to archive your goal, i.e. write your own methods for every complex sql-statement you want to use. thats the sad thing about the whole ORM-concept.
    Greetings,
    dsp

  • Soap with Attachment

    Hello,
    I need to develop a WebDynpro application with NetWeaver 2.0 for SAP EP6 that call a remote web service in order to send an attached file with SWA (Soap With Attachment) methodology. The kind of file to attach is XML.
    Can someone give me refers or indications to implement it?
    Thanks and best regards,
    Matteo.
    Edited by: Matteo De Santis on Oct 21, 2008 11:45 AM

    Following link might help you :
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/5e/ea656273b74cf386a1f29fc55721fd/frameset.htm
    Thanks.

  • Send SOAP DIME Attachment (please comment on my sample code)

    Hi All,
    I had hard time trying to find a send SOAP DIME attachment
    code for the web service. And here it is, I wrote one,
    but I use to easy way to deploy the service.
    I just simply change the extension .java to .jws,
    so, can you all tell me whether it will be a problem or not ?
    And please review my code below, I debugged and no error,
    but I am not sure if it is working right.
    Basiclly 2 operations:
    public String generateID(int artID)
    public File detachFile(String filename)
    Please comment on this code, I am trying to make it
    more robust, so, that I can redo it and post it to share with
    everybody.
    thanks,
    Derek
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.io.*;
    import java.security.*;
    import java.security.NoSuchAlgorithmException;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.xml.soap.AttachmentPart;
    import org.apache.axis.AxisFault;
    import org.apache.axis.Message;
    import org.apache.axis.MessageContext;
    import org.apache.axis.attachments.Attachments;
    import org.apache.axis.attachments.AttachmentsImpl;
    import org.apache.log4j.Logger;
    public class AttachmentYPMG
         private static final Logger _logger = Logger.getLogger(AttachmentYPMG.class);
         public AttachmentYPMG()
         public String generateID(int artID)
              String artid = Integer.toString(artID);
              String md5_hash_string = plainStringToMD5(artid);
              return md5_hash_string;
         private String plainStringToMD5(String input) {
                // Some stuff we will use later
                MessageDigest md = null;
                byte[] byteHash = null;
                StringBuffer resultString = new StringBuffer();
                // Bad things can happen here
                try {
                  // Choose between MD5 and SHA1
                       md = MessageDigest.getInstance("MD5");
                } catch(NoSuchAlgorithmException e) {
                    System.out.println("NoSuchAlgorithmException caught!");
                    System.exit( -1);
                // Reset is always good
                md.reset();
                // We really need some conversion here
               md.update(input.getBytes());
                // There goes the hash
                byteHash = md.digest();
               //  Now here comes the best part
                for(int i = 0; i < byteHash.length; i++) {
                  resultString.append(Integer.toHexString(0xFF & byteHash));
              // That's it!
              return(resultString.toString());
         public File detachFile(String filename)
              InputStream is = null;
              FileOutputStream os = null;
              File file = null;
              int totalAttachments ;
              try
                   //Get all the attachments
                   AttachmentPart[] attachments = getMessageAttachments();
                   * getMessageAttachments() as provided by Steve Loughran in his mail
                   * to axis-user group
                   * http://www.mail-archive.com/[email protected]/msg08732.html
                   //Put the logic in a loop for totalAttachments for multiple
                   // attachments.
                   totalAttachments = attachments.length;
                   _logger.debug("saveFile(String filename = " + filename + ") - " +
                                  "Total Attachments Received Are: "+ totalAttachments);
                   //Extract the first attachment. (Since in this case we have only one attachment sent)
                   DataHandler dh = attachments[0].getDataHandler();
                   //Extract the file name of the first attachment.
                   String name = filename;
                   _logger.debug("saveFile(String filename = " + filename + ") - File received on server is: " + name);
                   //Get the streams to file and from attachment, then stream to disk
                   is = dh.getInputStream();
                   file = new File(name);
                   os = new FileOutputStream(file);
                   this.writeBuffersAndClose(is, os);
              } catch (Exception e)
                   _logger.error("detachFile(String filename = " + filename + ")", e);
                   //throw new AttachmentException(e);
              //if(file!= null)
                        return file;
              //else
                   //throw new AttachmentException("The attachment was not saved");
         * extract attachments from the current request
         * @return a list of attachmentparts or an empty array for no attachments
         * support in this axis buid/runtime
         private AttachmentPart[] getMessageAttachments() throws AxisFault
              * Reusing the method implementation for AttachmentPart[]
              * getMessageAttachments() as provided by Steve Loughran in his mail to
              * axis-user group
              * http://www.mail-archive.com/[email protected]/msg08732.html
              MessageContext msgContext = MessageContext.getCurrentContext();
              Message reqMsg = msgContext.getRequestMessage();
              Attachments messageAttachments = reqMsg.getAttachmentsImpl();
              if (null == messageAttachments)
                   System.out.println("no attachment support");
                   return new AttachmentPart[0];
              int attachmentCount = messageAttachments.getAttachmentCount();
              AttachmentPart attachments[] = new AttachmentPart[attachmentCount];
              Iterator it = messageAttachments.getAttachments().iterator();
              int count = 0;
              while (it.hasNext())
                   AttachmentPart part = (AttachmentPart) it.next();
                   attachments[count++] = part;
              return attachments;
         * Simple method for writing one stream from another.
         * @param is
         * @param os
         * @throws IOException
         private void writeBuffersAndClose(InputStream is, OutputStream os)
              throws IOException
              int i = 0;
              byte [] buffer = new byte[1024];
              while (i != -1)
                   i = is.read(buffer, 0, buffer.length);
                   if(i > 0)
                        os.write(buffer, 0, buffer.length);
              is.close();
              os.close();

    Hi All,
    I had hard time trying to find a send SOAP DIME attachment
    code for the web service. And here it is, I wrote one,
    but I use to easy way to deploy the service.
    I just simply change the extension .java to .jws,
    so, can you all tell me whether it will be a problem or not ?
    And please review my code below, I debugged and no error,
    but I am not sure if it is working right.
    Basiclly 2 operations:
    public String generateID(int artID)
    public File detachFile(String filename)
    Please comment on this code, I am trying to make it
    more robust, so, that I can redo it and post it to share with
    everybody.
    thanks,
    Derek
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.io.*;
    import java.security.*;
    import java.security.NoSuchAlgorithmException;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.xml.soap.AttachmentPart;
    import org.apache.axis.AxisFault;
    import org.apache.axis.Message;
    import org.apache.axis.MessageContext;
    import org.apache.axis.attachments.Attachments;
    import org.apache.axis.attachments.AttachmentsImpl;
    import org.apache.log4j.Logger;
    public class AttachmentYPMG
         private static final Logger _logger = Logger.getLogger(AttachmentYPMG.class);
         public AttachmentYPMG()
         public String generateID(int artID)
              String artid = Integer.toString(artID);
              String md5_hash_string = plainStringToMD5(artid);
              return md5_hash_string;
         private String plainStringToMD5(String input) {
                // Some stuff we will use later
                MessageDigest md = null;
                byte[] byteHash = null;
                StringBuffer resultString = new StringBuffer();
                // Bad things can happen here
                try {
                  // Choose between MD5 and SHA1
                       md = MessageDigest.getInstance("MD5");
                } catch(NoSuchAlgorithmException e) {
                    System.out.println("NoSuchAlgorithmException caught!");
                    System.exit( -1);
                // Reset is always good
                md.reset();
                // We really need some conversion here
               md.update(input.getBytes());
                // There goes the hash
                byteHash = md.digest();
               //  Now here comes the best part
                for(int i = 0; i < byteHash.length; i++) {
                  resultString.append(Integer.toHexString(0xFF & byteHash));
              // That's it!
              return(resultString.toString());
         public File detachFile(String filename)
              InputStream is = null;
              FileOutputStream os = null;
              File file = null;
              int totalAttachments ;
              try
                   //Get all the attachments
                   AttachmentPart[] attachments = getMessageAttachments();
                   * getMessageAttachments() as provided by Steve Loughran in his mail
                   * to axis-user group
                   * http://www.mail-archive.com/[email protected]/msg08732.html
                   //Put the logic in a loop for totalAttachments for multiple
                   // attachments.
                   totalAttachments = attachments.length;
                   _logger.debug("saveFile(String filename = " + filename + ") - " +
                                  "Total Attachments Received Are: "+ totalAttachments);
                   //Extract the first attachment. (Since in this case we have only one attachment sent)
                   DataHandler dh = attachments[0].getDataHandler();
                   //Extract the file name of the first attachment.
                   String name = filename;
                   _logger.debug("saveFile(String filename = " + filename + ") - File received on server is: " + name);
                   //Get the streams to file and from attachment, then stream to disk
                   is = dh.getInputStream();
                   file = new File(name);
                   os = new FileOutputStream(file);
                   this.writeBuffersAndClose(is, os);
              } catch (Exception e)
                   _logger.error("detachFile(String filename = " + filename + ")", e);
                   //throw new AttachmentException(e);
              //if(file!= null)
                        return file;
              //else
                   //throw new AttachmentException("The attachment was not saved");
         * extract attachments from the current request
         * @return a list of attachmentparts or an empty array for no attachments
         * support in this axis buid/runtime
         private AttachmentPart[] getMessageAttachments() throws AxisFault
              * Reusing the method implementation for AttachmentPart[]
              * getMessageAttachments() as provided by Steve Loughran in his mail to
              * axis-user group
              * http://www.mail-archive.com/[email protected]/msg08732.html
              MessageContext msgContext = MessageContext.getCurrentContext();
              Message reqMsg = msgContext.getRequestMessage();
              Attachments messageAttachments = reqMsg.getAttachmentsImpl();
              if (null == messageAttachments)
                   System.out.println("no attachment support");
                   return new AttachmentPart[0];
              int attachmentCount = messageAttachments.getAttachmentCount();
              AttachmentPart attachments[] = new AttachmentPart[attachmentCount];
              Iterator it = messageAttachments.getAttachments().iterator();
              int count = 0;
              while (it.hasNext())
                   AttachmentPart part = (AttachmentPart) it.next();
                   attachments[count++] = part;
              return attachments;
         * Simple method for writing one stream from another.
         * @param is
         * @param os
         * @throws IOException
         private void writeBuffersAndClose(InputStream is, OutputStream os)
              throws IOException
              int i = 0;
              byte [] buffer = new byte[1024];
              while (i != -1)
                   i = is.read(buffer, 0, buffer.length);
                   if(i > 0)
                        os.write(buffer, 0, buffer.length);
              is.close();
              os.close();

  • XML BLOB to SOAP with attachment

    Is it possible to receive in XI an asyc. message with BLOB information in an XML tag
    and transform it to SOAP message with attachment?

    >how to convert the BLOB to the pdf\jpg\tiff file attachment in the SOAP?
    refer this link for sample.. If you are not java programmer take help from java experts. Basically you have to use jdbc java classes to retrieve and convert the display into image.
    http://www.techlabs4u.com/2011/10/reading-blob-data-in-db2-using-java-how.html
    For soap attachment refer payloadswapbean module. Refer sdn forum related to this.... also see this help [link|http://help.sap.com/saphelp_nw73/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm]

  • InvalidSecurity Exception in WS and SOAP with Attachment

    Hi all, <bR>
    <br>
    I created a EJB based webservice with the following signature:      <br><br>
    public String businessMethod2(byte[] arg1) {..}<br>
    <br>
    <br>
    This Method is exposed as webservice, which is configured as SOAP with Attachment. <br>
    All security or authentication settings are disabled by intention. <br>
    The input param arg1 should be a binary file.
    <br><br>
    When I call this webservice I always get the following response: <br><bR>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" <br>
    xmlns:xs="http://www.w3.org/2001/XMLSchema" <br>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bR>
       <SOAP-ENV:Body><bR>
          <SOAP-ENV:Fault><bR>
             <faultcode xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><b>wsse:InvalidSecurity</b></faultcode><bR>
             <faultstring>000F1F90EDDB006C00000012000014D8000437A5EE6DAE4E : <b>WS Security can only be applied on a SOAP document.</b></faultstring><bR>
             <detail><bR>
                <ns1:com.sap.security.core.server.ws.service.WSSecurityException xmlns:ns1="http://sap-j2ee-engine/error">000F1F90EDDB006C00000012000014D8000437A5EE6DAE4E : WS Security can only be applied on a SOAP document.</ns1:com.sap.security.core.server.ws.service.WSSecurityException><bR>
             </detail><bR>
          </SOAP-ENV:Fault><bR>
       </SOAP-ENV:Body><bR>
    </SOAP-ENV:Envelope><bR>
    <br>
    <br>
    My guess is, that the WAS 7.00 SP11 is magically configured for applying WS-Security to every webservice. <br>
    <br>
    The Security Profile settings for Inbound / Outbound - Paramters is "None" in Visual Admin Webservice Security. <br>
    <br>
    How can I get rid of this Exception and make the webservice work?
    <br>
    <br>
    regards <br>
    Gabi  <br>

    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=4967
    grazieee wrote:
    >
    HI, i have found an example that illustrates the reception and return of SOAP attachments
    in web service method. However, the weblogic workshop I am using does not recognise
    'DataHandler'. I typed 'public String echoAttachment(DataHandler dh) and it said
    'web service does not support such data type'. Is there any resolution to it?
    And if convenient, can i have the source code of attaching images to SOAP?
    Thanks alot.
    Good Day!
    grazieee
    P/S: I'm using weblogic version 8.1

  • SOAP w/Attachment: SwA question

    I am working on a SOAP w/Attachment web service to return an octet stream for a PDF file.
    If I understand how this works, the SOAP envelope indicates that the real data (the octet stream) is coming after the SOAP envelope. I have setup the web service in the HTML DB web services area and tested it. It returns a SOAP envelop and after it comes a bunch of data which I assume is the octet stream.
    I do not know what I need in the way of an XSL rendering style sheet to make this work. Is it even the right place to be looking to redirect the octet stream to the web browser as a know file format, in this case a PDF file.

    repost

  • Retaining original filename in FILE- SOAP- SOAP- FILE

    We have faced a scenario where I have to retain original filename in File-> SOAP-> SOAP ->File. The issue is that we don't have any ESR objects and neither do we intend to create any. So its purely configuration to transfer file from one folder to another.
    Any suggestion would be highly appreciated.
    Thanks,
    Swati

    Hello Swati,
    Even after trying the above steps suggested by Praveen, if you don't get the results use Dynamic Configurations module in the Receiver channel along with the above settings.
    1) Make sure the above settings are done (given by Praveen)
    2) Assign a new variable as the file name parameter under receiver channel configurations.
    3) Assign the "message:interface_name" value to the variable under Variable Substitution
    4)Under Module Tab do the following:
    Let me know if you still face any further issue.
    Regards,
    Simran

  • Text messages with animated .gif files attachment

     I recieved a text the other day with an animated gif file attached. I believe it was sent as a zip file. Anyway I tried to open it and all I got was a gray screen with an icon . No animation.. The second one I recieved was from a buddy. I watched and listened to it on his Droid 1. I had him send it to my phone text came through fine when I went to load and play the gif file it .had sound but no animation, just the gray screen again. I know the attachment is a zip file as I sent it to my email and opened it on my computer. Any thoughts maybe there's a setting I'm not finding? I'm using whatver text mesage program thats standard on the DX.
    Thanks
    MTY55.

    Sounds like the issue you are having is that the files are zipped, MMS should be zipped because it has to access the files to display it.. I send and recieve anifated gif files and they play fine but also keep in mind that for some reason the stock email client does not play all files at same time, if there is a audio and photo, it will play audio and then the photo..

  • After I Update to IOS 7.1 I can't open the excel file attached in  my email

    After I updated my Iphone 5s from IOS7.0.6 to IOS7.1 when i check my email i can't open excel file attached in my email i check with my frineds phone thy have same issoue

    David_PDX wrote:
    Hi Alex,
    The trick to this whole thing is to scroll to the bottom of the message. There should be a dashed line at the bottom of the email message with text underneath it that says, "This message was downloaded as plain text." Underneath that it should say (in blue hyperlink text) "Download full message". Select that hyperlink, and the Excel file should download completely. You should then be able to select the document and have it open correctly.
    I have had the same concern regardless of file format that is sent, so I do not believe your issue is with file format. Hope this helps.
    I've seen the same thing happen with images, which it displays in a corrupted form. It's fixed by downloading the full message.
    There's a more serious side effect of this, which I've now seen with several types of files. If one FORWARDS the email to someone else, the attached files it sends them are CORRUPTED and unopenable too. In the case of a Word files I looked at, it had dropped the last two bytes of the file.
    The workaround for that is to download the full message before forwarding.
    I'm seeing this happening with so many types of attachments that I'm assuming it affects them all. Please everyone report this to Apple feedback (http://www.apple.com/feedback/). It's one thing not being able to open a file on your device, it's another to have files corrupted permanently just by forwarding.

  • How to use UTL_SMTP to send email with existing file attachment

    Hello! I am trying to create a pl/sql procedure that lets me send an email and include an existing file to a email address. So far, I found information on how to send a file and create an attachment with information I put in the procedure. This is NOT what I'm trying to do. I'm trying to send an email and include an attachment for a file that already exists. I need the pre-existing file to be sent to the email recipient.
    This is how far I've gotten, but this only allows me to CREATE an attachment with the information I put in it from the procedure. I got it from the following site:
    http://www.orafaq.com/wiki/Send_mail_from_PL/SQL
    DECLARE
       v_From       VARCHAR2(80) := '[email protected]';
       v_Recipient  VARCHAR2(80) := '[email protected]';
       v_Subject    VARCHAR2(80) := 'Weekly Invoice Report';
       v_Mail_Host  VARCHAR2(30) := 'mail.mycompany.com';
       v_Mail_Conn  utl_smtp.Connection;
       crlf         VARCHAR2(2)  := chr(13)||chr(10);
    BEGIN
      v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
      utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
      utl_smtp.Mail(v_Mail_Conn, v_From);
      utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
      utl_smtp.Data(v_Mail_Conn,
        'Date: '   || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
        'From: '   || v_From || crlf ||
        'Subject: '|| v_Subject || crlf ||
        'To: '     || v_Recipient || crlf ||
        'MIME-Version: 1.0'|| crlf ||     -- Use MIME mail standard
        'Content-Type: multipart/mixed;'|| crlf ||
        ' boundary="-----SECBOUND"'|| crlf ||
        crlf ||
        '-------SECBOUND'|| crlf ||
        'Content-Type: text/plain;'|| crlf ||
        'Content-Transfer_Encoding: 7bit'|| crlf ||
        crlf ||
        'This is a test'|| crlf ||     -- Message body
        'of the email attachment'|| crlf ||
        crlf ||
        '-------SECBOUND'|| crlf ||
        'Content-Type: text/plain;'|| crlf ||
        ' name="ap_inv_supplier_cc10.txt"'|| crlf ||
        'Content-Transfer_Encoding: 8bit'|| crlf ||
        'Content-Disposition: attachment;'|| crlf ||
        ' filename="ap_inv_supplier_cc10.txt"'|| crlf ||
        crlf ||
        'TXT,file,attachment'|| crlf ||     -- Content of attachment  (THIS IS MY PROBLEM!  I NEED TO BE ABLE TO ATTACH AN EXISTING FILE, NOT CREATE A NEW ONE)
        crlf ||
        '-------SECBOUND--'               -- End MIME mail
      utl_smtp.Quit(v_mail_conn);
    EXCEPTION
      WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
        raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
    END;
    /

    First, you must create a directory object
    create directory ORALOAD as '/home/ldcgroup/ldccbc/'
    /Study the Prerequisites in the link I posted above, or else you will not be able to read/write files from the above directory object
    "fname" relates to the file name that you read from.
    In the code below, it is also the name of the file that you are attaching.
    Although they can be different!
    l_Output is the contents of the file.
    declare
    vInHandle  utl_file.file_type;
    flen       number;
    bsize      number;
    ex         boolean;
    l_Output   raw(32767);
    fname      varchar2(30) := 'ap_inv_supplier_cc10.txt';
    vSender    varchar2(30) := '[email protected]';
    vRecip     varchar2(30) := '[email protected]';
    vSubj      varchar2(50) := 'Weekly Invoice Report';
    vAttach    varchar2(50) := 'ap_inv_supplier_cc10.txt';
    vMType     varchar2(30) := 'text/plain; charset=us-ascii';
    begin
      utl_file.fgetattr('ORALOAD', fname, ex, flen, bsize);
      vInHandle := utl_file.fopen('ORALOAD', fname, 'R');
      utl_file.get_raw (vInHandle, l_Output);
      utl_file.fclose(vInHandle);
      utl_mail.send_attach_raw(sender       => vSender
                              ,recipients   => vRecip
                              ,subject      => vsubj
                              ,attachment   => l_Output
                              ,att_inline   => false
                              ,att_filename => fname);
    end;
    /

  • How do I get an email file attachment, any extension, off of my phone?

    All I want to do is get an email file attachment off of my phone and on to my computer so I can use it.  I don't want to open it on my phone, it could be an AutoCAD file, a programming langauge file, etc.  I want the option to save the attachment to local memory on my phone and then transfer it to my PC via USB.   This worked all the time with my Blackberry, but it seems impossible or extremely difficult with the Apple IOS. The available phone memory would look like a USB stick drive to my PC.  I am at job sites all the time where I do not have internet access from my PC, but I am within the cell network area of coverage so this would be an option.
    I spent almost an hour with Apple Tech support today and they must have thought that I was on drugs asking for such a simple thing.  Apparently, the available phone memory is protected by the IOS so that the PC can't see it or use it.  They said this feature would be all App based.  The key then is finding an App that would allow the email client on the phone to give the user the option to open or save the file to a location that my PC can see. Does anyone know of such an App?   If I can't find a workable solution I may have to go to an Android device.  Thanks.

    So I understand where you are coming from. The best way is to use the cloud. What you need to do is download a program like dropbox, box.net or sugar sync; there are tons of these apps but those 3 are the most widely supported. Once you download it on your device you can then download it onto your computer by going to their respective sites. These will automatically sync your documents over the air when both your computer and phone are connected to the internet. But if you have no internet service on your computer here is what you do; go to itunes and plug in your phone> go over to the APPS tab on the top> scroll to the bottom of the page and it will say file transfer. This will allow you to pull files from those cloud apps even without service and voila you have your files on your computer even without Wi-Fi or hotspots. I hope this helps!
    EDIT; the best app to use file transfer with is good reader because the cloud apps won't sync directly with iTUnes. You will have to pay for it but it will allow you to connect all your cloud services to it and it can edit and view most files. I use it constantly for my work and I wouldn't be able to live without it even if I wasn't using it for file transfer. Sorry I forgot that in my post, this is an necessity to use the file transfer in iTunes.
    Message was edited by: MFS APPLE PRO

  • I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to sen

    I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to send emails with photos embedded. I like adding the frames and backgrounds and I think it's easier for recipients to look at the photos. Thanks for any suggestions of things to try.
    Gail

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

Maybe you are looking for

  • Availibility check at Storage location level

    Dear all, we have implemented inventory management ( not wm and lean wm ) , my business scenerio is when i am creating the STO the availibility check is carried out which is considering all the storage locations of supplying site e.g  SL01 - Unrestri

  • ISync WONT Sync with Nokia N95 please help!

    HI can anyone help me please! I'm running OSX 10.4.10 on a Macbook pro. I have downloaded the N95 plug in. - and run it first. Paired the two (deleted previous pairing) Ran iSync (2.4(501.2))to add device which sees the N95 and reports that iSync can

  • Cannot open presentation after sync failure

    Hi, My internet connection dropped whilst I was saving my Keynote presentation to my .Mac account and now I can't open the file either offline or online. Does anyone know if there is a backup created as I've been working on this presentation for two

  • PSE10 not writing dates to files consistently

    I asked essentially this question on Elements Village a few days ago.  No responses as yet, so I thought I'd try here... In PSE10, I have many photos scanned to TIFFs. In the Organizer, I set the dates for these photos to match when the original phot

  • Closing and Saving Files

    I'm new to Photoshop.  In preparing photos imported from iphoto for a book, I've learned how to change the ppi and format, but when I try to move on I find I don't know how to save and close out of editing a photo.  The photos either have red "edit i