Brian,

I really did not do anything special for deploying Axis2 to JBoss 4.0.3. I unzipped the Axis2 war into the JBoss "deploy" directory and deployed the Axis2 webservices to the Axis2 "services" directory (as described in the Axis2 docs). By default, JBoss 4.0.2+ uses tomcat's classloading implementation vice their own unified/flat classloader. This approach isolates the classes/libraries per web application...so you avoid the library/jar conflicts that can sometime arise from using a unified classloader (e.g., the default JBoss classloader). So as I understand it...it is basically like running on Axis2 on standalone Tomcat. If you are using an earlier version of JBoss 4.0.1sp1 or lower...you should modify a few lines in <jboss home>\server\default\deploy\jbossweb-tomcat50.sar\META-INF\jboss-service.xml as follows:

<!--
Get the flag indicating if the normal Java2 parent first class
loading model should be used over the servlet 2.3 web container first
model.

-->
<attribute name="Java2ClassLoadingCompliance">false</attribute>
−
<!--
A flag indicating if the JBoss Loader should be used. This loader
uses a unified class loader as the class loader rather than the tomcat
specific class loader.
The default is false to ensure that wars have isolated class loading
for duplicate jars and jsp files.

-->
<attribute name="UseJBossWebLoader">false</attribute>

This will properly isolate the Axis2 classes and has worked for me. From this point on...I just followed the instructions is in the Axis2 docs for deploying webservices.

As mentioned in my earlier email...I have had problems with the EchoNonBlockingDualClient example...at this point I'm reasonably convinced that it is due to the fact that the webservice is not asynchronous. After reading a few earlier threads, I believe I have to extend the AbstractInOutAsyncMessageReceiver to create an asynchronous service. Not that much fun:-( I really wish there was an example or default implementation in the Axis2 distro. But I guess it's a small price to pay for the power/flexibility of Axis2;-)

Hope this helps,
Tony

Brian Shields wrote:

Thats a bit disappointing, maybe i was a bit naive thinking it would be straight forward. I need to have a serious think how i will progress. I am not willing to stop using axis2, ive too much time invested now and everything set up the way i need it for my own research. Unfortunately i also have committments on a project that uses JBoss 4.0. How much of WS-Security is implemented in the most recent stable release of JBoss? How straightforward is it to implement security on existing (Web) SessionBeans? I particularly like the modular approach of axis2 which completely abstracts the security layer from the developer of the endpoint and vice versa. Any other help, pointers etc (maybe a url to a walk thru of deploying axis2 on JBoss 4 ; ) ) greatly appreciated.
Regards,
Brian.

robert lazarski wrote:

I haven't mixed JBoss and Axis2 together yet - but I know both reasonably well independently. I've used JBoss and EJB with JWSDP alot.

Internally JBoss 4.0.x comes with Axis 1.x - though strangely their docs and examples favor JWSDP. Furthermore, It tends to be more natural to use a Statelful session bean with web services.

There are Handlers that are part of Java itself and can be used with Axis 1 and JWSDP - javax.xml.rpc.handler.Handler is one I've used a lot. However, axis2 does not currently support JAX-RPC. JBoss is pretty wired into JAX-RPC.

So to make Web Services function with JBoss and EJB you'll need to edit and create a lot of files, and using axis2 in jboss and ejb is a bit bleeding edge. Don't get me wrong - it'd be a cool project and yes I think it can be done. But if you don't know Jboss or axis2 well, there are not going to be a lot of docs to help you. My personal experience on the jboss lists have not been good - they strongly encourage paid support.

Another option I would strongly consider is just use hibernate if you have a choice - instead of EJB. It'll be a lot simpler config. Sounds like your commited to EJB though.

If you still decide to use axis2 with jboss, look at the jboss guide chapter 12. Look at their files:

webservices.xml
ejb-jar.xml
jboss.xml

Know what config-*.xml does

HTH,
Robert
http://www.braziloutsource.com/

On 3/13/06, * Brian Shields* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

Hi All,
I am currently using Axis2 and WSS4J as a test environment for some
secure services. I want to now deploy these secure services on a JBoss
4.0 AS. My experience with JBoss is limited, this work has been
carried
out by another member of the group. We have an ejb application which
uses a stateless session bean to implement the web services interface.
At the moment this is all deployed using JBossWS. Has anybody deployed
Axis2 as a service within JBoss 4.0? Is it straightforward. There
is the
option of changing to JBoss WS, but I am using other Axis2
features like
handlers that I would rather not drop.
Does anybody have any suggestions as to how I could go about this
transition? Any documentation on the web where this has been tried?
Regards,
Brian.

--
Brian Shields BSc. MSc.,
PhD Candidate,
Department of Information Technology,
National University of Ireland,
Galway,
Ireland.




Reply via email to