DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

WSDL Emitter does not output xml namespace declarations for mappings used only in 
extraclasses.

           Summary: WSDL Emitter does not output xml namespace declarations
                    for mappings used only in extraclasses.
           Product: Axis
           Version: current (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When using Java2WSDL, the class org.apache.axis.wsdl.fromJava.Emitter does not
handle packages only used in the extraclasses option. The "tnsXX" namespace
declarations are correctly resolved internally and correctly referenced in the
reslting WSDL file, the only missing part is the xmlns:tnsXX="" declaration in
the WSDL header.

Attaching a ZIP-file with Ant-script and Java sourcefiles to reproduce this
problem. The data model is also a hint as to why you would like to include
extraclasses from packages never surfaced in the interface class used for the
SOAP service.

Use Ant to build. Target "generate-wsdl" will generate a WSDL file in
${basedir}/../build/webservice/BSBug.wsdl, where the xmlns:tns1 declaration is
missing (for the "se.curalia.axis.otherpackage" package). Target
"generate-server-subs" will fail when trying to run WSDL2Java with a "Type
referenced but not defined" error unless xmlns:tns1 is handcoded into the WSDL
file. The default target "generate-server" will try to run both these targets.

It seems to me that AXIS' usage of the WSDLFactory from IBM's WSDL4J at the
moment cannot handle this situation. After the Document instance is created, the
insertion of type info for extra classes with writeTypeForPart() does not affect
the header. Would it not be possible to merge the information from the extra
classes into the document's definition before creating the Document instance?

Reply via email to