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.

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

Thanks,

-          emmanuel



Emmanuel GUITON

Ingénieur développement
Fixe : +33 1  70 92 84 16 • Standard : +33 1 41 91 77 77

215, Avenue Georges Clemenceau • 92024 Nanterre

[cid:imageb4e80b.gif@8099db5e.984b4f1c]<http://www.intrinsec.com/>


[cid:imagebf060d.jpg@1286e3bf.48d048c2]<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.gunathu...@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.gui...@intrinsec.com<mailto:emmanuel.gui...@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> • Standard : 
+33 1 41 91 77 77<tel:%2B33%201%2041%2091%2077%2077>

215, Avenue Georges Clemenceau • 92024 Nanterre


[cid:image001.gif@01CD1893.77CF0ED0]<http://www.intrinsec.com/>

[cid:image002.jpg@01CD1893.77CF0ED0]<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

<<inline: image001.gif>>

<<inline: image002.jpg>>

<<inline: imageb4e80b.gif@8099db5e.984b4f1c>>

<<inline: imagebf060d.jpg@1286e3bf.48d048c2>>

Reply via email to