You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Susantha Kumara <su...@opensource.lk> on 2004/08/12 09:10:12 UTC

RE: [Including non existant headers]Skeletons and stubs are generating for inquire_v2.wsdl - Trying to fix [FYI]

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 <sa...@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();
> > };
> > description_Array.h had:
> > typedef struct description_ArrayTag
> > {
> >         description* m_Array;
> >         int m_Size;
> > } description_Array;
> >
> > The tModelKey. had:
> > typedef xsd__string tModelKey;
> >
> > Those were being generated prior to the hack.
> >
> > So I generated:
> > typedef struct tModelKey_ArrayTag
> > {
> >         xsd__string* m_Array;
> >         int m_Size;
> > } tModelKey_Array;
> >
> > This make the header file problem go away. However, as this is not
the
> correct way to fix it, I
> > did not commit it.
> >
> > Fixing this properly would mean to restructure/refactor the tool
which
> would take up some time.
> > Hence if the community is OK with this fix for the time being I
could
> commit it, so that those
> > who
> > are interested could try out complex WSDL files such as this UDDI
WSDL.
> > (because there could be other unseen problems that could be revealed
> once we actually run the
> > client/service and test. Up to now I was stuck with code generation
and
> compilation.)
> >
> > Any thoughts? Please...
> >
> > Thanks,
> > Samisa...
> >
> > --- Samisa Abeysinghe <sa...@yahoo.com> wrote:
> >
> > > Hi All,
> > >    In the ClientStubWriter class of the WDL2Ws tool I see a
funtion
> named 'itoa' being hard
> > > coded.
> > >
> > >
>
src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java:
29
> 3:
> >
> > >
> > >              writer.write("\t\titoa( Value"+i+", buffer, 10);\n");
> > >
> > >    Please note that there is no 'itoa' on Linux/Unix platforms
(onlt
> atoi is there).
> > >
> > >    Can someone help fix this please.
> > > Regards,
> > > Samisa...
> > >
> > > --- Samisa Abeysinghe <sa...@yahoo.com> wrote:
> > >
> > > > Hi All,
> > > >     While trying to compile the generated code for the UDDI WSDL
> file (inquire_v2.wsdl) I
> > got
> > > > into
> > > > trouble with the tool generating code with 'operator' keyword.
> > > >
> > > >     I fixed this and also inclided the code to handle ANON_TOKEN
> similar to the way it is
> > > > handled
> > > > in Axis Java code. (in
org/apache/axis/wsdl/wsdl2ws/info/Type.java
> file)
> > > >
> > > >    This made many problems go away with this WSDL file.
> > > >    However I still get problems related to the inclusion of non
> existant files. (see below)
> > > >
> > > > Thanks,
> > > > Samisa...
> > > >
> > > >
> > > > Inquire.h:31:29: tModelKey_Array.h: No such file or directory
> > > > Inquire.h:52:30: serviceKey_Array.h: No such file or directory
> > > > Inquire.h:68:33: findQualifier_Array.h: No such file or
directory
> > > > Inquire.h:74:31: businessKey_Array.h: No such file or directory
> > > > Inquire.h:76:30: bindingKey_Array.h: No such file or directory
> > > > Inquire.h:94:34: uploadRegister_Array.h: No such file or
directory
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Read only the mail you want - Yahoo! Mail SpamGuard.
> > > > http://promotions.yahoo.com/new_mail
> > > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > New and Improved Yahoo! Mail - Send 10MB messages!
> > > http://promotions.yahoo.com/new_mail
> > >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - Send 10MB messages!
> > http://promotions.yahoo.com/new_mail
> >
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail


RE: [Including non existant headers]Skeletons and stubs are generating for inquire_v2.wsdl - Trying to fix [FYI]

Posted by Samisa Abeysinghe <sa...@yahoo.com>.
Cool!!! Thanks for helping Susantha.

So I do not have to commit my *ugly* fix :-)

Samisa...


--- Susantha Kumara <su...@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 <sa...@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();
> > > };
> > > description_Array.h had:
> > > typedef struct description_ArrayTag
> > > {
> > >         description* m_Array;
> > >         int m_Size;
> > > } description_Array;
> > >
> > > The tModelKey. had:
> > > typedef xsd__string tModelKey;
> > >
> > > Those were being generated prior to the hack.
> > >
> > > So I generated:
> > > typedef struct tModelKey_ArrayTag
> > > {
> > >         xsd__string* m_Array;
> > >         int m_Size;
> > > } tModelKey_Array;
> > >
> > > This make the header file problem go away. However, as this is not
> the
> > correct way to fix it, I
> > > did not commit it.
> > >
> > > Fixing this properly would mean to restructure/refactor the tool
> which
> > would take up some time.
> > > Hence if the community is OK with this fix for the time being I
> could
> > commit it, so that those
> > > who
> > > are interested could try out complex WSDL files such as this UDDI
> WSDL.
> > > (because there could be other unseen problems that could be revealed
> > once we actually run the
> > > client/service and test. Up to now I was stuck with code generation
> and
> > compilation.)
> > >
> > > Any thoughts? Please...
> > >
> > > Thanks,
> > > Samisa...
> > >
> > > --- Samisa Abeysinghe <sa...@yahoo.com> wrote:
> > >
> > > > Hi All,
> > > >    In the ClientStubWriter class of the WDL2Ws tool I see a
> funtion
> > named 'itoa' being hard
> > > > coded.
> > > >
> > > >
> >
> src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java:
> 29
> > 3:
> > >
> > > >
> > > >              writer.write("\t\titoa( Value"+i+", buffer, 10);\n");
> > > >
> > > >    Please note that there is no 'itoa' on Linux/Unix platforms
> (onlt
> 
=== message truncated ===



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail