aspose file tools*
The moose likes Web Services and the fly likes Difficulty with j2ee tutorial helloservice RPC sample Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Difficulty with j2ee tutorial helloservice RPC sample" Watch "Difficulty with j2ee tutorial helloservice RPC sample" New topic
Author

Difficulty with j2ee tutorial helloservice RPC sample

Oliver Chua
Greenhorn

Joined: Feb 27, 2004
Posts: 29
I'm following the tutorial at j2eetutorial14\doc\JAXRPC3.html
After following the instructions under "Packaging and Deploying the Service"
I ended up with a war with the following contents.

build\mapping.xml
WEB-INF\sun-j2ee-ri.project
WEB-INF\sun-web.xml
WEB-INF\web.xml
WEB-INF\webservices.xml
WEB-INF\wsdl\MyHelloService.wsdl
WEB-INF\classes\helloservice\HelloImpl.class
WEB-INF\classes\helloservice\HelloIF.class
META-INF\MANIFEST.MF

I deployed the WAR by copying it to \tomcat50-jwsdp\webapps
I tried accessing
http://localhost:8080/hello-jaxrpc/hello
like the instructions said
but there was an error:
The requested resource (/hello-jaxrpc) is not available.

When I try
http://localhost:8080/MyHelloService/
it shows a navigable directory page containing the build directory

When I try
http://localhost:8080/MyHelloService/hello
there is an error.
The requested resource (Servlet HelloImpl is not available) is not available.

Anyone on the same boat?
Are the files in the WAR file correct or sufficient?
HelloImpl is not actually a Servlet so I wonder...
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
Hi Oliver,

When I try
http://localhost:8080/MyHelloService/
it shows a navigable directory page containing the build directory


I think there is no available for that context root (MyHelloService).
So whatever you request using that context root, the application server will show error message.

Because of this is example of using JAX-RPC, you should build client class that using that to access class inside server side. And I think that client class is supplied with that tutorial.

Correct me if I am wrong...

daniel
Oliver Chua
Greenhorn

Joined: Feb 27, 2004
Posts: 29
Hi Fisher,

I got it to work by following earlier javatutorial...
by using wsdeploy, converting portable.war to the final war
it creates the correct web.xml that has a servlet entry with class
com.sun.xml.rpc.server.http.JAXRPCServlet
So when I access /hello, it works...

On the 1.4 tutorial, it says
You can package and deploy the service using either deploytool or asant.

I tried using deploytool but the war cannot be deployed to another server. It cannot also be deployed to the j2ee1.4 server.
There was a problem in the username/password I think...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difficulty with j2ee tutorial helloservice RPC sample