You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Demetris G <de...@ece.neu.edu> on 2007/12/23 07:26:57 UTC

[Axis2] Standalone

Hi all,

    there was a discussion once whether Axis2 should be run standalone
for production software - or something of this nature. I know Axis2 can
be a web services container (standalone) and can also be executed from
within a servlet container. Can someone please shed some light on this
again? Was it the use of the HTTP server?

Thanks much



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: byte[] problem with a class

Posted by Martin Gainty <mg...@hotmail.com>.
good call 

The handling of binary by DataHandler is explained in the MTOM doc..
http://ws.apache.org/axis2/1_2/mtom-guide.html#24

M--
  ----- Original Message ----- 
  From: Hoda, Nadeem [USA] 
  To: axis-user@ws.apache.org 
  Sent: Monday, December 24, 2007 5:55 AM
  Subject: RE: byte[] problem with a class



  Thanks Thilina. 

  That fixed the problem. 

  I actually wanted to use DataHandler initially, but I didn't know about ByteArrayDataSource until your email since we are dealing with non-file data.

  Thanks, 

  Nadeem



------------------------------------------------------------------------------
  From: Thilina Gunarathne [mailto:csethil@gmail.com] 
  Sent: Monday, December 24, 2007 3:56 AM
  To: axis-user@ws.apache.org
  Subject: Re: byte[] problem with a class


  Hi,
  Try using javax.activation.DataHandler instead of the byte[].. Then use a FileDataSource or  a bytearraydatasource to create the needed DataHandler object.

  thanks,
  Thilina


  On Dec 23, 2007 2:45 PM, Hoda, Nadeem [USA] < hoda_nadeem@bah.com> wrote:



    I noticed that others had a problem with a byte[] within a class. And, I 
    am running into this issue now.

    Here is an example of the scenario:


    class Attachment{
           byte[] attachmentImage; //with getter/setter
    }

    Using POJO services:

    This works:

    public Attachment getAttachment(String id) {...}

    But, this does not work:

    public String uploadAttachment(Attachment attachment) {...}

    In uploadAttachment(), the received attachment contains what seems to be 
    a reference of some sort instead of a byte[].

    For example, I got the following result:

    The received Attachment.attachmentImage was set to "[B@16daa9", for
    example, with a length of 0 when I passed a file represented by a byte[] 
    from multiple clients.

    I am not using MTOM due to client limitations, so I need to use direct
    data in the SOAP message.

    Is there any resolution to this, or something I am missing?

    Thanks,

    Nadeem



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
    For additional commands, e-mail: axis-user-help@ws.apache.org





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

RE: byte[] problem with a class

Posted by "Hoda, Nadeem [USA]" <ho...@bah.com>.
 
Thanks Thilina. 
 
That fixed the problem. 
 
I actually wanted to use DataHandler initially, but I didn't know about
ByteArrayDataSource until your email since we are dealing with non-file
data.
 
Thanks, 
 
Nadeem

________________________________

From: Thilina Gunarathne [mailto:csethil@gmail.com] 
Sent: Monday, December 24, 2007 3:56 AM
To: axis-user@ws.apache.org
Subject: Re: byte[] problem with a class


Hi,
Try using javax.activation.DataHandler instead of the byte[].. Then use
a FileDataSource or  a bytearraydatasource to create the needed
DataHandler object.

thanks,
Thilina


On Dec 23, 2007 2:45 PM, Hoda, Nadeem [USA] < hoda_nadeem@bah.com>
wrote:




	I noticed that others had a problem with a byte[] within a
class. And, I 
	am running into this issue now.
	
	Here is an example of the scenario:
	
	
	class Attachment{
	       byte[] attachmentImage; //with getter/setter
	}
	
	Using POJO services:
	
	This works:
	
	public Attachment getAttachment(String id) {...}
	
	But, this does not work:
	
	public String uploadAttachment(Attachment attachment) {...}
	
	In uploadAttachment(), the received attachment contains what
seems to be 
	a reference of some sort instead of a byte[].
	
	For example, I got the following result:
	
	The received Attachment.attachmentImage was set to "[B@16daa9",
for
	example, with a length of 0 when I passed a file represented by
a byte[] 
	from multiple clients.
	
	I am not using MTOM due to client limitations, so I need to use
direct
	data in the SOAP message.
	
	Is there any resolution to this, or something I am missing?
	
	Thanks,
	
	Nadeem
	
	
	
	
---------------------------------------------------------------------
	To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
	For additional commands, e-mail: axis-user-help@ws.apache.org
	
	




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

Re: byte[] problem with a class

Posted by Thilina Gunarathne <cs...@gmail.com>.
Hi,
Try using javax.activation.DataHandler instead of the byte[].. Then use a
FileDataSource or  a bytearraydatasource to create the needed DataHandler
object.

