axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stadelmann Josef" <josef.stadelm...@axa-winterthur.ch>
Subject AW: Axis2 and jax-ws
Date Mon, 16 Apr 2012 07:47:13 GMT
One more for JAX-WS. While Axis2 is one web service stack, Glassfish's/Metro is another web
service stack. How does Metro deploy? NetBeans, out from Apache.ORG uses the Metro WS Stack
on Glassfish for all its JAX-WS based web service examples. Why not Axis2, as done some times
in the past? My mind is, that common deployment structures could help a lot. In other words.
If a JAX-WS based web service server or a client works on one web service stack, i.e. Metro,
there should be NO EFFORT REQUIRED to deploy the resulting WAR or AAR or JAR file into the
deployment structure of the other i.e. Axis2 based Web Service Stack to get a successfully
running web service. At the moment that is not the case. JAX-WS has the chance to become run
able on both web service stacks. But there is one more. There is a .NET WCF 4.0 web service
stack. I took the flower service example using Glassfish and Metro straight out from NetBeans.
The Example works nice in a Java, GF/Metro environment. Then I took a Visual Studio and added
my client code and added a web "Service Reference". This is done by interrogating the running
FlowerService?wsdl on Metro. It worked and I develop the rest of the GUI in 2 hours and had
a working interoperable example, 2 clients, one implemented in JAVA the other IN C# .NET.
and a web service in Java on Glassfish/Metro. GREATE! BUT my OpenVMS is not yet able to host
Glassfish, and I am uncertain if Metro works on Tomcat OpenVMS. So I wanted to migrate my
running JAX-WS based Flower Service web service to Axis2. It did not work. I could create
a stub (Service Reference) using Visual Studio, interrogating the Flower Service running on
Axis2 WS stack. However, when I invoke the stub, I get un-marshalling errors when the web
service is based on Axis2, but it works perfect when the ServicerReference is taken from the
same web service package running on Metro. The issue is in the un-marshalling area. Since
I am struggling around with JAX-WS (see my previous posts); I went to the Axis2 JAX-WS Examples
just to learn about JAX-WS and hopefully about the potentially differences.

 

Josef

 

Von: Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com] 
Gesendet: Donnerstag, 12. April 2012 19:40
An: java-user@axis.apache.org
Betreff: Re: Axis2 and jax-ws

 

 

On Thu, Apr 12, 2012 at 11:03 PM, Emmanuel GUITON <Emmanuel.GUITON@intrinsec.com> wrote:

Thanks for your answers.

Using the servicejars I face one more issue : managing my web-service dependencies (a lot
of other jars). I guess I should deploy them in the lib folder of Axis2 or somewhere where
they would be on the classpath.

 
That is kind of a issue which reduce usability of JAX-WS services. Personally I believe Axis2
JAX-WS should support for both AAR and WAR based deployments we will try to address these
issues in near future. 

Thanks !      
  

	 

	Eventually, I just gave up on JAX-WS. I switched to using wsdl2code with a JAXB-RI data binding
instead.

	Everything works just fine now.

	 

	-          Emmanuel

	 

	 

	 


Emmanuel GUITON

Ingénieur développement 
Fixe : +33 1  70 92 84 16 <tel:%2B33%201%20%C2%A070%2092%2084%2016>  l Standard : +33
1 41 91 77 77 <tel:%2B33%201%2041%2091%2077%2077> 

215, Avenue Georges Clemenceau l 92024 Nanterre

  <http://www.intrinsec.com/> 

  <http://www.intrinsec.com/> 
 Cliquez ici pour obtenir la dernière étude Markess sur le Cloud <http://www.markess.fr/demandedocument.php?refdoc=798>


	De : Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch] 
	Envoyé : jeudi 12 avril 2012 12:41
	À : java-user@axis.apache.org
	Objet : AW: Axis2 and jax-ws

	 

	Also look at axis2.xml; 

	 

	some axis2.xml delivered with jax-ws examples show various directories under WEB-INF/  

	expected i.e. in cases when a pojo is to be deployed.

	 

	Such directories are not created by the axis2.war deployment process; So you are on your
own;

	 

	Deploying a jar with a web service into WEB-INF/servicejars, of axis2 

	the JAXWSDeployer starts  and finds meta data, at least partly. The same data as you carry


	with your service.xml, is in that case attached in form of @anotations

	 

	i.e. @Webservice @Addressing @Method @Parameter

	 

	Josef

	 

	 

	Von: Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com] 
	Gesendet: Donnerstag, 12. April 2012 11:25
	An: java-user@axis.apache.org
	Betreff: Re: Axis2 and jax-ws

	 

	 

	On Thu, Apr 12, 2012 at 1:38 PM, Emmanuel GUITON <Emmanuel.GUITON@intrinsec.com> wrote:

	Hello,

	 

	Indeed, I followed the guide you mentioned.

	But then, from what you say, the documentation may not be correct. See the following extract
