axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: Lost "inherited" attributes
Date Wed, 13 Nov 2002 16:02:22 GMT

Sounds like it might be a bug.

A (small) reproducible test case in a Bugzilla report would be great.
A patch to fix the bug would be even better! :-)

Thanks
--
Tom Jordahl


-----Original Message-----
From: Matthias David [mailto:Matthias.David@ptv.de]
Sent: Wednesday, November 13, 2002 3:18 AM
To: 'axis-user@xml.apache.org'
Subject: Lost "inherited" attributes 


Hi,

I'm not quite sure if this a bug or if it's just a usage error as I'm
working with axis for just a week now. Here's the problem:

I got a wsdl that defines a base type like this

	<s:complexType name="RequestBaseType">
		<s:attribute use="required" name="Type" type="s:string"/>
		<s:attribute ...
		...			
	</s:complexType>

And then I got an inherited type:

		<s:element name="Request">
			<s:complexType>
			  <s:complexContent>
				<s:extension base="s0:RequestBaseType">
					<s:sequence>
                              	...  
					</s:sequence>
			  		...
			  </s:complexContent>
			</s:complexType>
		</s:element>

>From the generated classes (wsdl2java creates a RequestBaseType and a
subclass Request) I setup a Request object including a value for the
attribute "Type" from the RequestBaseType and then I send the request using
the stub. But tcpmon shows that "Request" has no attributes set! It seems
that the inherited attributes are lost.

I finally fixed the "problem" by defining a dummy attribute in the "Request"
definition like this:

		<s:element name="Request">
			<s:complexType>
			  <s:complexContent>
				<s:extension base="s0:RequestBaseType">
					<s:sequence>
                              	...  
					</s:sequence>
			  		<s:attribute use="optional"
name="MyDummyType" type="s:string"/>
			  </s:complexContent>
			</s:complexType>
		</s:element>		

Now the inherited attributes are used correctly!

Any clues for that?

Thanks,
 Matthias David.

Mime
View raw message