thanks,
Thilina

On Dec 23, 2007 2:45 PM, Hoda, Nadeem [USA] <ho...@bah.com> wrote:

>
>
> I noticed that others had a problem with a byte[] within a class. And, I
> am running into this issue now.
>
> Here is an example of the scenario:
>
>
> class Attachment{
>        byte[] attachmentImage; //with getter/setter
> }
>
> Using POJO services:
>
> This works:
>
> public Attachment getAttachment(String id) {...}
>
> But, this does not work:
>
> public String uploadAttachment(Attachment attachment) {...}
>
> In uploadAttachment(), the received attachment contains what seems to be
> a reference of some sort instead of a byte[].
>
> For example, I got the following result:
>
> The received Attachment.attachmentImage was set to "[B@16daa9", for
> example, with a length of 0 when I passed a file represented by a byte[]
> from multiple clients.
>
> I am not using MTOM due to client limitations, so I need to use direct
> data in the SOAP message.
>
> Is there any resolution to this, or something I am missing?
>
> Thanks,
>
> Nadeem
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


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

byte[] problem with a class

Posted by "Hoda, Nadeem [USA]" <ho...@bah.com>.

I noticed that others had a problem with a byte[] within a class. And, I
am running into this issue now. 

Here is an example of the scenario: 


class Attachment{ 
	byte[] attachmentImage; //with getter/setter
}

Using POJO services: 

This works: 

public Attachment getAttachment(String id) {...}

But, this does not work: 

public String uploadAttachment(Attachment attachment) {...}

In uploadAttachment(), the received attachment contains what seems to be
a reference of some sort instead of a byte[].

For example, I got the following result: 

The received Attachment.attachmentImage was set to "[B@16daa9", for
example, with a length of 0 when I passed a file represented by a byte[]
from multiple clients.

I am not using MTOM due to client limitations, so I need to use direct
data in the SOAP message. 

Is there any resolution to this, or something I am missing?

Thanks, 

Nadeem



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Standalone

Posted by Demetris G <de...@ece.neu.edu>.
Excellent - thanks very much for this good info Paul.

Paul Fremantle wrote:
> Demetris
>
> Partly this is historical... Axis1 originally had a single-threaded
> server built in for test purposes, which was not production ready.
> The SimpleHTTPServer that is built into Axis2 is much more robust and
> reasonable performant. In my understanding it is "good enough" for
> production usage, though perhaps not for really hard-core heavy-duty
> requirements. Its also very useful if you want to embed in an existing
> application (public void main()).
>
> However, Tomcat is definitely faster, so if performance is an issue,
> I'd go for Tomcat. Also Tomcat has a lot more resources on scaling,
> tuning, plus the native IO handlers etc.
>
> There is a third option which is the NIO HTTP transport that
> originated in Synapse. This is very efficient and scales to very large
> numbers of concurrent connections (>1000), and has been production
> tested in the Synapse community with very good results.
>
> Paul
>
>
> On Dec 23, 2007 6:26 AM, Demetris G <de...@ece.neu.edu> wrote:
>   
>> Hi all,
>>
>>     there was a discussion once whether Axis2 should be run standalone
>> for production software - or something of this nature. I know Axis2 can
>> be a web services container (standalone) and can also be executed from
>> within a servlet container. Can someone please shed some light on this
>> again? Was it the use of the HTTP server?
>>
>> Thanks much
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>     
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Standalone

Posted by Paul Fremantle <pz...@gmail.com>.
Demetris

Partly this is historical... Axis1 originally had a single-threaded
server built in for test purposes, which was not production ready.
The SimpleHTTPServer that is built into Axis2 is much more robust and
reasonable performant. In my understanding it is "good enough" for
production usage, though perhaps not for really hard-core heavy-duty
requirements. Its also very useful if you want to embed in an existing
application (public void main()).

However, Tomcat is definitely faster, so if performance is an issue,
I'd go for Tomcat. Also Tomcat has a lot more resources on scaling,
tuning, plus the native IO handlers etc.

There is a third option which is the NIO HTTP transport that
originated in Synapse. This is very efficient and scales to very large
numbers of concurrent connections (>1000), and has been production
tested in the Synapse community with very good results.

Paul


On Dec 23, 2007 6:26 AM, Demetris G <de...@ece.neu.edu> wrote:
>
> Hi all,
>
>     there was a discussion once whether Axis2 should be run standalone
> for production software - or something of this nature. I know Axis2 can
> be a web services container (standalone) and can also be executed from
> within a servlet container. Can someone please shed some light on this
> again? Was it the use of the HTTP server?
>
> Thanks much
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org