|
I did everything successfully as described, but had a problem when I tried to execute the client. The details are given below
1. Created CalcService.java
2. Compiled the java program to get CalcService.class
3. placed the CalcService.class in /$TOMCAT_HOME/webapps/soap/WEB-INF/classes/onjava
4. created DeploymentDescriptor.xml in /$TOMCAT_HOME/webapps/soap/WEB-INF/classes/onjava directory
5. java org.apache.soap.server.ServiceManagerClient
http://localhost:8080/soap/servlet/rpcrouter list
Deployed Services:
urn:Example1
urn:hello-service
6. java org.apache.soap.server.ServiceManagerClient
http://10.200.240.12:8888/soap/servlet/rpcrouter deploy
DeploymentDescriptor.xml
7. java org.apache.soap.server.ServiceManagerClient
http://localhost:8080/soap/servlet/rpcrouter list
Deployed Services:
urn:onjavaserver
urn:Example1
urn:hello-service
8. created CalcClient.java
9. compiled CalcClient.java to get CalcClient.class in
/$TOMCAT_HOME/webapps/soap/WEB-INF/classes/onjava directory.
10. java onjava.CalcClient 98 90
Exception in thread "main" java.lang.NoClassDefFoundError:
onjava/CalcClient
The following was added in server.xml
<Context path="/onjava"
docBase="webapps/onjava"
debug="0"
reloadable="true" >
</Context>
I wanted to know weather if the above procedure is correct. Can anyone tell me if there is any mistake in the above procedure?
And I have one more problem, I am not able to execute servlets in subdirectory,
The link: "http://localhost:8080/examples" is working;
But
"http://localhost:8080/examples/dir" is not working and
"http://localhost:8080/examples/dir/subdir" also fails.
1. Do I need to set the <context path> for the subdirectory also?
2. Are the files present in the right directory?
3. Are the file names given is correct?
4. I need to give the following to run a servlet
http://localhost:8080/examples/servlet/CookieExamples is working
http://localhost:8080/examples/CookieExamples is not working
can anyone explain .
thanking u in advance
santy (santosh_b_p@yahoo.com)
|
I did not understand the packages system properly, so when I compiled CalcClient, I tried to run it from the same directory ie
mydir> javac CalcClient.java
mydir> java onjava.CalcClient 98 90
Exception in thread "main" java.lang.NoClassDefFoundError: onjava/CalcClient
What I needed to do was create a directory called onjava and have the class file in there thus:
mydir\onjava> javac CalcClient.java
mydir> java onjava.CalcClient 98 90
8
See what I mean?
Hope it helps
Rob