-
1. Re: JAX-RPC Web Services - Class is not a servlet error - Ho
peterj Nov 12, 2007 11:40 AM (in response to srkpriv)Please post source for HelloServlet.
-
2. Re: JAX-RPC Web Services - Class is not a servlet error - Ho
srkpriv Nov 12, 2007 12:03 PM (in response to srkpriv)"PeterJ" wrote:
Please post source for HelloServlet.
Hi here is the HelloServlet source code
This I did as per the chapter 12 of jboss tutorial. Here is the link for the turotial - http://docs.jboss.org/jbossas/jboss4guide/r2/html/ch12.html
- Thx.
import javax.servlet.http.HttpServlet;
/**
*
*/
public class HelloServlet {
/**
*
*/
public HelloServlet() {
// TODO Auto-generated constructor stub
}
/**
* say Hello
*/
public String hello(String name) {
return "Hello " + name + "!" ;
}
} -
3. Re: JAX-RPC Web Services - Class is not a servlet error - Ho
peterj Nov 12, 2007 12:09 PM (in response to srkpriv)Like the error says, this is not a servlet. The class must extend HttpServlet to be a servlet.
Also, the tutorial you are using is for 4.0.1, you are using 4.2.1. The web services implementation has changed dramatically between the two. If you are just now learning web services, I suggest you start with the newer JAX-WS. -
4. Re: JAX-RPC Web Services - Class is not a servlet error - Ho
srkpriv Nov 12, 2007 12:16 PM (in response to srkpriv)Hi Petej,
I am starting webservices recently. I have been doing some SOAP calls and XML Over HTTP previously. Now I just formalize my understanding of Web Services and SOA. I am just trying to undertstand the JAX-RPC services. As per the example in the tutorial it says putting the HelloWorldServlet in webservices.xml allows the class to be treated as pseudo-servlet so that's what I am trying to figure out why it is failing. -
5. Re: JAX-RPC Web Services - Class is not a servlet error - Ho
peterj Nov 12, 2007 12:59 PM (in response to srkpriv)You must be missing some configuration setting somewhere. Unfortunately, I have only used JAX-WS, so I can't really help you with JAX-RPC.
-
6. Re: JAX-RPC Web Services - Class is not a servlet error - Ho
srkpriv Nov 12, 2007 11:20 PM (in response to srkpriv)^^^^^
That's what I think too. Anyway, thanks a lot.
Is there anyone who can pinpoint what is the issue?
Thanks -
7. Re: JAX-RPC Web Services - Class is not a servlet error - Ho
srkpriv Nov 13, 2007 1:26 AM (in response to srkpriv)I earlier named my servlet as HelloServlet and my servlet-link as 'HelloWorldServlet'. I saw a message in one of the abstractserviceendpoint class that 'class with 'servlet' name ignored' or something like that. I also added a xmlns:xsi etc. some schema for the wstools-config.xml and compiled it.
So I changed my class name to 'HelloServiceImpl' and my endpoint to 'HelloEndPoint'. I originally generated wsdl using wscompile. Now I tried using wstools and it worked fine. I tried using wscompile as well and the original 'not a servlet is resolved now'. wstools it is working fine now.
With wscompile deployment I get unable to get portype from wsdl message. This is diff error message. Just out of curiosity I am gonna generate the wsds, mapping and webservices.xml files in both wscompile and wstools and see what is the difference and will try to pinpoint why wscompile deployment is not working.
If you have any other solution or if this is what resolved in your case too let me know. -
8. Re: JAX-RPC Web Services - Class is not a servlet error - Ho
asoldano Nov 14, 2007 2:57 PM (in response to srkpriv)Did you already read this http://jbws.dyndns.org/mediawiki/index.php?title=JAX-RPC_User_Guide#JSR-109_POJO_Endpoint ?