Return-Path: Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Delivered-To: mailing list axis-user@xml.apache.org Delivered-To: moderator for axis-user@xml.apache.org Received: (qmail 28200 invoked from network); 11 Mar 2002 18:22:03 -0000 Received: from billthecat.sdsc.edu (132.249.20.60) by daedalus.apache.org with SMTP; 11 Mar 2002 18:22:03 -0000 Received: from sdsc.edu (IDENT:lhdqWZHnAu3lKDQmBp9ur/uAufMKUkXk@nexor.sdsc.edu [132.249.20.201]) by billthecat.sdsc.edu (8.11.6/8.11.6/mx/18) with ESMTP id g2BIM5B15903; Mon, 11 Mar 2002 10:22:07 -0800 (PST) Message-Id: <200203111822.g2BIM5B15903@billthecat.sdsc.edu> Content-Type: text/plain; charset=iso-8859-1 X-Originating-IP: [132.249.96.143] Date: Mon, 11 Mar 2002 10:22:05 -0800 From: Frank van Lingen MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Can not find AttachmentPart class in beta release To: axis-user@xml.apache.org User-Agent: IMHO/0.98.3 (Webmail for Roxen) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I use attachments in a message example, by creating a soap envelope and adding attachments to the call object. The attachments arrive at the service side together with my soapenvelope. Is this way to add attachments in a message oriented environment? If so, in the latest beta release I can not find the class AttachmentPart. This is the code on the client side I currently use: Options opts = new Options(args); opts.setDefaultURL(ser); Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new URL(opts.getURL()) ); SOAPEnvelope se= new SOAPEnvelope(); FileReader fr = new FileReader (filename); DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder(); Document doc = xdb.parse (new InputSource (fr)); SOAPBodyElement sbe = new SOAPBodyElement(doc.getDocumentElement()); se.addBodyElement(sbe); // create attachement here DataHandler dhSource = new DataHandler( new FileDataSource( filename )); AttachmentPart ap = new AttachmentPart(dhSource); call.addAttachmentPart(ap); dhSource = new DataHandler( new FileDataSource( filename )); ap = new AttachmentPart(dhSource); call.addAttachmentPart(ap); Message m1=call.getMessageContext().getCurrentMessage(); SOAPEnvelope se1 = call.invoke( se); Frank van Lingen