axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Rachal (JIRA)" <>
Subject [jira] Created: (AXIS2-2952) wsdl2java -d jaxrbi does not corretly handle namespace ""
Date Thu, 12 Jul 2007 11:13:05 GMT
wsdl2java -d jaxrbi does not corretly handle namespace ""

                 Key: AXIS2-2952
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.2
         Environment: All platforms
            Reporter: Denis Rachal

wsdl2java -d jaxrbi does not corretly handle namespace ""

When using the namespace "" within an XSD, wsdl2java with
binding jaxbri puts the 

generated code in the incorrect package.

I have an XSD that uses "xml:lang", defined in the namespace "".
Although you should not 

need to declare the namespace prefix "xml" the XSD in this example does so (see

details). The WSDL2java will fail if it is not declared for this use case.

If the namespace "" is explicitely declared and included,
then the JAXB classes are put 

into the package "org.w3.www.xml._1998.namespace" instead of the package for the target namespace
of the XSD. In this example 

"", which should be package "".

While this may seem to just be a bit of an annoyance, it can actually produce errors in some
cases. I have two different XSDs 

that use "xml:lang" and include the "" namespace. In the
case where both XSDs are 

referenced by a single WSDL one package is overwritten by the other during the "wsdl2java"
process and you end up with 

classes in the wrong namespace. gets overwritten when processing the second
XSD. Classes generated from the 

first XSD end up with the wrong file.

Even stranger is that if I have the two XSDs consumed by a single WSDL, the overwrite does
not always occur. Sometimes the 

classes end up in the correct package for one of the XSDs. Simply by moving the schemas and
WSDLs to a new directory and 

calling wsdl2java again may produce different results. Therefore I have only documented this
case as best as I can here.

WSDL file for reproducing this bug is attached:

<?xml version="1.0" encoding="UTF-8"?>

	<!-- Import external WSDL schemas -->

		location="" />
				schemaLocation="" />

	<wsdl:binding name="TestBinding" type="wsen:DataSource">
			transport="" style="document" />

		<!-- Operations -->
		<wsdl:operation name="EnumerateOp">
				soapAction="" />
				<wsoap12:body message="wsen:EnumerateMessage" parts="Body" use="literal" />
				<wsoap12:body wsdl:required="true"
					message="wsen:EnumerateResponseMessage" parts="Body" use="literal" />


	<wsdl:service name="TestService">
			Test Service

		<wsdl:port name="TestResource" binding="tns:TestBinding">
                        <wsoap12:address location="http://localhost:8080/test/user/" />


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message