Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to use the WS

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all.
this is my first day with web services and I need some help.
I have created a simple class representing a book (name and author fields) and a BookStore class which creates some books.
BookStore is the class which I want to make it a web services.
I have put Book.class and BookStore.class under %TOMCAT_HOME%\webapps\axis\WEB-INF\classes
I create the following deploy.wsdd file

hen wrote the following command :
java org.apahce.axis.client.AdminClient -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
every thing is ok here.
then I wrote the following command :
java org.apache.axis.wsdl.WSDL2Java -v bookservice.wsdl
(I got bookservice.wsdl from : http://localhost:8080/axis/services/bookservice?wsdl)
now, I got the following files :
bookns/Book.java
localhost/BookStoreService.java
localhost/BookStoreServiceLocator.java
localhost/BookStore.java
localhost/BookserviceSoapBindingStub.java
I have compiled them and put them in :
%TOMCAT_HOME%\webapps\myapp\WEB-INF\classes
my servlet is getting the number of the book to search from a jsp page and then use the service
to find it and add it to session scope.

I tried a standalone client and it works correctly except the servlet.
please some help.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Todd:
I tried a standalone client and it works correctly except the servlet.
please some help.

No error messages
Did you checked the tomcat log. If standalone client can work then the servlet client should work unless you miss some class on the classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic