I found out that the two reliable ways to exchange binary data between axis and .NET is to use a byte[] or DIME. Both work well but DIME is more memory efficient.
Best Regards, Paulo Soares > -----Original Message----- > From: Jerry Jalenak [mailto:[EMAIL PROTECTED] > Sent: Monday, April 19, 2004 8:28 PM > To: '[EMAIL PROTECTED]' > Subject: RE: Binary Data > > Tom - > > Thanks for the reply. I had gone ahead and tried to return a type of > 'DataHandler', but was having problems on the client side making it > understand the return type. Never occurred to me to try > 'Object'. I'll > make the changes and try it again. > > 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] > > >
