axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark B. Elrod" <>
Subject Re: xsd__string != string
Date Tue, 18 May 2004 17:29:35 GMT

Susantha Kumara wrote:

>BTW what does WS-I say about having names that has periods ?. ex: 
>      <xsd:complexType name="Vindicia.Soap.Transaction.Item">
I have not been able to find any restriction on the charcaters used for 
names. The reason they have periods is that the guys who originally 
wrote our interface are all perl guys and apparently the SOAP 
implementation in perl allows using the periods to make mapping the 
methods easier. If it were up to me I'd change it :) If we can find that 
it IS illegal then we'd have to of course. For what it is worth, AXIS 
java and all the MS tools do what I have made AXIS C++ do which is just 
pull the periods out when creating the stubs.

>>Anyway - why is the definition of xsd__string char* and not c++
>As you know Axis C++ can be used with either C or C++. Also Axis Engine
>needs to create and delete objects. So if we map xml string type to stl
>string we cannot support C clients and services.
Even though it would be more work it would be nice to have the C++ stubs 
use string and the C stubs use char*.

>WSDL2Ws tool generates the destructors for complex types that deletes
>its char* members for C++ classes. But for C code the user should take
>care of manually freeing the char* variables.
Are you sure about this? I have a complex type that has a bunch of 
strings (address data, etc) and the destructor does not delete any of 
the char*. Should we add code to delete the char*? If so we should also 
init the pointers to NULL.

Here is the destructor:

    /*delete any pointer and array members here*/
    delete [] 
    delete [] ((VindiciaSoapTransactionItem*)transaction_items.m_Array);

and here is the class declaration:

class VindiciaSoapTransactionBase
    float tx_amount;
    xsd__string tx_merchant_transaction_id;
    xsd__dateTime tx_timestamp;
    xsd__string tx_source_ip;
    xsd__string tx_user_email;
    xsd__string cc_hash;
    xsd__string cc_bin;
    xsd__string cc_last4;
    int cc_length;
    xsd__string cc_expiration_date;
    xsd__string cc_merchant_user_id;
    xsd__string cc_stated_type;
    xsd__string cc_cvv2;
    xsd__string cc_billing_name;
    xsd__string cc_billing_addr1;
    xsd__string cc_billing_addr2;
    xsd__string cc_billing_addr3;
    xsd__string cc_billing_city;
    xsd__string cc_billing_district;
    xsd__string cc_billing_postal_code;
    xsd__string cc_billing_country;
    xsd__string cc_billing_phone;
    xsd__string cc_billing_fax;
    xsd__string cc_bank_name;
    xsd__string cc_bank_phone;
    xsd__string cc_imprint;
    xsd__string cc_signature;
    xsd__string shipping_name;
    xsd__string shipping_addr1;
    xsd__string shipping_addr2;
    xsd__string shipping_addr3;
    xsd__string shipping_phone;
    xsd__string shipping_fax;
    xsd__string shipping_postal_code;
    xsd__string shipping_city;
    xsd__string shipping_district;
    xsd__string shipping_country;
    VindiciaSoapTransactionPersonalIdentifier_Array personal_identifiers;
    VindiciaSoapTransactionItem_Array transaction_items;


Mark Elrod
Vindicia, Inc.
2755 Campus Drive, Suite 240
San Mateo, California 94403

Cell:  650-483-5763
Work:  650-522-4484
Main:  650-522-4480
Fax:   650-522-4481

View raw message