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 pierre betz <pi...@gmail.com> on 2008/06/05 03:04:18 UTC

xsd:anyType and OMElement[]

Ok I've already sent this email to the mailing list, but.. I really nedd at
least one response, so please try to answer !

whatever the version of axis2 1.3 or 1.4 I use,
I've a kind of bud during the wsdl2java operation.
why my element "Values" declared as type = anyType      become an
OMElement[] instead of an Object[]?
in the previous versions of axis (axis1 1.3°, it was worked very well!
(in fact I'm upgrading a big web service from axis 1 to axis2, this is my
last problem I need to slove..)
please help me ! or explain me how to convert an OMElement[] into an
object[] ?

__________

    <complexType name="SearchConditionClauseType">
        <annotation>
            <documentation>   Search Clause Fragment is a comparison between
a field and a value.   </documentation>
        </annotation>
        <sequence>
            <element name="Comparator" type="tns:SearchComparatorType"
nillable="true">
                <annotation>
                    <documentation> comparator  </documentation>
                </annotation>
            </element>
            <element name="FieldName" type="string" nillable="true">
                <annotation>
                    <documentation>  FieldName to search. Pay attention,
fieldnames that are not defined by a type will throw an  exception.
</documentation>
                </annotation>
            </element>
            <element name="Values" *type="anyType"* maxOccurs="unbounded"
                nillable="true">
                <annotation>
                    <documentation>  Value for the test. When using the
Like  operator, the wildcard % can be used. Multiples  values can be tested
(via OR operator)  </documentation>
                </annotation>
            </element>
            <element name="RelationName" type="string" maxOccurs="1"
minOccurs="0" nillable="true">
                <annotation>
                    <documentation>There are some relation between
types.</documentation>
                </annotation>
            </element>
        </sequence>
    </complexType>
_______________

public class SearchConditionClauseType implements
org.apache.axis2.databinding.ADBBean {
    /**
     * field for Comparator
     */
    protected
com.vslitc.service._2008.schema._2008.vslcommontypes.SearchComparatorType
localComparator;

    /**
     * field for FieldName
     */
    protected java.lang.String localFieldName;

    /**
     * field for Values
     * This was an Array!
     */
  *  protected org.apache.axiom.om.OMElement[] localValues;*

    /**
     * field for RelationName
     */
    protected java.lang.String localRelationName;




Maybe if nobody knows why it's doing that, you could send me a piece of code
which was well generated for a type=anytype ?
with that I can correct mine...


thx a lot to answer!