I'm using WSDL to define messages that have one (or more) elements
containing arbitrary XML and I'm running into problems.

I tried:

      <xsd:complexType name="AddContact">
        <xsd:sequence>
          <xsd:element name="UserId" type="xsd:string"/>
          <xsd:element name="AbookId" type="xsd:string"/>
          <xsd:element name="Contact" type="xsd:any"/>
        </xsd:sequence>
      </xsd:complexType>

Where the "Contact" element can contain arbitrary XML but WSDL2Java
generates references to

                       private org.w3.www._2001.XMLSchema.Any contact;

which doesn't seem to exist.

Is defining an element like this (type="xsd:any") even legal?

I couldn't find any support for this form in the code but I did hack an
AnyDeserializer and mapped it to this type and it works as I wanted.

Sam

Reply via email to