Problem with JAX-RPC generated code

From: Steve Robenalt <steve_at_WEBCIRCUIT.COM>
Date: Sat, 15 Feb 2003 21:07:23 -0800

Hi Everyone,

I am having a very strange problem using JAX-RPC code within an
application I am developing. Hopefully, someone has encountered this
problem before and can provide some advice. I did check several months
of the archive and saw what may be related problems, but no answers.

My environment for development is as follows:

JWSDP 1.0.01 on a Win2k Pro machine with current service packs
Application developed using JAX-RPC with a static (stub-based) client.
ANT used to build the app based on a modified form of the examples.

App architecture:
Web app based on servlet/JSP
Client side code (stub-based) called within servlet
JAX-RPC generated code linking client to server
Server side code using JDBC
Oracle 8 database

A record from the database is mapped into an object instance in the
server-side code. The client side code requests the object instance from
the server via the generated code. The web app retrieves the object
instance from the client side code and uses it to populate a web page.

The object instance containing the data is in package a.
The client and server side code are in package b.

The client side code has a main method that calls the data retrieval
method and prints out a couple of fields to indicate that it has read
the database successfully when run from the command line. As such, I
conclude that the server is operational and the client is operational.

The problem is with the web application. Within its doGet processing, it
creates an instance of the client and calls the same method as the one
from the main method of the client. The result is a
NoSuchMethodException claiming that the method I am calling does not
exist. After verifying the method signature and eliminating the
possibility of multiple versions of the client class, I investigated
further and changed my build process to build the web app in the same
build process as the client, server, and data object. This confirmed my
suspicion that the problem with the missing method was resulting from an
ambiguity in the definition of the data object.

Apparently, something within the generated code has caused the client to
believe that the data object exists both in package a and package b and
the resulting error regarding the method signature is related to the

I used the -keep option on wscompile and wsdeploy and searched the
generated code for causes of this ambiguity. So far, all references to
the data object are qualified by the proper package.

Has anyone else seen anything like this? I'm trying to finish a
prototype application and this is the last hurdle I need to overcome
(other than normal test/debug cycles).

Thanks in advamce for any help!
- Steve Robenalt