[axis2-mtom file size]

2009-11-17 Thread Vaibhav Arya
Hi all,

 

I want to know, what is the maximum file size that axis2
supports with MTOM..

 

 

Please suggest in this regard.

 

Thanks & Regards,

 

Vaibhav Kumar Arya

 



===
Private, Confidential and Privileged. This e-mail and any files and attachments 
transmitted with it are confidential and/or privileged. They are intended 
solely for the use of the intended recipient. The content of this e-mail and 
any file or attachment transmitted with it may have been changed or altered 
without the consent of the author. If you are not the intended recipient, 
please note that any review, dissemination, disclosure, alteration, printing, 
circulation or Transmission of this e-mail and/or any file or attachment 
transmitted with it, is prohibited and may be unlawful. If you have received 
this e-mail or any file or attachment transmitted with it in error please 
notify OTS Solutions at i...@otssolutions.com
===


Re: mtom file size

2008-08-13 Thread Thilina Gunarathne
hmm... I don't know why they are providing it only for form posts...  May be
tomcat does not track the size of others..

I'm sorry.. I don't have any ideas...

~Thilina

On Tue, Aug 12, 2008 at 9:58 PM, Shehan Simen <[EMAIL PROTECTED]> wrote:

>  Hi Thilina,
>
> The maxPostSize attribute is working in tomcat only for the Post requests
> coming via the Forms.
>
> I searched a lot in google to try to find a solution. But seems no
> solution.
>
>
>
> Thanks.
>
>
>
> Regards,
>
> Simen
>
>
>
> *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, 13 August 2008 2:46 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: mtom file size
>
>
>
> Hi,
>
>  There is a similar parameter setting in the tomcat service.xml as
> maxPostSize="" , this will restrict the size of incoming POST
> request. But this does not work for axis web service requests, but that
> configuration is quite easier and no need to waste time on clustering and
> stuff.
>
>  Restricting the message size using the app server (eg: tomcat) would be
> the approach most of the users might be using... I'm surprised to hear that
> Tomcat does not restrict the incoming POST request size for Axis2 web
> service requests.. For tomcat, it would be just another request..  Does this
> happen only with a particular scenerio (eg: with http chunking? ).
>
> thanks,
> Thilina
>
>
>
> Hope in future, we will be able to get such configurable solution.
>
>
>
> Thank you.
>
> Regards,
>
> Simen
>
>
>
> *From:* Martin Gainty [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, 13 August 2008 12:03 PM
>
>
> *To:* axis-user@ws.apache.org
>
> *Subject:* RE: mtom file size
>
>
>
> your SOAP response can be a URL to the file ..and hand the URL to FTP
> server for bulk of the heavy lifting
> another idea is to compress the file which will conserve bandwidth
>
> the question is which server has the necessary bandwidth to handle the
> transmission?
> if you're bogging down your webapp server you might want consider
> clustering
> http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html
>
> Most prod servers run with 4GB RAM
> so you'll want to increment your stack and heap params to accomodate more
> RAM
>
> http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/diag/appendixes/defaults.html
>
> heavy resource-intensive operations should be handled by threads to prevent
> bogging down the JVM proc
>
> you may also want to consider Chunked-encoding ..
>
> Anyone else?
> Martin
> __
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>  --
>
> From: [EMAIL PROTECTED]
> To: axis-user@ws.apache.org
> Date: Wed, 13 Aug 2008 09:12:40 +1000
> Subject: RE: mtom file size
>
> Hi Thilina,
>
> It is a big threat to the web service. L
>
> I don't want to crash my web server by receiving large files.
>
> We cannot request from the clients to send small files and people are
> always willing to blame us by crashing the web server.
>
> There may be some settings in the tomcat configurations to limit the size
> of incoming request. Any suggestions?
>
>
>
> Thank you.
>
>
>
> Regards,
>
> simen
>
>
>
> *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, 13 August 2008 1:35 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: mtom file size
>
>
>
> I would say it's possible..
>
> thanks,
> Thilina
>
> On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe <
> [EMAIL PROTECTED]> wrote:
>
> Thilina Gunarathne wrote:
>
> I'm not sure whether Axis2 MTOM policy implementation supports such a
> scenerio.. Other than that, I cannot think of any..
>
>
>
> Does this mean that someone can send several large attachments concurrently
> and take down the server by making it go out of resources?
>
> Thanks,
> Samisa...
>
>
> thanks,
> Thilina
>
>
>
> On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED] [EMAIL PROTECTED]>> wrote:
>
>Hi,
>
>I want to specify the maximum file size when using MTOM.
>
>The client should not send to the se

RE: mtom file size

2008-08-12 Thread Shehan Simen
Hi Thilina,
The maxPostSize attribute is working in tomcat only for the Post requests 
coming via the Forms.
I searched a lot in google to try to find a solution. But seems no solution.

Thanks.

Regards,
Simen

From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 13 August 2008 2:46 PM
To: axis-user@ws.apache.org
Subject: Re: mtom file size

Hi,

There is a similar parameter setting in the tomcat service.xml as 
maxPostSize="" , this will restrict the size of incoming POST 
request. But this does not work for axis web service requests, but that 
configuration is quite easier and no need to waste time on clustering and stuff.
Restricting the message size using the app server (eg: tomcat) would be the 
approach most of the users might be using... I'm surprised to hear that Tomcat 
does not restrict the incoming POST request size for Axis2 web service 
requests.. For tomcat, it would be just another request..  Does this happen 
only with a particular scenerio (eg: with http chunking? ).

thanks,
Thilina



Hope in future, we will be able to get such configurable solution.



Thank you.

Regards,

Simen



From: Martin Gainty [mailto:[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>]
Sent: Wednesday, 13 August 2008 12:03 PM

To: axis-user@ws.apache.org<mailto:axis-user@ws.apache.org>
Subject: RE: mtom file size



your SOAP response can be a URL to the file ..and hand the URL to FTP server 
for bulk of the heavy lifting
another idea is to compress the file which will conserve bandwidth

the question is which server has the necessary bandwidth to handle the 
transmission?
if you're bogging down your webapp server you might want consider clustering
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

Most prod servers run with 4GB RAM
so you'll want to increment your stack and heap params to accomodate more RAM
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/diag/appendixes/defaults.html

heavy resource-intensive operations should be handled by threads to prevent 
bogging down the JVM proc

you may also want to consider Chunked-encoding ..

Anyone else?
Martin
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission.



From: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
To: axis-user@ws.apache.org<mailto:axis-user@ws.apache.org>
Date: Wed, 13 Aug 2008 09:12:40 +1000
Subject: RE: mtom file size

Hi Thilina,

It is a big threat to the web service. :(

I don't want to crash my web server by receiving large files.

We cannot request from the clients to send small files and people are always 
willing to blame us by crashing the web server.

There may be some settings in the tomcat configurations to limit the size of 
incoming request. Any suggestions?



Thank you.



Regards,

simen



From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>]
Sent: Wednesday, 13 August 2008 1:35 AM
To: axis-user@ws.apache.org<mailto:axis-user@ws.apache.org>
Subject: Re: mtom file size



I would say it's possible..

thanks,
Thilina

On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe <[EMAIL 
PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:

Thilina Gunarathne wrote:

I'm not sure whether Axis2 MTOM policy implementation supports such a 
scenerio.. Other than that, I cannot think of any..



Does this mean that someone can send several large attachments concurrently and 
take down the server by making it go out of resources?

Thanks,
Samisa...

thanks,
Thilina


On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED]<mailto:[EMAIL 
PROTECTED]> <mailto:[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>> wrote:

   Hi,

   I want to specify the maximum file size when using MTOM.

   The client should not send to the service files bigger than 5mb
   and I am using MTOM with axis2 1.4 (deployed in tomcat)

   How to restrict the file size?


   Please let me know.


   Thanks.






--
Thilina Gunarathne - http://thilinag.blogspot.com


--
Samisa Abeysinghe

http://people.apache.org/~samisa/<http://people.apache.org/%7Esamisa/>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>



--
Thilina Gunarathne - http://thilinag.blogspot.com





Get Windows Live and get whatever you need, wherever you are. Start 
here.<http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008>



--
Thilina Gunarathne - http://thilinag.blogspot.com


Re: mtom file size

2008-08-12 Thread Thilina Gunarathne
Hi,

> There is a similar parameter setting in the tomcat service.xml as
> maxPostSize="" , this will restrict the size of incoming POST
> request. But this does not work for axis web service requests, but that
> configuration is quite easier and no need to waste time on clustering and
> stuff.
>
Restricting the message size using the app server (eg: tomcat) would be the
approach most of the users might be using... I'm surprised to hear that
Tomcat does not restrict the incoming POST request size for Axis2 web
service requests.. For tomcat, it would be just another request..  Does this
happen only with a particular scenerio (eg: with http chunking? ).

thanks,
Thilina

>
>
> Hope in future, we will be able to get such configurable solution.
>
>
>
> Thank you.
>
> Regards,
>
> Simen
>
>
>
> *From:* Martin Gainty [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, 13 August 2008 12:03 PM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: mtom file size
>
>
>
> your SOAP response can be a URL to the file ..and hand the URL to FTP
> server for bulk of the heavy lifting
> another idea is to compress the file which will conserve bandwidth
>
> the question is which server has the necessary bandwidth to handle the
> transmission?
> if you're bogging down your webapp server you might want consider
> clustering
> http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html
>
> Most prod servers run with 4GB RAM
> so you'll want to increment your stack and heap params to accomodate more
> RAM
>
> http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/diag/appendixes/defaults.html
>
> heavy resource-intensive operations should be handled by threads to prevent
> bogging down the JVM proc
>
> you may also want to consider Chunked-encoding ..
>
> Anyone else?
> Martin
> __
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and Sender
> does not endorse distribution to any party other than intended recipient.
> Sender does not necessarily endorse content contained within this
> transmission.
>
>  --
>
> From: [EMAIL PROTECTED]
> To: axis-user@ws.apache.org
> Date: Wed, 13 Aug 2008 09:12:40 +1000
> Subject: RE: mtom file size
>
> Hi Thilina,
>
> It is a big threat to the web service. L
>
> I don't want to crash my web server by receiving large files.
>
> We cannot request from the clients to send small files and people are
> always willing to blame us by crashing the web server.
>
> There may be some settings in the tomcat configurations to limit the size
> of incoming request. Any suggestions?
>
>
>
> Thank you.
>
>
>
> Regards,
>
> simen
>
>
>
> *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, 13 August 2008 1:35 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: mtom file size
>
>
>
> I would say it's possible..
>
> thanks,
> Thilina
>
> On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe <
> [EMAIL PROTECTED]> wrote:
>
> Thilina Gunarathne wrote:
>
> I'm not sure whether Axis2 MTOM policy implementation supports such a
> scenerio.. Other than that, I cannot think of any..
>
>
>
> Does this mean that someone can send several large attachments concurrently
> and take down the server by making it go out of resources?
>
> Thanks,
> Samisa...
>
>
> thanks,
> Thilina
>
>
>
> On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED] [EMAIL PROTECTED]>> wrote:
>
>Hi,
>
>I want to specify the maximum file size when using MTOM.
>
>The client should not send to the service files bigger than 5mb
>and I am using MTOM with axis2 1.4 (deployed in tomcat)
>
>How to restrict the file size?
>
>
>Please let me know.
>
>
>Thanks.
>
>
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>
> --
> Samisa Abeysinghe
>
> http://people.apache.org/~samisa/ <http://people.apache.org/%7Esamisa/>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>
>
>  --
>
> Get Windows Live and get whatever you need, wherever you are. Start 
> here.<http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008>
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com


RE: mtom file size

2008-08-12 Thread Shehan Simen
Hi Martin,
Thanks for your ideas.
But this is making life more complex.
The web service client(the real users of the web service) can directly send 
large files to the web server. I have no control over that. I cannot ask them 
to send zip files or whatever. But from server side, I should restrict the size 
of the file to be 5mb.

I thought this is just a parameter setting in the axis2.xml
There is a similar parameter setting in the tomcat service.xml as 
maxPostSize="" , this will restrict the size of incoming POST 
request. But this does not work for axis web service requests, but that 
configuration is quite easier and no need to waste time on clustering and stuff.

Hope in future, we will be able to get such configurable solution.

Thank you.
Regards,
Simen

From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 13 August 2008 12:03 PM
To: axis-user@ws.apache.org
Subject: RE: mtom file size

your SOAP response can be a URL to the file ..and hand the URL to FTP server 
for bulk of the heavy lifting
another idea is to compress the file which will conserve bandwidth

the question is which server has the necessary bandwidth to handle the 
transmission?
if you're bogging down your webapp server you might want consider clustering
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

Most prod servers run with 4GB RAM
so you'll want to increment your stack and heap params to accomodate more RAM
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/diag/appendixes/defaults.html

heavy resource-intensive operations should be handled by threads to prevent 
bogging down the JVM proc

you may also want to consider Chunked-encoding ..

Anyone else?
Martin
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission.


From: [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Date: Wed, 13 Aug 2008 09:12:40 +1000
Subject: RE: mtom file size
Hi Thilina,
It is a big threat to the web service. :(
I don't want to crash my web server by receiving large files.
We cannot request from the clients to send small files and people are always 
willing to blame us by crashing the web server.
There may be some settings in the tomcat configurations to limit the size of 
incoming request. Any suggestions?

Thank you.

Regards,
simen

From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 13 August 2008 1:35 AM
To: axis-user@ws.apache.org
Subject: Re: mtom file size

I would say it's possible..

thanks,
Thilina
On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe <[EMAIL 
PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
Thilina Gunarathne wrote:
I'm not sure whether Axis2 MTOM policy implementation supports such a 
scenerio.. Other than that, I cannot think of any..

Does this mean that someone can send several large attachments concurrently and 
take down the server by making it go out of resources?

Thanks,
Samisa...

thanks,
Thilina


On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED]<mailto:[EMAIL 
PROTECTED]> <mailto:[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>> wrote:

   Hi,

   I want to specify the maximum file size when using MTOM.

   The client should not send to the service files bigger than 5mb
   and I am using MTOM with axis2 1.4 (deployed in tomcat)

   How to restrict the file size?


   Please let me know.


   Thanks.






--
Thilina Gunarathne - http://thilinag.blogspot.com


--
Samisa Abeysinghe

http://people.apache.org/~samisa/<http://people.apache.org/%7Esamisa/>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>



--
Thilina Gunarathne - http://thilinag.blogspot.com


Get Windows Live and get whatever you need, wherever you are. Start 
here.<http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008>


RE: mtom file size

2008-08-12 Thread Martin Gainty

your SOAP response can be a URL to the file ..and hand the URL to FTP server 
for bulk of the heavy lifting
another idea is to compress the file which will conserve bandwidth

the question is which server has the necessary bandwidth to handle the 
transmission?
if you're bogging down your webapp server you might want consider clustering
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html

Most prod servers run with 4GB RAM
so you'll want to increment your stack and heap params to accomodate more RAM
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/diag/appendixes/defaults.html

heavy resource-intensive operations should be handled by threads to prevent 
bogging down the JVM proc

you may also want to consider Chunked-encoding ..

Anyone else?
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


From: [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Date: Wed, 13 Aug 2008 09:12:40 +1000
Subject: RE: mtom file size
















Hi Thilina,

It is a big threat to the web service. L

I don’t want to crash my web server by receiving large
files.

We cannot request from the clients to send small files and
people are always willing to blame us by crashing the web server.

There may be some settings in the tomcat configurations to limit
the size of incoming request. Any suggestions?

 

Thank you.

 

Regards,

simen

 



From: Thilina Gunarathne
[mailto:[EMAIL PROTECTED] 

Sent: Wednesday, 13 August 2008 1:35 AM

To: axis-user@ws.apache.org

Subject: Re: mtom file size



 



I would say it's possible..



thanks,

Thilina



On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe <[EMAIL PROTECTED]>
wrote:



Thilina Gunarathne wrote:

I'm not sure whether Axis2 MTOM policy implementation
supports such a scenerio.. Other than that, I cannot think of any..

 



Does this mean that someone can
send several large attachments concurrently and take down the server by making
it go out of resources?



Thanks,

Samisa...



thanks,

Thilina







On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>
wrote:



   Hi,



   I want to specify the maximum file size when using MTOM.



   The client should not send to the service files bigger than 5mb

   and I am using MTOM with axis2 1.4 (deployed in tomcat)



   How to restrict the file size?





   Please let me know.





   Thanks.













-- 

Thilina Gunarathne - http://thilinag.blogspot.com







-- 

Samisa Abeysinghe



http://people.apache.org/~samisa/





-

To unsubscribe, e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]








-- 

Thilina Gunarathne - http://thilinag.blogspot.com









_
Get Windows Live and get whatever you need, wherever you are.  Start here.
http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008

RE: mtom file size

2008-08-12 Thread Shehan Simen
Hi Thilina,
It is a big threat to the web service. :(
I don't want to crash my web server by receiving large files.
We cannot request from the clients to send small files and people are always 
willing to blame us by crashing the web server.
There may be some settings in the tomcat configurations to limit the size of 
incoming request. Any suggestions?

Thank you.

Regards,
simen

From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 13 August 2008 1:35 AM
To: axis-user@ws.apache.org
Subject: Re: mtom file size

I would say it's possible..

thanks,
Thilina
On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe <[EMAIL 
PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
Thilina Gunarathne wrote:
I'm not sure whether Axis2 MTOM policy implementation supports such a 
scenerio.. Other than that, I cannot think of any..

Does this mean that someone can send several large attachments concurrently and 
take down the server by making it go out of resources?

Thanks,
Samisa...

thanks,
Thilina


On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED]<mailto:[EMAIL 
PROTECTED]> <mailto:[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>> wrote:

   Hi,

   I want to specify the maximum file size when using MTOM.

   The client should not send to the service files bigger than 5mb
   and I am using MTOM with axis2 1.4 (deployed in tomcat)

   How to restrict the file size?


   Please let me know.


   Thanks.






--
Thilina Gunarathne - http://thilinag.blogspot.com


--
Samisa Abeysinghe

http://people.apache.org/~samisa/<http://people.apache.org/%7Esamisa/>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>



--
Thilina Gunarathne - http://thilinag.blogspot.com


Re: mtom file size

2008-08-12 Thread Thilina Gunarathne
I would say it's possible..

thanks,
Thilina

On Tue, Aug 12, 2008 at 6:01 AM, Samisa Abeysinghe <
[EMAIL PROTECTED]> wrote:

> Thilina Gunarathne wrote:
>
>> I'm not sure whether Axis2 MTOM policy implementation supports such a
>> scenerio.. Other than that, I cannot think of any..
>>
>
> Does this mean that someone can send several large attachments concurrently
> and take down the server by making it go out of resources?
>
> Thanks,
> Samisa...
>
>
>> thanks,
>> Thilina
>>
>> On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:
>>
>>Hi,
>>
>>I want to specify the maximum file size when using MTOM.
>>
>>The client should not send to the service files bigger than 5mb
>>and I am using MTOM with axis2 1.4 (deployed in tomcat)
>>
>>How to restrict the file size?
>>
>>
>>Please let me know.
>>
>>
>>Thanks.
>>
>>
>>
>>
>>
>>
>> --
>> Thilina Gunarathne - http://thilinag.blogspot.com
>>
>
>
> --
> Samisa Abeysinghe
>
> http://people.apache.org/~samisa/ 
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thilina Gunarathne - http://thilinag.blogspot.com


Re: mtom file size

2008-08-12 Thread Samisa Abeysinghe

Thilina Gunarathne wrote:
I'm not sure whether Axis2 MTOM policy implementation supports such a 
scenerio.. Other than that, I cannot think of any..


Does this mean that someone can send several large attachments 
concurrently and take down the server by making it go out of resources?


Thanks,
Samisa...



thanks,
Thilina

On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED] 
> wrote:


Hi,

I want to specify the maximum file size when using MTOM.

The client should not send to the service files bigger than 5mb
and I am using MTOM with axis2 1.4 (deployed in tomcat)

How to restrict the file size?

 


Please let me know.

 


Thanks.

 

 





--
Thilina Gunarathne - http://thilinag.blogspot.com



--
Samisa Abeysinghe

http://people.apache.org/~samisa/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mtom file size

2008-08-11 Thread Thilina Gunarathne
I'm not sure whether Axis2 MTOM policy implementation supports such a
scenerio.. Other than that, I cannot think of any..

thanks,
Thilina

On Mon, Aug 11, 2008 at 5:38 PM, Shehan Simen <[EMAIL PROTECTED]> wrote:

>  Hi,
>
> I want to specify the maximum file size when using MTOM.
>
> The client should not send to the service files bigger than 5mb and I am
> using MTOM with axis2 1.4 (deployed in tomcat)
>
> How to restrict the file size?
>
>
>
> Please let me know.
>
>
>
> Thanks.
>
>
>
>
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com


mtom file size

2008-08-11 Thread Shehan Simen
Hi,
I want to specify the maximum file size when using MTOM.
The client should not send to the service files bigger than 5mb and I am using 
MTOM with axis2 1.4 (deployed in tomcat)
How to restrict the file size?

Please let me know.

Thanks.




Axis2 MTOM - File size limit

2006-11-02 Thread Nazi, Camille








Hi all,

I am using MTOM with Axis2.   I took the MTOM
sample bundled with Axis2 and switched it around to where the client sends in
the name of the file to retrieve and the Service returns the file back to the Client
and then the client saves the file to disk (All this is done on my desktop in
windows XP).   I am running axis2 WAR under JBOSS-4.03SP1.

 

The problem I am running into is that for Zip files larger
in size than 3.4 Meg, I am not able to open the Zip files with Winzip and I get an error:

Start of central directory not found; Zip
file corrupt.  Possible cause: file transfer error.

 

 

P.S.:   The file size returned is always exact
size as the original file (looking at it via File Explorer).  It works
very well for files less than 3.4 Meg (Zip files or any other files).

I ran this code against a 5 Meg word file and I was able to
open it fine, so it might be only an issue with zip files.

 

 

Is there a size limit somewhere that I need to
change?   Anyone knows why I might be running into this issue? 
Is there anything I am missing or have incorrect in my Save routine on the
client side ?  

I need this tool to be able to return large files from the
service, which sizewise it appears to be returning them correctly, but file is
corrupt.

 

Here’s my Service code:

 

import java.io.File;

import java.util.Iterator;

 

import javax.activation.DataHandler;

import javax.activation.FileDataSource;

 

import org.apache.axiom.om.OMAbstractFactory;

import org.apache.axiom.om.OMElement;

import org.apache.axiom.om.OMFactory;

import org.apache.axiom.om.OMNamespace;

import org.apache.axiom.om.OMText;

import org.apache.axis2.AxisFault;

 

public class
MTOMProtoService {

 

 

  public OMElement getFile(OMElement element) throws Exception {

   
OMElement _fileNameEle = null;

   
OMElement _imageElement = null;

   
File inputFile = null;

 

   
System.out.println("in Method getFile, OMElement
received = " +
element.toString());

 

 

   
for (Iterator
_iterator = element.getChildElements(); _iterator.hasNext();) {

 
OMElement _ele = (OMElement) _iterator.next();

 
System.out.println("in Method for loop in getFile,
OMElement = " +
_ele.toString());

 
if
(_ele.getLocalName().equalsIgnoreCase("fileName")) {

   
_fileNameEle = _ele;

   
System.out.println(" Found _fileNameEle = 
" +
_fileNameEle);

 
}

   
}

 

   
if (_fileNameEle ==
null ) {

 
throw new AxisFault("Either Image or FileName is null");

   
}

 

   
String fileName = _fileNameEle.getText();

   
OMFactory fac = OMAbstractFactory.getOMFactory();

   
OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");

 

   
OMElement data = "">"getFile", omNs);

   
OMElement fileOME = fac.createOMElement("file", omNs);

   
FileDataSource dataSource = new
FileDataSource(fileName);  


   
DataHandler expectedDH = new DataHandler(dataSource);
    

   
OMText textData = fac.createOMText(expectedDH, true);

   
fileOME.addChild(textData);

 

   
OMElement fileOMEName = fac.createOMElement("fileName", omNs);

   
if (fileName != null) {

 
fileOMEName.setText(fileName);

   
}

   
data.addChild(fileOMEName);

   
data.addChild(fileOME);

   
return data;

  }

 

 

 

Save in Client Code:

 

    public void save(OMElement
element) throws Exception {

      OMElement
_fileNameEle = null;

      OMElement
_fileElement = null;

      for (Iterator _iterator = element.getChildElements();
_iterator.hasNext();) {

        OMElement
_ele = (OMElement) _iterator.next();

        if (_ele.getLocalName().equalsIgnoreCase("fileName")) {

     
    _fileNameEle = _ele;

        }

        if (_ele.getLocalName().equalsIgnoreCase("file")) {

     
    _fileElement = _ele;

        }

 

     
}   

    OMText binaryNode =
(OMText) _fileElement.getFirstOMChild();

    //Extracting the data and saving

   
DataHandler actualDH = (DataHandler)
binaryNode.getDataHandler();

//    File file = new File(desiredFileName);

     // desiredFileName
is the output filename to save it under.

    OutputStream os = new FileOutputStream(desiredFileName);

    actualDH.writeTo(os);

    os.close();

   }

 

 

Thanks in advance,

Camille