axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa_abeysin...@yahoo.com>
Subject RE: [Including non existant headers]Skeletons and stubs are generating for inquire_v2.wsdl - Trying to fix [FYI]
Date Mon, 16 Aug 2004 04:30:23 GMT
This was not part of fixing 'operator' keyword problem, rhather fixing the handling of ANON_TOKEN
problem.

I used the same logic as Axis Java, assuming that to be correct.
Testing revealed prolems and I have reported them in
http://marc.theaimsgroup.com/?l=axis-c-dev&m=109228604029908&w=2


Nithya has reported that she has fixed it already.

Samisa...

--- susantha@opensource.lk wrote:

> Hi,
> 
> I am working on the below mentioned issue. But when I generated the code
> for InteropBase.wsdl I find the generated code is not correct. The
> generated code will compile run fine if both client and server are Axis
> C++. But not interoperable. Because the SOAP message do not correspond to
> the WSDL.
> 
> Following is the problem,
> 
> In
> 
> int Axis_Serialize_SOAPStruct(SOAPStruct* param, IWrapperSoapSerializer*
> pSZ, bool bArray = false) Function following 3 lines are generated in a
> wrong way.
> 
> 
> pSZ->serializeAsElement("SOAPStruct_varString",
> (void*)&(param->SOAPStruct_varString), XSD_STRING);
> pSZ->serializeAsElement("SOAPStruct_varInt",
> (void*)&(param->SOAPStruct_varInt), XSD_INT);
> pSZ->serializeAsElement("SOAPStruct_varFloat",
> (void*)&(param->SOAPStruct_varFloat), XSD_FLOAT);
> 
> In order to have correct SOAP message these should be,
> 
> pSZ->serializeAsElement("varString",
> (void*)&(param->SOAPStruct_varString), XSD_STRING);
> pSZ->serializeAsElement("varInt", (void*)&(param->SOAPStruct_varInt),
> XSD_INT);
> pSZ->serializeAsElement("varFloat", (void*)&(param->SOAPStruct_varFloat),
> XSD_FLOAT);
> 
> This is not a problem for RPC style wsdls. But for doc/lit this problem
> causes interoperability.
> 
> My guess is that this has been caused by the improvement of WSDL2Ws tool
> to handle the "operator" keyword recently.
> 
> Could the developer who did the changes look into this and correct this
> ASAP so that the 1.3 Alpha can have the corrections.
> 
> Thanks,
> 
> Susantha
> 
> > -----Original Message-----
> > From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
> > Sent: Thursday, August 12, 2004 1:26 PM
> > To: Apache AXIS C Developers List
> > Subject: RE: [Including non existant headers]Skeletons and stubs are
> > generating for inquire_v2.wsdl - Trying to fix [FYI]
> >
> > Cool!!! Thanks for helping Susantha.
> >
> > So I do not have to commit my *ugly* fix :-)
> >
> > Samisa...
> >
> >
> > --- Susantha Kumara <susantha@opensource.lk> wrote:
> >
> > > Hi Samisa,
> > >
> > > I see there are 2 problems you have come across.
> > >
> > > 1. Inclusion of non-existent headers + Refering to non-existent array
> > > types.	My opinion to solve this problem is to generate a typedef for
> > an
> > > array for each xsd:simpleType in the same place where a typedef for that
> > > simpleType is generated.
> > > 	Ex:
> > > 	<xsd:simpleType name="tModelKey">
> > > 		<xsd:restriction base="string"/>
> > > 	</xsd:simpleType>
> > >
> > > 	The generated tModelKey.h has
> > > 	typedef xsd__string tModelKey;
> > >
> > > 	we have to generate a typedef for an array in the next line so
> > > that tModelKey.h contain,
> > > 	typedef xsd__string tModelKey;
> > > 	typedef xsd__string_Array tModelKey_Array;
> > >
> > > 2. Types with no data members
> > > 	This is because
> > > 	a. The complexTypes with xsd:simpleContent is not supported
> > > correctly.
> > > 	b. The WSDL2Ws tool does not understand the reserved prefix
> > > 'xml' and the types defined in xml namespace
> > > (http://www.w3.org/XML/1998/namespace.html)
> > >
> > > 	Ex1: See following complexType
> > >
> > > 	<xsd:complexType name="email">
> > > 		<xsd:simpleContent>
> > > 			<xsd:extension base="string">
> > > 				<xsd:attribute name="useType"
> > > type="string" use="optional"/>
> > > 			</xsd:extension>
> > > 		</xsd:simpleContent>
> > > 	</xsd:complexType>
> > >
> > > But email.h created is ,
> > >
> > > class email
> > > {
> > > public:
> > > 	xsd__string useType;
> > > 	email();
> > > 	~email();
> > > };
> > >
> > > But this should be,
> > >
> > > class email
> > > {
> > > public:
> > > 	xsd__string _email;
> > > 	xsd__string useType;
> > > 	email();
> > > 	~email();
> > > };
> > >
> > > 	Ex2: If we see the complexType
> > >
> > > 	<xsd:complexType name="name">
> > > 		<xsd:simpleContent>
> > > 			<xsd:extension base="string">
> > > 				<xsd:attribute ref="xml:lang"
> > > use="optional"/>
> > > 			</xsd:extension>
> > > 		</xsd:simpleContent>
> > > 	</xsd:complexType>
> > >
> > > The generated type looks
> > >
> > > class name
> > > {
> > > public:
> > > 	name();
> > > 	~name();
> > > };
> > >
> > > but should be like,
> > >
> > > class name
> > > {
> > > public:
> > > 	xsd__string _name;
> > > 	name();
> > > 	~name();
> > > };
> > >
> > > So I am having a look at the WSDL2Ws code and try to fix it ASAP.
> > >
> > > Susantha,
> > >
> > > > -----Original Message-----
> > > > From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
> > > > Sent: Thursday, August 12, 2004 7:21 AM
> > > > To: Apache AXIS C Developers List
> > > > Subject: Re: [Including non existant headers]Skeletons and stubs are
> > > > generating for inquire_v2.wsdl
> > > >
> > > > Does anyone have any thoughts on this? Please...
> > > > Samisa...
> > > >
> > > > --- Samisa Abeysinghe <samisa_abeysinghe@yahoo.com> wrote:
> > > >
> > > > > Hi All,
> > > > >     I managed to fix the inclusion of non existant problem with a
> > > *very*
> > > > ugly fix :-(
> > > > >
> > > > >     What I did was to generate a dummy header file so that the
> > > compiler
> > > > would not complain.
> > > > >     The real fix would have been to remove the inclution of a header
> > > > that reffers to an array of
> > > > > simple type. However, because the tool already generate some headers
> > > for
> > > > simple types and
> > > > > include
> > > > > them here and there, it is time consuming to remove it all together
> > > (I
> > > > infact tried removing
> > > > > referances to invalid headers, in the process ran into more
> > > problems)
> > > > >     The tool already generates some dummy headers when the type is
> > > > string (this is without my
> > > > > fix). (And you get classes with no data members)
> > > > >
> > > > > e.g.
> > > > > description.h had:
> > > > > class description
> > > > > {
> > > > > public:
> > > > >         description();
> > > > >         ~description();
> > > > > };
> 
=== message truncated ===



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

Mime
View raw message