ccot
ccot

Reputation: 1873

ksoap2: type="xs:anyType" in wsdl, what does it means

<xs:element name="corpusValue" type="xs:anyType" nillable="true" 
    minOccurs="0" maxOccurs="unbounded"/> 

in the wsdl what type of object do you instantiate of this?

What is type="xs:anyType"?

Upvotes: 1

Views: 8302

Answers (2)

user159088
user159088

Reputation:

It means exactly that: any type.

An XML Schema describes the structure of an XML document and enforces constraints on the elements of that XML file. Elements in an XML must respect the types described in the schema to be considered valid.

But there is sometimes the need to have a field or element as being of any type so that you can use polymorphism on the elements or to be able to extend the XML document with elements not specified by the schema.

That's what the any type is used for.

Upvotes: 1

Related Questions