Hi ,
I am new to webservices, trying to deploy Calculator webservice in Glassfish.But getting exceptions.
1.Wrote the implementation bean with annotations..
2.Compiled the implementation Class
3.Used wsgen command to generate Artifacts.
Add.java
AddResponse.java
4.In web.xml created the impl class as an
servlet
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<description>WebTier for the Calculator Service</description>
<display-name>CalculatorWAR</display-name>
<servlet>
<description>Endpoint for Calculator Web Service</description>
<display-name>CalculatorWebService</display-name>
<servlet-name>Calculator</servlet-name>
<servlet-class>endpoint.Calculator</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Calculator</servlet-name>
<url-pattern>/CalculatorService</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>54</session-timeout>
</session-config>
</web-app>
5.packaged into a war file.
WEB-INF/classes/endpoint.Calculator
WEB-INF/classes/endpoint.jaxws.Add
WEB-INF/classes/endpoint.jaxws.AddResponse
WEB-INF/web.xml
WEB-INF/lib/activation.jar
WEB-INF/lib/jaxb.jar
WEB-INF/lib/webservices-rt.jar
WEB-INF/lib/webservices-tools.jar
WEB-INF/lib/webservices.jar
6.deployed into the glassfish as a war file from admin console.
Now after deploying i see the following exception
Exception while deploying the app :
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: java.lang.ClassCastException: endpoint.Calculator
Did i miss anything during the deployment...
Please let me know.
Thanks in Advance.
-Aruna