----- Original Message ----- From: "Rick Rineholt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 30, 2003 15:17 Subject: Re: Axis attachment naming enhancement (code attached)
> If the name or extensions are vital to the service then it should be part > of the specification that defines that service's interface and thus > either implied as part of that specification or contained in the SOAP > envelope. Doing something like this automatically as part of Axis > implementation would promote the development of services on Axis that was > not portable with other SOAP implementations and thus IMO should be > avoided. Using HEADERS does not extend to DIME attachments which is > another reason I'm opposed to this solution. Makes sense. FYI my service does require the file names to go down as a separate string array, and since it can work with either DIME or SOAP (the client is switchable, the server agnostic), I am going to stick with it: //turn dime on if (Const.USE_DIME) { server._setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT, Call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME); } //add our attachments DataHandler buildFile = new DataHandler(new FileDataSource(file)); server.addAttachment(buildFile); //now StringArray filenames = new StringArray(); filenames.setElt(new String[]{file.getName()}); return server.submitSimpleJob(email, name, filenames); On the subject of attachments, I think it is time someone wrote up a doc on the ins and outs of attaching stuff.