[ https://issues.apache.org/jira/browse/AXIS2C-1071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580409#action_12580409 ]
Sam Meder commented on AXIS2C-1071: ----------------------------------- Sure, lets using the snippets of schema in my original report the following xml is causing problems: <VirtualHardware> ... <device xsi:type="vim25:VirtualController> ... </device> </VirtualHardware> Note that device was declared as being of type vim25:VirtualDevice, the base type for vim25:VirtualController. To put it in object oriented terms: VirtualHardware declares a member using the VirtualDevice base class type. At runtime it is initialized with a instance of a sub class (Virtual Controller). The issue is that Axis2c will only resolve the base class. >From what I could tell from the generated adb stubs (adb for the sub types is >never generated by the way, but I guess there may be a command line switch for >that) you could do something like the following to support this: - The generated structs must have a type member as their first member - The generated structs must be registered with a type registry that maps their type to a function pointers for serialization/desirialization and possibly information that allows one to check the type hierarchy - The generated serialization/deserialization code needs to be changed to make use of this registry > WSDL2C, ADB & xsi:type based deserialization > -------------------------------------------- > > Key: AXIS2C-1071 > URL: https://issues.apache.org/jira/browse/AXIS2C-1071 > Project: Axis2-C > Issue Type: Bug > Components: core/addressing > Reporter: Sam Meder > > I have the problem of having to work with a wsdl interface the makes use of > type extensions and xsi:type. For example: > <complexType name="VirtualHardware"> > <complexContent> > <extension base="vim25:DynamicData"> > <sequence> > <element name="numCPU" type="xsd:int" /> > <element name="memoryMB" type="xsd:int" /> > <element name="device" type="vim25:VirtualDevice" > minOccurs="0" maxOccurs="unbounded" /> > </sequence> > </extension> > </complexContent> > </complexType> > where the VirtualDevice type is extended in various ways to reflect different > kind of device types: > <complexType name="VirtualController"> > <complexContent> > <extension base="vim25:VirtualDevice"> > <sequence> > <element name="busNumber" type="xsd:int" /> > <element name="device" type="xsd:int" minOccurs="0" > maxOccurs="unbounded" /> > </sequence> > </extension> > </complexContent> > </complexType> > The issue I am running into is that WSDL2C does not seem to support this kind > of xsi:type based type serialization/deserialization (which admittedly fits > really poorly with a non-object oriented language like C). You could probably > make it work by storing type information in the generated structs, combined > with a type registry. > Any suggestions on workarounds other than using the XML model? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]