You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by babloosony <ba...@gmail.com> on 2005/03/27 09:21:11 UTC

Doubt on java.util.HashMap schema definition and Java - .NET Interropability

Hi All,

Basically I am trying to represent java.util.HashMap as a schema
definition assuming it can contain only java.lang.String as key and
java.lang.String as value. Now I have 2 questions here :

1. Can anyone please tell me the difference between below 2 types of
code specifically what does <extension base="xsd:string"> mean really
?


code:
--------------------------------------------------------------------------------

<element name="hash-map">	<complexType>		<sequence>			<element
minOccurs="0" maxOccurs="unbounded"
name="entry">				<complexType>							<attribute name="key"
type="xsd:string"/>				</complexType>			</element>		</sequence>		<attribute
name="size" type="xsd:int"/>	</complexType></element>

--------------------------------------------------------------------------------



code:
--------------------------------------------------------------------------------

<element name="hash-map">	<complexType>		<sequence>			<element
minOccurs="0" maxOccurs="unbounded"
name="entry">				<complexType>					<simpleContent>						<extension
base="xsd:string">							<attribute name="key"
type="xsd:string"/>						</extension>					</simpleContent>				</complexType>			</element>		</sequence>		<attribute
name="size" type="xsd:int"/>	</complexType></element>

--------------------------------------------------------------------------------


2. Say my WSDL contains one of the above schema definitions for
java.util.HashMap, then why does a .NET client cannot consume such a
wsdl and why would there be any Java - .NET Interropability problems
as long as both client and server adhere to a schema contract such as
above for representing java.util.HashMap java collection class ?

Please suggest ...


Thanks & Regards,