Hi Tom,

As far as I know, the only way to make Axis automatically encode your data as base64, 
is to have the datatype (of your SOAP method) set to "byte[]". So a way around your 
problem could be to e.g. create a complex type that holds (among other things) a field 
that is of the type "byte[]". But that would mean that the "wrapped up in a Map" thing 
would have to go... But again, you could wrap the things up in the (new) complex type 
instead.

Hope this helps!

Eirik


> -----Original Message-----
> From: Tom Oinn [mailto:[EMAIL PROTECTED]]
> Sent: 18. februar 2003 12:00
> To: [EMAIL PROTECTED]
> Subject: Sending binary data contained within a map?
> 
> 
> Hi all,
> 
> This may be a simple question, if so I'd be delighted... I have a web 
> service that returns results wrapped up in a Map, all well 
> and good, it 
> works just fine. The current problem I'm having is that say 
> my service 
> needs to return some binary data, it puts a byte array into 
> the Map, and 
> this is then not unreasonably turned into a soap array of 
> type xsd:byte. 
> Unfortunately, this means that my byte array bloats by about 
> a factor of 
> thirty, which is an overhead I can't really afford.
> 
> So, what I'd like to see on the wire would be a base64 encoded binary 
> type, but I can't see how to persuade axis to do this, can 
> anyone help? 
> I guess what I'd ideally like is something like a java type 
> that, when I 
> put it into my Map, causes a base64 string to be used in the soap 
> representation.
> 
> Cheers,
> 
> Tom (this question is on behalf of a colleague who is 
> currently away, I 
> have to deal with the output of the service and currently the 
> xml format 
> of doom is crashing my servers with out of memory errors...)
> 
> 

Reply via email to