axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Bayer" <>
Subject WSDL generator and recent changes in BasicProvider, JavaProvider
Date Fri, 17 Oct 2003 10:19:54 GMT

I was wrong with the patch for the bug:

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

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.


View raw message