HTTP Request

OK, I see what you mean… The entire URL that you gave me does show the result of the Hello world plugin :D

But the http://localhost:8080/servoy-service URL gives the Tomcat internal server error. I think here it should display a lits of registered webservices, doesn’t it?

Should I add another function for that or something?

Paul

No comments of why the servoy-service URL gives a TomCat error?

Paul

http://localhost:8080/servoy-service/ gives no error on my server, what error does it produce?

Okay, I tried the URL on 2.0.4 with no special plugins.
This is what I get:

Apache Tomcat/4.0.1 - HTTP Status 405 - HTTP method GET is not supported by this URL

type Status report

message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).

Mac OS X 10.3.5
Servoy R2 2.0.4-build 277
Java 1.4.2-38

Ok, I have the plugin in my plugin directory, as described before. In I go to URL http://localhost/servoy-service, I get the follwoing:

Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error


type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
at com.servoy.j2db.server.servlets.WebServicesServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Unknown Source)


Now, If I go to URL: http://localhost/servoy-service/test/ then I get the result from my plugin (hello world!).

As said before: My servlet class looks like this:
package test;

import javax.servlet.ServletException;
import javax.servlet.http.;
import java.io.
;

public class HelloServlet extends HttpServlet
{
public void service(HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException
{
PrintWriter out = res.getWriter();
out.println(“Hello, world!”);
out.close();
}
}

And ofcourse I have the serverside class:

public class EmptyServerSideServer implements IServerPlugin {

public void initialize(IServerAccess app) throws PluginException
{
app.registerWebService(“test”,new HelloServlet() );
}

public EmptyServerSideServer ()//must have default constructor
{
}

If you want I can send you the JAR (I do not seem able to add attachements to my posts)

Paul

pbakker:
Ok, I have the plugin in my plugin directory, as described before. In I go to URL http://localhost/servoy-service, I get the follwoing:Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error

what page/result whould you expect here then?

pbakker:
Now, If I go to URL: http://localhost/servoy-service/test/ then I get the result from my plugin (hello world!).

yes now you are accessing your servlet…

Well, if I go to URL http://localhost/servoy-service if my plugin is not in the plugin directory, I get a message that there are no Servoy webservices registered.

so, thinking logically, if I would register a webservice, I would expect the http://localhost/servoy-service URL to tell me the name of the registered service :D

I certainly do not expect to get an internal tomcat Server error.

If it’s not possible to list the registered services, I would think an empty page would look a lot better than an page with an error.

As I said before: I can email the plugin so you can see it for yourself.

Paul