You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ji...@apache.org> on 2010/12/19 12:39:07 UTC

[jira] Updated: (AXIS2-4127) JSR 181 annotations web services giving errors

     [ https://issues.apache.org/jira/browse/AXIS2-4127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Samisa Abeysinghe updated AXIS2-4127:
-------------------------------------

    Fix Version/s:     (was: 1.4.1)
                   1.6

> JSR 181 annotations web services giving errors
> ----------------------------------------------
>
>                 Key: AXIS2-4127
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4127
>             Project: Axis2
>          Issue Type: Bug
>    Affects Versions: 1.4.1
>         Environment: Running within IBM RAD 7/ WebSphere 6.1
>            Reporter: Girish Khemani
>             Fix For: 1.6
>
>
> JSR 181 annotated POJO web services are always getting into errors. Lack of  / conflicting documentation is also an issue with this feature.
> I understand services.xml is not to be created for using this feature. Please confirm.
> Please confirm whether PojoDeployer or JAXWSDeployer is to be used for this feature in axis.xml.
> When I use PojoDeployer with following  -
> 1.
> Until endpointInterface attribute is added to @WebService the webservice WSDL is not getting created and following error comes on the console-
> [11/11/08 06:39:28:888 GMT] 00000043 SystemOut     O [ERROR] Error occurred generating WSDL file for Web service implementation class {JSR181Pojo}: {java.lang.ClassNotFoundException: com.sun.tools.ws.spi.WSToolsObjectFactory}
> java.lang.ClassNotFoundException: com.sun.tools.ws.spi.WSToolsObjectFactory
> 	at java.lang.Class.forName(Class.java:131)
> 	at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:166)
> 	at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.initialize(JAXWSRIWSDLGenerator.java:371)
> 	at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.getWSDL(JAXWSRIWSDLGenerator.java:364)
> 	at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1322)
> 	at org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:287)
> 	at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:242)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
> 	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
> 	at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
> 	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3129)
> 	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
> 	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
> 	at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
> 	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
> 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
> 	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
> 	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
> 	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
> 	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
> 	at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
> 	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
> 	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
> 	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:782)
> 	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
> 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
> And when I try to access WSDL this is what I get -
> <error>
>   <description>Unable to generate WSDL 1.1 for this service</description> 
>   <reason>If you wish Axis2 to automatically generate the WSDL 1.1, then please +set useOriginalwsdl as false in your services.xml</reason> 
>   javax.xml.ws.WebServiceException: Error occurred generating WSDL file for Web service implementation class {JSR181Pojo}: {java.lang.ClassNotFoundException: com.sun.tools.ws.spi.WSToolsObjectFactory} at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:187) at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.initialize(JAXWSRIWSDLGenerator.java:371) at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.getWSDL(JAXWSRIWSDLGenerator.java:364) at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1322) at org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:287) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:242) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510) Caused by: java.lang.ClassNotFoundException: com.sun.tools.ws.spi.WSToolsObjectFactory at java.lang.Class.forName(Class.java:131) at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:166) ... 25 more 
>   </error>
> 2. 
> @WebService(
> 	    endpointInterface = "testjsr.JSRPojoSEI",
> 	    targetNamespace = "http://jsrpojo.im.fil.com",
> 	    serviceName = "JSRPojo"
> 	    )
> public class JSR181Pojo implements JSRPojoSEI {	
> 	public String add(String x, String y){
> 		System.out.println("Got call -  JSR181Pojo service");
> 		return x+y;
> 	}
> }
> public interface JSRPojoSEI {
>     public String add(String x,String y);
> }
> WSDL gets generated and web service is accessible. But server is started following error is reported on console -
> [11/11/08 07:43:51:335 GMT] 00000026 SystemOut     O [INFO] Undeploying Web service: JSRPojo.jar
> [11/11/08 07:43:51:566 GMT] 00000026 SystemOut     O [INFO] JAXWS jars are missing in the classpath with null, switching to annongen
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.axis2.deployment.POJODeployer.createAxisService(POJODeployer.java:260)
> 	at org.apache.axis2.deployment.POJODeployer.deploy(POJODeployer.java:198)
> 	at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> 	at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597)
> 	at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> 	at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:330)
> 	at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:227)
> 	at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:324)
> 	at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64)
> 	at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71)
> 	at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83)
> 	at java.util.TimerThread.mainLoop(Timer.java:527)
> 	at java.util.TimerThread.run(Timer.java:477)
> Caused by: javax.xml.ws.WebServiceException: Validation error: SEI does not contain a WebService annotation.  Implementation class: JSR181Pojo; SEI: JSRPojoSEI
> 	at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:173)
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:118)
> 	at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.validateSEI(ServiceDescriptionImpl.java:1681)
> 	at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.validateIntegrity(ServiceDescriptionImpl.java:1232)
> 	at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.validateDBCLIntegrity(ServiceDescriptionImpl.java:1105)
> 	at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:314)
> 	at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:240)
> 	at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:210)
> 	at org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(DescriptionFactory.java:357)
> 	at org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(DescriptionFactory.java:346)
> 	... 17 more
> 3. To fix this if I add webservice annotation to SEI
> Then WSDL 1.1 is not generated and on server start following error is reported
> [11/11/08 07:48:01:340 GMT] 00000026 SystemOut     O [INFO] Undeploying Web service: JSRPojo.jar
> [11/11/08 07:48:01:450 GMT] 00000026 SystemOut     O [INFO] JAXWS jars are missing in the classpath with null, switching to annongen
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	at org.apache.axis2.deployment.POJODeployer.createAxisService(POJODeployer.java:260)
> 	at org.apache.axis2.deployment.POJODeployer.deploy(POJODeployer.java:198)
> 	at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
> 	at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597)
> 	at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
> 	at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:330)
> 	at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:227)
> 	at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:324)
> 	at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64)
> 	at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71)
> 	at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83)
> 	at java.util.TimerThread.mainLoop(Timer.java:527)
> 	at java.util.TimerThread.run(Timer.java:477)
> Caused by: javax.xml.ws.WebServiceException: A ServiceDescription was not created for JSRPojoSEI
> 	at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:173)
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
> 	at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:118)
> 	at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:221)
> 	at org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(DescriptionFactory.java:357)
> 	at org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(DescriptionFactory.java:346)
> 	... 17 more
> Again WSDL 1.1 is not generated as in Case 1 above.
> 4. When I use JAXWSDeployer I again get into similar issues
> Are there any additional jars needed to run this. I tried adding jaxws-tools& jaxws-rt.jar from sun but one or the other issue comes.
> Please let me know with a sample code & configuration on how to use JSR 181 annotated webservices in AXIS 2
> Regards
> Girish

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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