:

	 

	Packaging and deploying a JAX-WS service

	Axis2 provides two mechanisms for deploying JAX-WS services:

	1.    The service may be packaged and deployed as an AAR, just like any other service within
Axis2. Like with all AARs, a services.xml file containing the relevant metadata is required
for the service to deploy correctly.

	2.    The service may be packaged in a jar file and placed into the servicejars directory.
The JAXWSDeployer will examine all jars within that directory and deploy those classes that
have JAX-WS annotations which identify them as Web services.

	
	  Some parts of this guide are outdated. We are thanking about some JAX-WS improvements and
will modify documentation too.    

		 

		Moreover, there is no 'servicejars' directory in the axis2 1.6.1 distributions I downloaded
(webapp or standalone application). Should I just create it ? 

	
	 I can't remember exact number but there is an open JIRA issue for this. For the moment create
a directory yourself. 
	
	 Thanks ! 
	 

		 

		Thanks,

		-          emmanuel

		 

		 


Emmanuel GUITON

Ingénieur développement 
Fixe : +33 1  70 92 84 16 <tel:%2B33%201%20%C2%A070%2092%2084%2016>  l Standard : +33
1 41 91 77 77 <tel:%2B33%201%2041%2091%2077%2077> 

215, Avenue Georges Clemenceau l 92024 Nanterre

 <http://www.intrinsec.com/> 

 <http://www.intrinsec.com/> 
 Cliquez ici pour obtenir la dernière étude Markess sur le Cloud <http://www.markess.fr/demandedocument.php?refdoc=798>


		De : Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com] 
		Envoyé : mercredi 11 avril 2012 18:13
		À : java-user@axis.apache.org
		Objet : Re: Axis2 and jax-ws

		 

		 

		On Wed, Apr 11, 2012 at 9:24 PM, Emmanuel GUITON <Emmanuel.GUITON@intrinsec.com> wrote:

		Hello,

		 

		I am struggling with trying to make a JAX-WS top-down generated web-service works in Axis2
(1.6.1).

		Java files are generated from a WSDL using wsimport. I then package the result in an AAR
archive that I deploy in Axis2. I use org.apache.axis2.rpc.receivers.RPCMessageReceiver as
a message receiver.

		My web-services are correctly listed and when I send a SOAP message, the correct Java method
are called.

		 

		It seems you have mixed JAX-WS deployment with POJO deployment. For JAX-WS once you have
completed code you can package them as .Jar and need to deploy on 'servicejars' directory
instead of 'services' directory. Also there is no meta data file requited, please refer following
guide for more details [1]. 
		
		[1] - http://axis.apache.org/axis2/java/core/docs/jaxws-guide.html
		
		Thanks !  

			 

			However, I face blocking issues :

			-          A java.lang.NullPointerException in RPCMessageReceiver.invokeBusinessLogic(MessageContext
inMessage, MessageContext outMessage) when throwing my custom exception (which should generate
a SOAP fault response)

			-          while deserializing a client message, Axis2 throws a java.lang.InstantiationException
because it is trying to instantiates a java.lang.Enum using instance = clazz.newInstance();
(you obviously do not want to do that on an enum)

			 

			I am surprised to find that kind of errors with no clue about how to get rid of them. I
suspect I am missing something in the web-service configuration.

			What should I do to make JAX-WS generated files work fine in an AAR ?

			 

			Thanks,

			-          emmanuel

			 

			 

			 


Emmanuel GUITON

Ingénieur développement 
Fixe : +33 1  70 92 84 16 <tel:%2B33%201%20%C2%A070%2092%2084%2016>  l Standard : +33
1 41 91 77 77 <tel:%2B33%201%2041%2091%2077%2077> 

215, Avenue Georges Clemenceau l 92024 Nanterre

 <http://www.intrinsec.com/> 

 <http://www.intrinsec.com/> 
 Cliquez ici pour obtenir la dernière étude Markess sur le Cloud <http://www.markess.fr/demandedocument.php?refdoc=798>


		
		
		
		-- 
		Sagara Gunathunga
		
		Blog      - http://ssagara.blogspot.com
		Web      - http://people.apache.org/~sagara/ <http://people.apache.org/%7Esagara/>

		LinkedIn - http://www.linkedin.com/in/ssagara

	
	
	
	-- 
	Sagara Gunathunga
	
	Blog      - http://ssagara.blogspot.com
	Web      - http://people.apache.org/~sagara/ <http://people.apache.org/%7Esagara/>

	LinkedIn - http://www.linkedin.com/in/ssagara




-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/ <http://people.apache.org/%7Esagara/> 
LinkedIn - http://www.linkedin.com/in/ssagara


Mime
View raw message