axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Yves Baudy <jy.ba...@free.fr>
Subject RE: Enumeration for DOC/LIT
Date Wed, 25 Feb 2004 10:07:32 GMT
Hi all,

Since my last mail I made some progress on enumeration. Simple types 
work so no need to invest on it. Sorry for my previous mail when I say 
enumeration first.

So for enumeration I propose to generate the header only with a fixed 
value variable. I'm still asking the question about a class or a struct 
(like arrays). The choice to generate header only is to limit the number 
of files generated. I have a wsdl test file which produces 300 files 
very good test cases.

Here the header:

class TypeInt
{
public:
	int value;
	TypeInt(){}
	~TypeInt(){}
};

When the enumeration need to be serializated here the call:

/* first serialize attributes if any*/
if (0 != param->att_enum_int->value)
	pSZ->SerializeAsAttribute("att_enum_int", 0,
		(void*)&(param->att_enum_int->value), XSD_INT);
else
	{/*TODO : error management*/}

The code if for a required attribute. I think that Axis C/C++ will need 
some error management (better than segfault).

When the enum need to be deserializated here the call:

param->att_enum_int->value = IWSDZ->GetAttributeAsInt("att_enum_int",0);


Included sample of generated code (with wsdl file). It might not work 
with the CVS Code as I have some pending changes. The process to become 
a committer is in standby for me :-(.


Regards,

Jean-Yves

 >Hi Susantha,
 >
 >Before looking on a way to implements simple type enumeration I will
 >wait for the integration of my previous patches. I have also some new
 >additions locally but I prefer wait before committing as the merging
 >process could failed.
 >
 >Additions concern:
 >
 >- Collection parameter in service operation (root element). May be a
 >dirty implementation as I focus my contribution in the whole part of >the
 >C/C++ client stack and I haven't enough time to go deeply in the code.
 >
 >- Some minors fixes (runtime/generation)
 >
 >This week I will also work on the C generation. And make a proposal for
 >implementing simpleType (enumeration first).
 >
 >Regards,
 >
 >Jean-Yves



Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message