axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Nelson <tom.nel...@raba.com>
Subject Re: Binary Data
Date Mon, 19 Apr 2004 19:09:56 GMT
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
>
> jerry.jalenak@labone.com
>
>
> 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: 
> securityincidentreporting@labone.com
>


Mime
View raw message