Hi Subhendu,

  Could you make sure that you have the right setting
of the serializer for a DataHandler on wsdd ?  And one
more question, are you successful with a non-ejb impl ?

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

----- Original Message ----- 
From: "subhendukumar mohanty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 10:36 PM
Subject: RE: help required for attachment using ejb as webservice
>
> Thanks for your suggestion
> 
> Actually i had tried making a DataHandler as return type of EJB method.
> For the time being think that there is no webservice. I wrote the sample
> ejb and run that sample and it gave me nonserializable exception.That's
> why i could not use this. For ejb all the return type has to extend
> Java.io.serializable.
> 
> Let me know if i am not correct
> 
> -----Original Message-----
> From: Toshiyuki Kimura [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 10:43 PM
> To: [EMAIL PROTECTED]
> Subject: RE: help required for attachment using ejb as webservice
> 
> Hi Subhendu,
> 
>   You're incorrect.  You can't make it the return type in
> ejb method.  Why not ?  I can do that.  I don't know why
> you didn't try anyway ?
> 
>   I believe, you're confusing the meaning of the word;
> 'serialize' in the Web Services area with 'serializable'
> in the general Java programming.
>   The diff. of serialize/deserialize in the 2 areas are;
> 
>  WS area : [Program lang. specific objects] <-> [XML(SOAP)]
>  Java gen: [Java objects] <-> [byte array]
> 
>   These are quite different, despite the misleading word.
> Can you make sense of the meaning ?
> 
> Best Regards,
> 
>   Toshi (Toshiyuki Kimura) <[EMAIL PROTECTED]>
>   R&D Headquarters
>   NTT DATA Corporation
> 
> -----Original Message-----
> From: subhendukumar mohanty [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 2:06 AM
> To: [EMAIL PROTECTED]
> Subject: RE: help required for attachment using ejb as webservice
> 
> I have session bean. One thing i am not clear. If datahandler
> is not a serializable , i can not make it the return type in
> ejb method. Am i correct or not in the above statement ?
> 
> -----Original Message-----
> From: Toshiyuki Kimura [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 7:20 AM
> To: [EMAIL PROTECTED]
> Subject: RE: help required for attachment using ejb as webservice
> 
> Hi Subhendu,
> 
>   At the beginning, I'd like to notify that I've already succeeded
> in EJB usage with the AXIS 1.1 rc1 and the posted code.  Thus, it
> seems the root problem is not the return type of an ejb method.
> 
>   The most interesting describes from you are the followings;
> 
> | Type of Image (Jpeg). We get the image as byte array from
> |   other source. We do not get file reference.
> 
>   I guess that you're saving the jpeg images on DBMS, and also
> the ejb is implemented as an Entity Bean.  Is that right ?
> If so, the restriction of 'serializable' is for an Entity Bean
> rather than for an ejb on AXIS.
> 
> Best Regards,
> 
>   Toshi (Toshiyuki Kimura) <[EMAIL PROTECTED]>
>   R&D Headquarters
>   NTT DATA Corporation
> 
> -----Original Message-----
> From: subhendukumar mohanty [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 12:07 AM
> To: [EMAIL PROTECTED]
> Subject: RE: help required for attachment using ejb as webservice
> provider
> 
> Hi Toshiyuki
> 
> My Answers are as below
> 
> Axis 1.0 (But we may go for Apache Soap latest version comes
>  with websphere 4.0)
> Type of Image (Jpeg). We get the image as byte array from other
>  source. We do not get file reference.
> 
> Problem. If i expose my ejb method as webservice interface and
>  i have to use soap with attachment then the return type of EJB
>  method will be of Datahandler Type. But DataHandler can  not be
>  return type of an ejb method as it does not implement
>  java.io.serializable and all ejb retutn parameters needs to be
>  serializable.
> 
> So to avoid this i was thinking that let my ejb return byte array
>  and i have to write a wrapper java class which will convert the
>  byte array to datahandler (still no clear how to convert that).
>  The wrapper java class will be exposed as web service rather than
>  exposing the ejb as webservice.
> 
> Let me know whethere i am procceding in a correct direction.
> 
> Thanks,
> Subhendu
> 
> -----Original Message-----
> From: Toshiyuki Kimura [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2003 6:27 AM
> To: [EMAIL PROTECTED]
> Subject: Re: help required for attachment using ejb as webservice
> provider
> 
> 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