axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Susantha Kumara" <susan...@opensource.lk>
Subject RE: Supporting complexType with simpleContent - FYI
Date Fri, 20 Aug 2004 13:06:58 GMT
Hi all,
 
I have added the support for complexTypes with simpleContent. Now the
code generates fine for such complexTypes.
But I did not have much time to test any server/client code generated. 
 
I have committed the code because it has no affect on the rest of the
code. 
 
Please have a try with wsdls with complexTypes with simpleContent (Ex:
uddi wsdl ) and let me know if it works fine.
 
Susantha
---
-----Original Message-----
From: Susantha Kumara [mailto:susantha@opensource.lk] 
Sent: Wednesday, August 18, 2004 5:27 PM
To: 'Apache AXIS C Developers List'
Subject: Supporting complexType with simpleContent - FYI
 
Hi all,
 
I am working on Supporting complexType s with simpleContent and need to
add new functions to Serializer and Deserializer.
 
serializeAsChardata to the serialzer
 
and 
 
getChardataAsString to the deserializer
 
Then the corresponding code generated for 
 
<xsd:complexType name="name">
           <xsd:simpleContent>
                 <xsd:extension base="string">
                       <xsd:attribute ref="xml:lang" use="optional"/>
                 </xsd:extension>
           </xsd:simpleContent>
     </xsd:complexType>
 
will be
 
class name
{
public:
    xsd__string name_value; /*extension base type*/
    xsd__string lang; /*attribute*/
     name();
     ~name();
};
 
/* Serialized stream of the name object 
<name lang="en">some string in english </name>
*/
 
/*
* This static method serialize a name type of object
*/
int Axis_Serialize_name(name* param, IWrapperSoapSerializer* pSZ)
{
    if ( param == NULL ) {
        /* TODO : may need to check nillable value*/
        pSZ->serializeAsAttribute("xsi:nil", 0,
(void*)&(xsd_boolean_true), XSD_BOOLEAN);
        pSZ->serialize(">", NULL);
        return AXIS_SUCCESS;
    }
    /* first serialize attributes if any*/
    pSZ->serializeAsAttribute("lang", 0, (void*)&(param->lang),
XSD_STRING); 
    pSZ->serialize(">", 0);
    pSZ->serializeAsChardata((void*)&(param->name_value), XSD_STRING);
    return AXIS_SUCCESS;
}
 
/*
* This static method deserialize a name type of object
*/
int Axis_DeSerialize_name(name* param, IWrapperSoapDeSerializer* pIWSDZ)
{
     param->lang = pIWSDZ->getAttributeAsString("lang",0);
    param->name_value = pIWSDZ->getChardataAsString();
}
 
I am doing the improvements to serializer/deserializer code as well as
WSDL2Ws code.
 
Susantha
---
 

Mime
View raw message