Skip to Content
Former Member
Jul 27, 2006 at 11:33 AM

Problems with Virtual Interfaces (providing web services)


Hi all,

I faced a problem with providing a web service that accepts data as discribed in a schema file (xsd).

I first analysed the schema and created the data classes according to it, as closest, as I could.

How can I realize such a ComplexType as class (

<xs:schema xmlns:cars="Cars" targetNamespace="Cars">
  <xs:element name="MyCars">
        <xs:choice maxOccurs="unbounded">
          <xs:element ref="cars:Ford"/>
	  <xs:element ref="cars:Mercedes"/>
        <xs:element ref="cars:CarPort" minOccurs="0"/>
<xs:schema xmlns:cars="Cars" targetNamespace="Cars">

Data that will be provided to the WebService might look like:

<MyCars xmlns="Cars">
  <Ford ... />
  <Mercedes ... />
  <Ford ... />
  <Ford ... />
  <Mercedes ... />

  <CarPort>5th Avenue</CarPort>

Please help me and thanks in advance,