[xsd-users] anyType problem

Cherednychek, Nikita ncherednychek at initse.com
Thu Sep 20 10:04:07 EDT 2018


Hello,

I'm searching for the solution since ours and still didn't get it, so I decided to write a mail.
I have following complex Type in my xsd:

    <xsd:complexType name="VehicleMonitoringDelivery_t">
        <xsd:sequence>
            <xsd:element name="ResponseTimestamp" type="xsd:dateTime" minOccurs="0"/>
            <xsd:element name="SubscriberRef" type="xsd:string" minOccurs="0"/>
            <xsd:element name="SubscriptionRef" type="xsd:string" minOccurs="0"/>
            <xsd:element name="Status" type="xsd:boolean" minOccurs="0"/>
            <xsd:element name="VehicleActivity" type="VehicleActivity_t" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element name="Extensions" type="xsd:anyType" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="version" type="xsd:NMTOKEN" default="2.0"/>
    </xsd:complexType>

There is an element "Extensions" with type "xsd:anyType".  I have generated a C++ code and want to create an xml. So I create an object of the type
"VehicleMonitoringDelivery_t" (example: myVehicleMonitoringDelivery) and fill it with numbers. For example:

myVehicleMonitoringDelivery-> SubscriberRef("1234");
myVehicleMonitoringDelivery-> Status(true);

and so on.

Now I wont to fill the "Extensions" with some, let say, string. WHO CAN I DO THAT? The naïve approach

myVehicleMonitoringDelivery->Extensions("myString")

doesn't work, in the generated xml a get an empty tag <Extensions/>, although there is no errors.
It would be great if you can help me.

[https://intranet.init-ka.lan/SiteAssets/Logo_Signatur.jpg]

Dr.rer.nat Nikita Cherednychek
Software Developer
Phone +49-(0)721-6100-830
Mobile +49-1525-6610-830
E-Mail ncherednychek at initse.com<MailTo:ncherednychek at initse.com>

INIT Innovative Informatikanwendungen
in Transport-, Verkehrs- und Leitsystemen GmbH
Käppelestrasse 4-10
76131 Karlsruhe
Germany
http://www.initse.com

Geschäftsführer:
Dr.-Ing. Gottfried Greschner
Dipl.-Inform.(FH) Mario Baumgärtner
Dipl.-Inform. Joachim Becker
Dipl.-Kfm. Dr. Jürgen Greschner
Dipl.-Ing.(FH) Klaus Janke
Dipl.-Ing.(FH) Matthias Kühn
Dipl.-Ing.(BA) Andreas Mörder
Dipl.-Kfm. Bernhard Smolka

Amtsgericht Mannheim HRB 103679
Internationale Registrierungen:
988055689MVA (Norwegen)
FC027220 (UK)
IRD124-186-846 (NZ)
CHE-144.752.100 (CH)

Vertraulichkeitshinweis:
Der Inhalt dieser E-Mail ist vertraulich zu behandeln. Das Schreiben ist nur zur Kenntnis des oben genannten Empfängers bestimmt. Wenn Sie nicht der richtige Adressat sind, informieren Sie bitte sofort den Absender und vernichten diese Nachricht. Unerlaubte Kopien sowie unbefugte Weitergabe sind nicht gestattet.
Bitte beachten Sie, dass durch diese E-Mail keine rechtsverbindlichen Willenserklärungen abgegeben werden.

Privacy Notice:
Content of this e-mail must be treated as strictly confidential. This writing is intended only for the knowledge of the above-mentioned addressee. If you are not the correct recipient please inform the sender immediately and permanently erase this message. Illegal copies as well as unauthorized passing is not permitted and strictly forbidden.
Please note that by sending this mail INIT does not make any commitment and is under no obligation.





-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 22941 bytes
Desc: image001.jpg
Url : https://codesynthesis.com/pipermail/xsd-users/attachments/20180920/0ca3517a/image001.jpg


More information about the xsd-users mailing list