You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Harald <my...@gmx.at> on 2003/10/22 16:05:50 UTC
Support for anyAttribute in xsd using wsdl2java
Hi,
a server-side xml-schema used by our wsdl makes use of "anyAttribute" like
this:
...
<xs:element name="Header" ref="Header" minOccurs="0"/>
...
<xs:element name="Header">
<xs:complexType>
<xs:anyAttribute processContents="skip"/>
</xs:complexType>
</xs:element>
...
Generating a client-implementation using wsdl2java of Axis 1.1 results in a
Header-class without explicit setter- and getter-methods like
setAnyAttributes() and getAnyAttributes(). It seams, that Axis does not
support "anyAttribute" in a scenario like this.
In another project we successfully used "any" to support any sub-elements
within "Attributes" like this:
...
<xs:element name="Attributes">
<xs:complexType>
<xs:sequence>
<xs:any maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
...
So Axis generated an Attributes-class with the methods set_any() and
get_any() as expected.
Do you have any hints for solving the problem when using "anyAttribute"?
Maybe any (minor) changes in the xml-schema would help?
Any help greatly appreciated,
Harald
Re: Support for anyAttribute in xsd using wsdl2java
Posted by Pedro Salazar <pe...@ptinovacao.pt>.
On Wed, 2003-10-22 at 15:05, Harald wrote:
> Generating a client-implementation using wsdl2java of Axis 1.1 results in a
> Header-class without explicit setter- and getter-methods like
> setAnyAttributes() and getAnyAttributes(). It seams, that Axis does not
> support "anyAttribute" in a scenario like this.
>
I can be wrong but I had the idea that attributes wasn't supposed to use
in WSDL 1.1, or at least it's advised to not use them. Here an extract
from wsdl 1.1 specification ($2.2 types):
"Use element form (not attribute)"
I don't know why is that, but is mentioned!
I think I already tried to generate classes from a WSDL complex type
with attributes and I hadn't luck in the classes generation.
Maybe someone here could clarify this better... (I hope)
regards,
Pedro Salazar.
--
PS
pedro-b-salazar@ptinovacao.pt
PGP:0E129E31D803BC61