You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Thomas Bayer <ba...@oio.de> on 2003/10/17 12:19:54 UTC

WSDL generator and recent changes in BasicProvider, JavaProvider

Hi,

I was wrong with the patch for the bug:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23844

the duplicated code in generateWSDL belongs to BasicProvider not to
JavaProvider. Both methods call the emit method of the class
org.apache.axis.wsdl.fromJava.Emitter. The name of the package fromJava give
to understand this Emitter emits WSDL from generated from Java. But the
Emitter uses both the information about the class and the serviceDesc to
generate WSDL. If only a serviceDesc and no service implementation class is
provided Emitter will throw a NPE. With the following check against null
Emitter is capable of generating WSDL out of a serviceDesc without a Java
class too:


// if cls contains a Class object with the service implementation use the
Name of the
// class else use the service name
if ( cls != null ) {
    clsName = cls.getName();
    clsName = clsName.substring(clsName.lastIndexOf('.') + 1);
} else {
    clsName = getServiceDesc().getName();
}


With this modification it is possible to generate WSDL for every provider if
metainformation with operation and parameter elements is provided in the
deployment descriptor. There are some limitations faults for example. But
for some services using a non JavaProvider WSDL could be generated.
I guess Emitter was designed with both in mind, but used recently only for
JavaProviders. Perhaps Emitter can be modified so that it doesn't know
anything about classes and the Java specific issues can be handled somewhere
else.

I've provided a Patch to undo the changes my last patch did for providers
with no WSDL support, cause with the modification mentioned earlier
(limited) WSDL could be generated for all Providers. The Patch moves the
method generateWSDL down from JavaProvider to BasicProvider and changes the
class Emitter.

Thomas