I have a type defined in document/literal/wrapped style that extends another 
type. I was wondering if its possible to communicate to CXF the subtype being 
used in a way other than via a type attribute in the super type xml tag. 

Heres my type definition:

<complexType abstract="true" name="Person">
? <sequence>
??? <element ...
? </sequence>
</complexType>

<complexType name="User">
? <complexContent>
??? <extension base="Person">
????? <sequence>
??????? <element ...>
????? </sequence>
??? </extension>
? </complexContent>
</complexType>


When send the SOAP over the wire (successfully), it looks like this: 

<Person xsi:type="ns3:User" xmlns:ns3="...">
? ...
</Person>

My question again - is there another way to communicate the type (User) being 
represented? Is there a way to use a wsdl element called "type" that is used by 
jaxb for custom binding? Such as:

<simpleType name="PersonType">
? <restriction base="xsd:string">
??? <enumeration value="User"/>
? </restriction>
</simpleType>

<complexType abstract="true" name="Person">

? <sequence>

??? <element ...
??? <element name="type" type="PersonType">

? </sequence>

</complexType>

Thanks

Reply via email to