XSD: Element 'value' has both a 'type' attribute and a 'anonymous type' child.

DAB268

Grünschnabel
Hallo.

Im unten angegebenen types-Ausschnitt einer WSDL-Datei habe ich Probleme mit folgender Meldung:

Element 'value' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.

Wie kann ich diese beseitigen?

MfG
DAB268

Code:
<types>
  <schema targetNamespace="http://www.pegel-kaub.de/watergaugedata.xsd"
   xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="WaterGaugeDataRequest">
    <complexType>
     <all>
      <element name="time" type="dateTime"/>
     </all>
    </complexType>
   </element>
   <element name="WaterGaugeData">
    <complexType>
     <all>
      <element name="value" type="float">
       <complexType>
        <attribute name="unit" type="string" />
       </complexType>
      </element>
     </all>
    </complexType>
   </element>
  </schema>
 </types>
 
Zuletzt bearbeitet:
Hi.
Im unten angegebenen types-Ausschnitt einer WSDL-Datei habe ich Probleme mit folgender Meldung:
Element 'value' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.
Wie kann ich diese beseitigen?
Das sagt doch aber schon die Fehlermeldung. Du darfst nur eins von beiden angeben. Entweder du entfernst das type="float" Attribut oder du entfernst den <complexType> ... </complexType> aus dem Element.

Gruß
 

Neue Beiträge

Zurück