axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Marin <>
Subject Using Complex Types with Mixed Content
Date Wed, 09 Feb 2011 02:38:38 GMT
Hello all,

I am working on implementing a web service specified by a WSDL and 
associated XSD file. One of the types in the XSD is mixed:

        <xs:complexType name="PostContent" mixed="true">
                        <xs:documentation>Type the defines the content of a 
                <xs:choice minOccurs="0" maxOccurs="unbounded">
                                <xs:documentation>This is a mixed type. It 
can contain one or more of each of quoted content, links to other material, 
and a signature block.</xs:documentation>
                        <xs:element name="Link" type="xs:anyURI">
                                        <xs:documentation>A link to material 
external to the post.</xs:documentation>

(for simplicity, I included only one of the options supported by the 
xs:choice). An example of this data is as follows:

                                Emmanuelm, aren't you the person who 

added those other categories on 6 July 2005? --

I used WSDL2C to generate stubs for all the types in the XSD. However, the 
stubs generated for PostContent don't seem to include any way of accessing 
the text in the mixed type, just the elements of the choice:

        struct adb_PostContent
            axutil_array_list_t* property_PostContentChoice;

                axis2_bool_t is_valid_PostContentChoice;


Any idea whether this is an error in the code generator, or whether there is 
an underlying problem with supporting mixed content? How is mixed content 
represented in the Axiom types? Looking at the definition of the 
axiom_element struct (in om_element.c) I see only one member storing text,

axis2_char_t *text_value;

In the case of mixed nodes, is the mixed content stored in a bunch of 
children, which can be either text elements or nodes? Or some other method I 
am not seeing?

Any help you may provide will be greatly appreciated.

Thank you,

Alex Marin 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message