[
http://issues.apache.org/jira/browse/AXIS2-262?page=comments#action_12331307 ]
David Jencks commented on AXIS2-262:
------------------------------------
Although xmlbeans doesn't provide getters/setters for xsd:any elements, you
don't need to use XmlCursors to find them.
For instance, assuming you have an type like this:
<xs:complexType name="xml-attributeType">
<xs:sequence>
<xs:any namespace="##other" processContents="lax"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
XmlObject[] anys =
xmlAttributeType.selectChildren(XmlAttributeType.type.qnameSetForWildcardElements());
will get the xsd:any element (inside an array). If the xmlbeans generated
classes and types are available to the appropriate classloader and
SchemaTypeLoader, the XmlObject you get will in fact be the correct type
according to its schema, not a plain XmlObject.
If you know the qname of the expected element you can create your own QNameSet
and get only the ones you are interested in.
> provider wrapper for xsd:any
> ----------------------------
>
> Key: AXIS2-262
> URL: http://issues.apache.org/jira/browse/AXIS2-262
> Project: Apache Axis 2.0 (Axis2)
> Type: Improvement
> Components: client-api
> Environment: WinXP, JDK 5.0, code from SVN 10/3/2005
> Reporter: Simon Fell
>
> In the generated client code, there's no getters or setters that represent an
> xsd:any in the schema, you're left to grunge around with xmlCursors yourself,
> this is a PIA because the xmlCursor is not aware of where the xsd:any is
> declared in the sequence, so suddenly the client programmer has to be aware
> of the structure of the container of the xsd:any, not just the xsd:any
> elements themselves.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira