See a similar question posted a year ago but no answer to that.
http://marc.theaimsgroup.com/?l=axis-c-dev&m=111992809528479&w=2

I am posting mine with more details to the problem.

I ran stub generations using Axis 1_3 for Java and C++, the Java stubs are
all perfect and the C++ are almost prefect except all the Emeration values
are gone.

Here are the input and output data.

Please let me know if there is a way to get around it.  Thanks.

============================================================
The wsdl looks like this
-----------------------------------------------------
<definitions>
  <message name="dummy">
    <part name="ScoreControlTests" type="vin:ScoreControlTests" />
  </message>
.
.
.
</definitions>
============================================================
The wsdl looks like this
-----------------------------------------------------
 <xsd:simpleType name="ScoreControlTests">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="firstTimeCardMerchant" />
      <xsd:enumeration value="firstTimeCardSku" />
      <xsd:enumeration value="firstTimeShippingAddressMerchant" />
      <xsd:enumeration value="firstTimeShippingAddressSku" />
      <xsd:enumeration value="firstTimeBillingAddressMerchant" />
      <xsd:enumeration value="firstTimeBillingAddressSku" />
      <xsd:enumeration value="firstTimeCardAffiliate" />
    </xsd:restriction>
  </xsd:simpleType>
============================================================
The Java looks good with the followings.  The enum values are showing.
-----------------------------------------------------
    public static final java.lang.String _firstTimeCardMerchant =
"firstTimeCardMerchant";
    public static final java.lang.String _firstTimeCardSku =
"firstTimeCardSku";
    public static final java.lang.String _firstTimeShippingAddressMerchant
= "firstTimeShippingAddressMerchant";
    public static final java.lang.String _firstTimeShippingAddressSku =
"firstTimeShippingAddressSku";
    public static final java.lang.String _firstTimeBillingAddressMerchant
= "firstTimeBillingAddressMerchant";
    public static final java.lang.String _firstTimeBillingAddressSku =
"firstTimeBillingAddressSku";
    public static final java.lang.String _firstTimeCardAffiliate =
"firstTimeCardAffiliate";

============================================================
The C++ header/body stub generated is like this.  All the enum values are
gone.  Looks like Axis thinks it is just an array declartion.  It is
un-usable by the Client program.

At the end, I am attaching the stub created by gSoap which shows the
enum values.
-----------------------------------------------------
ScoreControlTests.hpp
#if !defined(__SCORECONTROLTESTS_PARAM_H__INCLUDED_)
#define __SCORECONTROLTESTS_PARAM_H__INCLUDED_

#include <axis/AxisUserAPI.hpp>
#include <axis/AxisUserAPIArrays.hpp>
AXIS_CPP_NAMESPACE_USE

/*Local name and the URI for the type*/
static const char* Axis_URI_ScoreControlTests =
"http://soap.vindicia.com/Vindicia";;
static const char* Axis_TypeName_ScoreControlTests = "ScoreControlTests";

class ScoreControlTests
{
public:
        ScoreControlTests();
        void reset();
        virtual ~ScoreControlTests();
};

#endif /* !defined(__SCORECONTROLTESTS_PARAM_H__INCLUDED_)*/

-----------------------------------------------------
ScoreControlTests.cpp
#include "ScoreControlTests.hpp"
#include <axis/AxisWrapperAPI.hpp>
#include <axis/Axis.hpp>

/*
 * This static method serialize a ScoreControlTests type of object
 */
int Axis_Serialize_ScoreControlTests(ScoreControlTests* param,
IWrapperSoapSerializer* pSZ, bool bArray = false)
{
        }

/*
 * This static method deserialize a ScoreControlTests type of object
 */
int Axis_DeSerialize_ScoreControlTests(ScoreControlTests* param,
IWrapperSoapDeSerializer* pIWSDZ)
{
        }

void * Axis_Create_ScoreControlTests( ScoreControlTests * pObj, bool
bArray = false, int nSize = 0)
{
        if( bArray && (nSize > 0))
        {
                if( pObj)
                {
                        ScoreControlTests * pNew = new
ScoreControlTests[nSize];

                        size_t i = nSize / 2;

                        for( int ii = 0; ii < (int) i; ++ii)
                        {
                                pNew[ii] = pObj[ii];
                                pObj[ii].reset();
                        }

                        delete [] pObj;

                        return pNew;
                }
                else
                {
                        return new ScoreControlTests[nSize];
                }
        }
        else
        {
                return new ScoreControlTests;
        }
}

/*
 * This static method delete a ScoreControlTests type of object
 */
void Axis_Delete_ScoreControlTests(ScoreControlTests* param, bool bArray =
false, int nSize=0)
{
        if (bArray)
        {
                if (nSize > 0)
                {
                        for (int count = 0 ; count < nSize ; count++ )
                        {
                                if ( (( ScoreControlTests ** ) param)[count])
                                {
                                        delete (( ScoreControlTests ** )
param)[count];
                                        (( ScoreControlTests ** )
param)[count] = NULL;
                                }
                        }
                        delete [] ( ScoreControlTests ** ) param;
                }
        }
        else
        {
                delete param;
        }
        param = NULL;
}
/*
 * This static method gives the size of ScoreControlTests type of object
 */
int Axis_GetSize_ScoreControlTests()
{
        return sizeof(ScoreControlTests);
}

ScoreControlTests::ScoreControlTests()
{
         reset();
}

void ScoreControlTests::reset()
{
        /*do not allocate memory to any pointer members here
         because deserializer will allocate memory anyway. */
}

ScoreControlTests::~ScoreControlTests()
{
        /*delete any pointer and array members here*/
}




============================================================
In comparsion, here is what the gSoap generates
-----------------------------------------------------
/// "http://soap.vindicia.com/Vindicia":ScoreControlTests is a simpleType
restriction of xs:string.
/// Note: enum values are prefixed with 'ns1__ScoreControlTests' to avoid
name clashes, please use wsdl2h option -e to omit this prefix
enum ns1__ScoreControlTests
{
        ns1__ScoreControlTests__firstTimeCardMerchant,        ///< xs:string
value="firstTimeCardMerchant"
        ns1__ScoreControlTests__firstTimeCardSku,        ///< xs:string
value="firstTimeCardSku"
        ns1__ScoreControlTests__firstTimeShippingAddressMerchant,
///< xs:string
value="firstTimeShippingAddressMerchant"
        ns1__ScoreControlTests__firstTimeShippingAddressSku,        ///<
xs:string
value="firstTimeShippingAddressSku"
        ns1__ScoreControlTests__firstTimeBillingAddressMerchant,
///< xs:string
value="firstTimeBillingAddressMerchant"
        ns1__ScoreControlTests__firstTimeBillingAddressSku,        ///<
xs:string
value="firstTimeBillingAddressSku"
        ns1__ScoreControlTests__firstTimeCardAffiliate,        ///< xs:string
value="firstTimeCardAffiliate"
};

Reply via email to