Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 71374 invoked from network); 20 Aug 2004 13:07:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Aug 2004 13:07:14 -0000 Received: (qmail 93028 invoked by uid 500); 20 Aug 2004 13:07:11 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 93011 invoked by uid 500); 20 Aug 2004 13:07:11 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 92995 invoked by uid 99); 20 Aug 2004 13:07:10 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=HTML_90_100,HTML_MESSAGE X-Spam-Check-By: apache.org Received: from [209.68.1.20] (HELO relay.pair.com) (209.68.1.20) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 20 Aug 2004 06:07:09 -0700 Received: (qmail 9196 invoked from network); 20 Aug 2004 13:07:03 -0000 Received: from 200.247.adsl.sltnet.lk (HELO SusanthaNB) (220.247.247.200) by relay.pair.com with SMTP; 20 Aug 2004 13:07:03 -0000 X-pair-Authenticated: 220.247.247.200 From: "Susantha Kumara" Cc: "'Apache AXIS C User List'" Subject: RE: Supporting complexType with simpleContent - FYI Date: Fri, 20 Aug 2004 19:06:58 +0600 Message-ID: <000501c486b6$961c3f60$0a65a8c0@SusanthaNB> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0006_01C486E8.E0B6AF60" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal In-Reply-To: <000101c48516$58f9d800$0a65a8c0@SusanthaNB> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C486E8.E0B6AF60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 will be class name { public: xsd__string name_value; /*extension base type*/ xsd__string lang; /*attribute*/ name(); ~name(); }; /* Serialized stream of the name object some string in english */ /* * 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 --- ------=_NextPart_000_0006_01C486E8.E0B6AF60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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=3D"name">

        = ;   <xsd:simpleContent>

        = ;         <xsd:extension base=3D"string">

        = ;            =    <xsd:attribute ref=3D"xml:lang" use=3D"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=3D"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 =3D=3D NULL ) = {

        = /* TODO : may need to check = nillable value*/

        pSZ->serializeAsAttribute("xsi:nil", 0, (void*)&(xsd_boolean_true), = XSD_BOOLEAN);

        pSZ->seriali= ze(">", 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 = =3D pIWSDZ->getAttributeAsString("lang",0);

    = param->name_value =3D pIWSDZ->getChardataAsString();

}

 

I am doing the improvements to = serializer/deserializer code as well as WSDL2Ws code.

 

Susantha

---

 

------=_NextPart_000_0006_01C486E8.E0B6AF60--