axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ias" <>
Subject RE: For Help: how to improve axis then it could solve the problem of " element and attribute are the same name"
Date Wed, 07 Jan 2004 07:16:17 GMT
Currently, JAX-RPC 1.1 spec doesn't mention about a possible collision
between a nested element name and an attribute name within a type. Could you
provide your sample WSDL for more testings on other WSDL processors such as
Sun's RI? Perhaps we need to make some policy on how to handle the
collision, for example, showing an appropriate error message. 

In addition, I'd like to share this short note from JAXB 1.0 spec with you:

Good schema-design practices also make collisions less likely. When writing
a schema it is inadvisable to use, in identical roles, names the are
distinguished only by punctuation or case. Suppose a schema declares two
attributes of a single element type, one named Foo and the other named foo.
Their generated access methods, namely getFoo and setFoo, will collide. This
situation would best be handled by revising the source schema, which would
not only eliminate the collision but also improve the readability of the
source schema and documents that use it.

At last, if you're walking with J2EE 1.4, you can utilize JAX-RPC mapping in
order to resolve this trouble. See JSR 109 proposal at . Web services
for J2EE is now at an early stage, so you may have to make considerable
amount of efforts to make the technology your own in terms of both
understanding and implementing it. Enterprise Web Services project for Axis
and Geronimo is wide open, and I'm looking forward to its progress supported
by many users.



	From: xuliujuan [] 
	Sent: Wednesday, January 07, 2004 2:52 PM
	To:; yin zhi jun
	Subject: For Help: how to improve axis then it could solve the
problem of " element and attribute are the same name"
	 Hi ,
	    When the element and attribute have the same name,the axis
generates wrong code. That is to say Axis could not be able to distinguish
the element and attrubute when their name are same. Axis just generate the
same codes for them. eg.
	private axis.TypeOfNetworkType networkType;
	private axis.TypeOfNetworkType networkType; // attribute
	That will cause a lot of error. 
	   Could you tell me how to improve it?
	 There is an xsd example :
	<xs:element name="Administrator"
	<xs:element name="uid" type="xs:string"/>
	<xs:attribute name="uid" type="xs:string" use="required"/>
	  Any hints? Thank you very much in advance.
	Best wishes.

View raw message