Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Attribute in ComplexType
Attribute in ComplexType [message #595905] Thu, 30 June 2005 14:34
Eclipse UserFriend
Originally posted by: sa840.soi.city.ac.uk

This is a multi-part message in MIME format.

------=_NextPart_000_013D_01C57D91.9027BB20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,
Hi Ed, before you tell me to read before post something: I have read =
carefully the latest posts, and I haven't found an appropriate suitable =
way describing what I wanna do ;-) . So, I have some simple thing like =
this:

<complexType name=3D"ArrayOf_tns2_InputAddress">
<complexContent>
<restriction base=3D"soapenc:Array">
<attribute ref=3D"soapenc:arrayType" =
wsdl:arrayType=3D"tns2:InputAddress[]"/>
</restriction>
</complexContent>

I'm trying to extract the value of "wsdl:arrayType" using something like =
this:

EList attributeList =3D complexDefinition.getAttributeContents()
for(Iterator attIterator=3D =
attributeList.iterator();attIterator.hasNext();)
{
XSDAttributeUse attribute =3D (XSDAttributeUse) =
attIterator.next();
String cad =3D =
attribute.getElement().getAttribute("wsdl:arrayType");
}

BUT, I guess there must be one more "elegant" way to do it. Please, =
could someone light my way? :-D
Thanks a lot in advance

--=20
__________________________________________

Francisco Sanchez Cid, Research Assistant
Department of Computing
City University
Northampton Square, London, EC1V 0HB
e-mail: F.Sanchez-Cid@soi.city.ac.uk
T (+44) 020 7040 4042
F (+44) 020 7040 0244
__________________________________________
------=_NextPart_000_013D_01C57D91.9027BB20
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2668" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Hi Ed, before you tell me to read =
before post=20
something: I have read carefully the latest posts, and I haven't found=20
an&nbsp;appropriate&nbsp;suitable way describing what I wanna do ;-) . =
So,&nbsp;=20
I have some simple thing like this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<P><FONT face=3DArial color=3D#0000ff size=3D2>&lt;complexType=20
name=3D"ArrayOf_tns2_InputAddress"&gt;<BR>&nbsp;&nbsp;&nbsp;=20
&lt;complexContent&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;restriction=20
base=3D"soapenc:Array"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;attribute=20
ref=3D"soapenc:arrayType"=20
wsdl:arrayType=3D"tns2:InputAddress[]"/&gt;<BR>&nbsp;&nbsp;&nbsp;=20
&lt;/restriction&gt;<BR>&lt;/complexContent&gt; </FONT></P>
<P><FONT color=3D#0000ff><FONT face=3DArial color=3D#000000 size=3D2>I'm =
trying to=20
extract the value of "wsdl:arrayType" using something like=20
this:</FONT></P></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>EList attributeList =3D=20
complexDefinition.getAttributeContents()</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;for(Iterator =
attIterator=3D=20
attributeList.iterator();attIterator.hasNext();)<BR>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
&nbsp;{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; =

XSDAttributeUse attribute =3D (XSDAttributeUse)=20
attIterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;=20
String cad =3D =
attribute.getElement().getAttribute("wsdl:arrayType");</FONT ></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>BUT, I guess there must be one more =
"elegant" way=20
to do it. Please, could someone light my way? :-D</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks a lot in advance</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>--=20
<BR>__________________________________________</FONT></DIV >
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Francisco Sanchez Cid, Research=20
Assistant<BR>Department of Computing<BR>City University<BR>Northampton =
Square,=20
London, EC1V 0HB<BR>e-mail: </FONT><A=20
href=3D"mailto:F.Sanchez-Cid@soi.city.ac.uk"><FONT face=3DArial=20
size=3D2>F.Sanchez-Cid@soi.city.ac.uk</FONT></A><BR><FONT face=3DArial =
size=3D2>T=20
(+44) 020 7040 4042<BR>F (+44) 020 7040=20
0244<BR>__________________________________________</FONT> </DIV></BODY></H=
TML>

------=_NextPart_000_013D_01C57D91.9027BB20--
Previous Topic:ComplexType: Obtain elements of a sequence
Next Topic:Attribute in ComplexType
Goto Forum:
  


Current Time: Sat Apr 27 03:36:47 GMT 2024

Powered by FUDForum. Page generated in 0.03442 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top