Thanks to everyone who replied on this question. I have one follow on though. I've been able to return a single image file back to my client through the DataHandler object - this seems to work really well. On the client side this comes across as an AttachmentPart. I've now been asked if it is possible to return multiple images back the same way - in other words, can I send back multiple attachements? I've been checking out the doc's on the DataHandler object, but it looks like it only takes a single data source (FileDataSource). How can I return multiple attachments?
Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] > -----Original Message----- > From: Tom Nelson [mailto:[EMAIL PROTECTED] > Sent: Monday, April 19, 2004 2:10 PM > To: [EMAIL PROTECTED] > Subject: Re: Binary Data > > > I can't profess to be a source of good advice, but I have done > some tests that are similar. > > I've had some success at interoperability by declaring the return type > of the the service method as an 'Object' instead > of a 'DataHandler': > > Object getFile(String name) { return new DataHandler(new > FileDataSource(name)); } > > You'll probably have to use DIME to talk to C#. > > The actual message going back is just an application/dime (or > multipart/related) message > If the return type of the service is declared as an Object, > the generated wsdl only requires the client to > understand "anyType" in the wsdl file, and the client can do > whatever it > it likes with the incoming application/dime message. If your C# client > can parse that type, you should be in business. > > Hope this helps. > > Tom Nelson > RABA Technologies > > > On Apr 19, 2004, at 2:29 PM, Jerry Jalenak wrote: > > > Hi All, > > > > I'm needing to return binary data (.tif images) from an Axis > > webservice to > > both Java clients and C# clients. Is there a recommended > > best-practice for > > doing this? I found a hit in google on using the > > javax.activation.DataHandler to the binary data to a SOAP > message as an > > attachment. Is there an easier / better way to simply stream the > > binary > > data back to the client? > > > > Thanks! > > > > Jerry Jalenak > > Development Manager, Web Publishing > > LabOne, Inc. > > 10101 Renner Blvd. > > Lenexa, KS 66219 > > (913) 577-1496 > > > > [EMAIL PROTECTED] > > > > > > This transmission (and any information attached to it) may be > > confidential and > > is intended solely for the use of the individual or entity > to which it > > is > > addressed. If you are not the intended recipient or the person > > responsible for > > delivering the transmission to the intended recipient, be > advised that > > you > > have received this transmission in error and that any use, > > dissemination, > > forwarding, printing, or copying of this information is strictly > > prohibited. > > If you have received this transmission in error, please immediately > > notify > > LabOne at the following email address: > > [EMAIL PROTECTED] > > > > This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED]
