Return-Path: Delivered-To: apmail-ws-soap-user-archive@www.apache.org Received: (qmail 76634 invoked from network); 9 Mar 2004 15:52:09 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Mar 2004 15:52:09 -0000 Received: (qmail 64136 invoked by uid 500); 9 Mar 2004 15:51:58 -0000 Delivered-To: apmail-ws-soap-user-archive@ws.apache.org Received: (qmail 64126 invoked by uid 500); 9 Mar 2004 15:51:57 -0000 Mailing-List: contact soap-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: soap-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list soap-user@ws.apache.org Received: (qmail 64114 invoked from network); 9 Mar 2004 15:51:57 -0000 Received: from unknown (HELO mail1) (216.27.44.101) by daedalus.apache.org with SMTP; 9 Mar 2004 15:51:57 -0000 Received: from clinicaltools.com (zhang.clinicaltools.com [192.168.1.86]) by mail1 (8.12.8/8.12.5) with ESMTP id i29Fpsdj028169 for ; Tue, 9 Mar 2004 10:51:55 -0500 Message-ID: <404DE79C.8010303@clinicaltools.com> Date: Tue, 09 Mar 2004 10:49:48 -0500 From: Daniel Zhang User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: soap-user@ws.apache.org Subject: Re: Extract Binary File(pdf) from SOAP Attachment References: <151001c4044e$d87c6e10$6401a8c0@northgate> <404CE3D6.5030100@clinicaltools.com> <1a8201c40557$2b783b90$6401a8c0@northgate> In-Reply-To: <1a8201c40557$2b783b90$6401a8c0@northgate> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-yoursite-MailScanner-Information: Please contact the ISP for more information X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-SpamCheck: not spam, SpamAssassin (score=-6.6, required 5, BAYES_01 -6.60, USER_AGENT 0.00) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am using Apache SOAP 2.3.1. Thanks. - Daniel Scott Nichol wrote: >Since you mention javax.xml.soap.AttachmentPart, I wonder if you are using Axis, not Apache SOAP. If so, please post to axis-user@ws.apache.org. If you are using Apache SOAP, post that info here and someone will help. > >Scott Nichol > >Do not send e-mail directly to this e-mail address, >because it is filtered to accept only mail from >specific mail lists. >----- Original Message ----- >From: "Daniel Zhang" >To: >Sent: Monday, March 08, 2004 4:21 PM >Subject: Extract Binary File(pdf) from SOAP Attachment > > >Our client sent us a SOAP file in which they packaged pdf files as >AttachmentPart. Basically if you open the file, it has the following >structure: > >----Boundary_value >Content-Type: application/pdf >Content-Id: pdfnameA > >%PDF-1.4 >...pdf content... >%%EOF > >----Boundary_value >Content-Type: application/pdf >Content-Id: pdfnameB > >%PDF-1.4 >...pdf content... >%%EOF > >Question: How can I extract pdf files from this SOAP attachment? First, >I need to populate this soap file into a SOAPMessage object, then I >tried to use javax.xml.soap.AttachmentPart class, I can use >getContentId() and getContentType() to retrieve the header, but either >java.lang.Object getContent() or getDataHandler() lack the methods to >let me write the pdf content as a string to a file. Any ideas? > >TIA, > >-Daniel > > > >