You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by murugesh dour <mu...@yahoo.com> on 2004/06/18 10:59:27 UTC

axis: attachments: managed memory datasource

halo,
I terribly need someones assistance to solve this.........
I am using one of the axis application "attachments". Here the ServiceClass receives the attachements and 'caches' in memory (as below)., I want to see the contents (files-attachments) in the disk on service side. So tried the method flushToDisk();and other methods from the 'Managed memory data source class', but i gives me only an empty file. Can someone help me see the attachments in disk.
 
merci d'avance.
 
----------------------------------------------------------------------------------------------------------------------------
 /**This class should store all attachment data in memory */
 static class MemoryOnlyDataSource extends org.apache.axis.attachments.ManagedMemoryDataSource{
    
       MemoryOnlyDataSource( byte [] in, String contentType) throws java.io.IOException{
         super( new java.io.ByteArrayInputStream( in) , Integer.MAX_VALUE -2, contentType, true); 
       }
       MemoryOnlyDataSource( String in, String contentType)throws java.io.IOException{
         this( in.getBytes() ,  contentType); 
       }
    }
--------------------------------------------------------------------------------------------------------------------------------

		
---------------------------------
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.

Re: attachments: managed memory datasource

Posted by Scott Nichol <sn...@scottnichol.com>.
Axis questions should go to axis-user@ws.apache.org.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "murugesh dour" <mu...@yahoo.com>
To: <so...@ws.apache.org>
Sent: Friday, June 18, 2004 4:59 AM
Subject: axis: attachments: managed memory datasource


> halo,
> I terribly need someones assistance to solve this.........
> I am using one of the axis application "attachments". Here the ServiceClass receives the attachements and 'caches' in memory (as below)., I want to see the contents (files-attachments) in the disk on service side. So tried the method flushToDisk();and other methods from the 'Managed memory data source class', but i gives me only an empty file. Can someone help me see the attachments in disk.
>  
> merci d'avance.
>  
> ----------------------------------------------------------------------------------------------------------------------------
>  /**This class should store all attachment data in memory */
>  static class MemoryOnlyDataSource extends org.apache.axis.attachments.ManagedMemoryDataSource{
>     
>        MemoryOnlyDataSource( byte [] in, String contentType) throws java.io.IOException{
>          super( new java.io.ByteArrayInputStream( in) , Integer.MAX_VALUE -2, contentType, true); 
>        }
>        MemoryOnlyDataSource( String in, String contentType)throws java.io.IOException{
>          this( in.getBytes() ,  contentType); 
>        }
>     }
> --------------------------------------------------------------------------------------------------------------------------------
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.