• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difficulty with j2ee tutorial helloservice RPC sample

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
reply
    Bookmark Topic Watch Topic
  • New Topic