Help deploying a web service
brianhks Jan 17, 2006 12:30 PMI cannot for the life of me get a web service to deploy. I have gone through the tutorial in the wiki also with no luck. I tried deploying the ws.jar from the tutorial and it fails with the same error.
I deploy the war and then hit http://localhost:8080/lingopoint/TranslationService?wsdl
This gives me the following error
javax.servlet.ServletException: Class lingotek.webservice.TranslationServiceImpl is not a Servlet
ok now for a copy of all my files
TranslationService.wsdl
<?xml version="1.0" encoding="UTF-8"?> <definitions name="TranslationWebService" targetNamespace="http://www.lingotek.com" xmlns:tns="http://www.lingotek.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://www.lingotek.com/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types> <schema targetNamespace="http://www.lingotek.com/types" xmlns:tns="http://www.lingotek.com/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> <complexType name="Quote"> <sequence> <element name="quote" type="float"/> <element name="quoteId" type="int"/> </sequence> </complexType> </schema> </types> <message name="TranslationService_getQuote"> <part name="int_1" type="xsd:int"/> <part name="Calendar_2" type="xsd:dateTime"/> <part name="String_3" type="xsd:string"/> </message> <message name="TranslationService_getQuoteResponse"> <part name="result" type="ns2:Quote"/> </message> <portType name="TranslationService"> <operation name="getQuote" parameterOrder="int_1 Calendar_2 String_3"> <input message="tns:TranslationService_getQuote"/> <output message="tns:TranslationService_getQuoteResponse"/> </operation> </portType> <binding name="TranslationServiceBinding" type="tns:TranslationService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/> <operation name="getQuote"> <soap:operation soapAction=""/> <input> <soap:body use="literal" namespace="http://www.lingotek.com"/> </input> <output> <soap:body use="literal" namespace="http://www.lingotek.com"/> </output> </operation> </binding> <service name="TranslationWebService"> <port name="TranslationServicePort" binding="tns:TranslationServiceBinding"> <soap:address location="REPLACE_WITH_ACTUAL_URL"/> </port> </service> </definitions>
webservices.xml
<webservices xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:impl="http://com.underworld.crimeportal/ws4ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd" version="1.1"> <webservice-description> <webservice-description-name>TranslationWebService</webservice-description-name> <wsdl-file>WEB-INF/wsdl/TranslationService.wsdl</wsdl-file> <jaxrpc-mapping-file>WEB-INF/TranslationService-mapping.xml</jaxrpc-mapping-file> <port-component> <port-component-name>TranslationWebService</port-component-name> <wsdl-port>TranslationServicePort</wsdl-port> <service-endpoint-interface>lingotek.webservice.TranslationService</service-endpoint-interface> <service-impl-bean> <servlet-link>TranslationService</servlet-link> </service-impl-bean> </port-component> </webservice-description> </webservices>
web.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>LingoTek</display-name> <!--Web Services--> <servlet> <servlet-name>TranslationService</servlet-name> <servlet-class>lingotek.webservice.TranslationServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>TranslationService</servlet-name> <url-pattern>/TranslationService</url-pattern> </servlet-mapping> </web-app>
I created the wsdl file using wscompile
I'm using JBoss 4.0.3SP1
Can someone help me?
Thanks
Brian