Hi Subhendu,

  In order to clear questions from you, we'll need more details of
your situation;

  - Version of AXIS: 1.0, 1.1Beta, RC1, RC2, or the current ver ?
  - Type of Image  : 'JPEG', 'GIF', or the other specific types ?
  - Real problem   : 'Exceptions', or 'Functionally defectives' ?

  If you're using AXIS 1.1 Beta (or the later) and 'image/jpeg
or image/gif' as the content type (i.e. your image archive only
has JPEG files and/or GIF files), you might make it with the 
following snapshot;

public DataHandler downladFile(java.lang.String filename){
  try{
    FileDataSource dataSource = new FileDataSource(filename);
    DataHandler dataHandler = new DataHandler(dataSource);
    return dataHandler;
  }catch(Exception e){
      :
  }
}

  Please note DataHandler hasn't been implemented as serializable,
however, some standardized types of content (MIME type) will be
automatically serialized and deserialized by the runtime, AXIS
with your right configuration.

Best Regards,

  Toshi (Toshiyuki Kimura) <[EMAIL PROTECTED]>
  R&D Headquarters
  NTT DATA Corporation

-----Original Message-----
From: subhendukumar mohanty [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 10:05 AM
To: [EMAIL PROTECTED]
Subject: help required for attachment using ejb as
         webservice provider

We are creating a ejb which will be exposed as webservice.
One of the method of ejb will return the image from image
archive. So we need to use soap with attachment for this.
I learned that if any data is returned using DataHandler
it will be automatically passed as soap with attachment.
As DataHandler is not implemented java.io.serializable,
I can not use this as the return type of the ejb. I am new
to webservice and axis. So any body can guide me what to do
in this case..

Your help will be appreciated.

Thanks,
Subhendu

Reply via email to