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 #62164] Thu, 30 June 2005 14:34 Go to next message
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--
Re: Attribute in ComplexType [message #62189 is a reply to message #62164] Thu, 30 June 2005 15:51 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------070304090408010305070803
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Fran,

I hope I wasn't rude in my previous answer. It's so much working
answering so many questions here and in the EMF newsgroup...

This is pretty near is as good as it gets, although it would seem much
better to use getAttributeNS using the "wsdl" namespace so that you
aren't depending on a particular prefix being used by the instance.


Fran wrote:

> 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="ArrayOf_tns2_InputAddress">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType"
> wsdl:arrayType="tns2:InputAddress[]"/>
> </restriction>
> </complexContent>
>
> I'm trying to extract the value of "wsdl:arrayType" using something
> like this:
>
> EList attributeList = complexDefinition.getAttributeContents()
> for(Iterator attIterator=
> attributeList.iterator();attIterator.hasNext();)
> {
> XSDAttributeUse attribute = (XSDAttributeUse)
> attIterator.next();
> String cad =
> 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
>
> --
> __________________________________________
>
> Francisco Sanchez Cid, Research Assistant
> Department of Computing
> City University
> Northampton Square, London, EC1V 0HB
> e-mail: F.Sanchez-Cid@soi.city.ac.uk <mailto:F.Sanchez-Cid@soi.city.ac.uk>
> T (+44) 020 7040 4042
> F (+44) 020 7040 0244
> __________________________________________



--------------070304090408010305070803
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Fran,<br>
<br>
I hope I wasn't rude in my previous answer.&nbsp; It's so much working
answering so many questions here and in the EMF newsgroup...<br>
<br>
This is pretty near is as good as it gets, although it would seem much
better to use getAttributeNS using the "wsdl" namespace so that you
aren't depending on a particular prefix being used by the instance.<br>
<br>
<br>
Fran wrote:
<blockquote cite="midda13ds$uma$1@news.eclipse.org" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.2668" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">Hi all,</font></div>
<div><font face="Arial" size="2">Hi Ed, before you tell me to read
before post something: I have read carefully the latest posts, and I
haven't found an&nbsp;appropriate&nbsp;suitable way describing what I wanna do
;-) . So,&nbsp; I have some simple thing like this:</font></div>
<div>&nbsp;</div>
<div>
<p><font color="#0000ff" face="Arial" size="2">&lt;complexType
name="ArrayOf_tns2_InputAddress"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;complexContent&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;restriction base="soapenc:Array"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;attribute ref="soapenc:arrayType"
wsdl:arrayType="tns2:InputAddress[]"/&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/restriction&gt;<br>
&lt;/complexContent&gt;</font></p>
<p><font color="#0000ff"><font color="#000000" face="Arial" size="2">I'm
trying to extract the value of "wsdl:arrayType" using something like
this:</font></font></p>
</div>
<div><font face="Arial" size="2">EList attributeList =
complexDefinition.getAttributeContents()</font></div>
<div><font face="Arial" size="2"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;for(Iterator attIterator=
attributeList.iterator();attIterator.hasNext();)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; XSDAttributeUse attribute = (XSDAttributeUse)
attIterator.next();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String cad =
attribute.getElement().getAttribute("wsdl:arrayType");</font ></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">BUT, I guess there must be one more
"elegant" way to do it. Please, could someone light my way? :-D</font></div>
<div><font face="Arial" size="2">Thanks a lot in advance</font></div>
<div><br>
<font face="Arial" size="2">-- <br>
__________________________________________</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Francisco Sanchez Cid, Research
Assistant<br>
Department of Computing<br>
City University<br>
Northampton Square, London, EC1V 0HB<br>
e-mail: </font><a href="mailto:F.Sanchez-Cid@soi.city.ac.uk"><font
face="Arial" size="2">F.Sanchez-Cid@soi.city.ac.uk</font></a><br>
<font face="Arial" size="2">T (+44) 020 7040 4042<br>
F (+44) 020 7040 0244<br>
__________________________________________</font></div>
</blockquote>
<br>
</body>
</html>

--------------070304090408010305070803--
Re: Attribute in ComplexType [message #62213 is a reply to message #62189] Thu, 30 June 2005 15:18 Go to previous message
Eclipse UserFriend
Originally posted by: sa840.soi.city.ac.uk

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C57D97.BE9337E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello Ed,
You wasn't rude with me, don't worry about it ;-)=20
I also understand it is a heavy work and (believe me) I really =
appreciate it. Sometimes is difficult to start using a new library =
(that's my case) and it's a very good thing to have someone like you to =
help us. Reading the posts of the newsgroup, anyone can notice you are =
making a real good job. So,
thank you very much for your help
Regards,
Fran
--=20

"Ed Merks" <merks@ca.ibm.com> escribi=F3 en el mensaje =
news:da14e2$g6$1@news.eclipse.org...
Fran,

I hope I wasn't rude in my previous answer. It's so much working =
answering so many questions here and in the EMF newsgroup...

This is pretty near is as good as it gets, although it would seem much =
better to use getAttributeNS using the "wsdl" namespace so that you =
aren't depending on a particular prefix being used by the instance.


Fran wrote:=20
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_000C_01C57D97.BE9337E0
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=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2900.2668" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello Ed,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>You wasn't rude with me, don't worry =
about=20
it&nbsp;;-) </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I also understand it is a heavy work =
and (believe=20
me) I really appreciate it. Sometimes is difficult to start using a new =
library=20
(that's my case) and it's a very good thing to have someone like you to =
help us.=20
Reading the posts of the newsgroup, anyone can notice you are making a =
real good=20
job. So,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>thank you very much for your =
help</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Fran</FONT><BR>-- <BR></DIV>
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
escribi=F3 en el mensaje <A=20
href=3D"news:da14e2$g6$1@news.eclipse.org">news:da14e2$g6$1@news.eclipse.=
org</A>...</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">Fran,<BR><BR>I=20
hope I wasn't rude in my previous answer.&nbsp; It's so much working =
answering=20
so many questions here and in the EMF newsgroup...<BR><BR>This is =
pretty near=20
is as good as it gets, although it would seem much better to use=20
getAttributeNS using the "wsdl" namespace so that you aren't depending =
on a=20
particular prefix being used by the instance.<BR><BR><BR>Fran wrote:=20
<BLOCKQUOTE cite=3Dmidda13ds$uma$1@news.eclipse.org type=3D"cite">
<META content=3D"MSHTML 6.00.2900.2668" name=3DGENERATOR>
<STYLE></STYLE>

<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 ;-) =
..=20
So,&nbsp; I have some simple thing like this:</FONT></DIV>
<DIV>&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></FONT></P></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;=20
XSDAttributeUse attribute =3D (XSDAttributeUse)=20
=
attIterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;=20
String cad =3D=20
attribute.getElement().getAttribute("wsdl:arrayType");</FONT ></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>BUT, I guess there must be one more =
"elegant"=20
way 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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Francisco Sanchez Cid, Research=20
Assistant<BR>Department of Computing<BR>City =
University<BR>Northampton=20
Square, 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></BLOCKQUO=
TE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000C_01C57D97.BE9337E0--
Re: Attribute in ComplexType [message #595917 is a reply to message #62164] Thu, 30 June 2005 15:51 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070304090408010305070803
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Fran,

I hope I wasn't rude in my previous answer. It's so much working
answering so many questions here and in the EMF newsgroup...

This is pretty near is as good as it gets, although it would seem much
better to use getAttributeNS using the "wsdl" namespace so that you
aren't depending on a particular prefix being used by the instance.


Fran wrote:

> 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="ArrayOf_tns2_InputAddress">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType"
> wsdl:arrayType="tns2:InputAddress[]"/>
> </restriction>
> </complexContent>
>
> I'm trying to extract the value of "wsdl:arrayType" using something
> like this:
>
> EList attributeList = complexDefinition.getAttributeContents()
> for(Iterator attIterator=
> attributeList.iterator();attIterator.hasNext();)
> {
> XSDAttributeUse attribute = (XSDAttributeUse)
> attIterator.next();
> String cad =
> 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
>
> --
> __________________________________________
>
> Francisco Sanchez Cid, Research Assistant
> Department of Computing
> City University
> Northampton Square, London, EC1V 0HB
> e-mail: F.Sanchez-Cid@soi.city.ac.uk <mailto:F.Sanchez-Cid@soi.city.ac.uk>
> T (+44) 020 7040 4042
> F (+44) 020 7040 0244
> __________________________________________



--------------070304090408010305070803
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Fran,<br>
<br>
I hope I wasn't rude in my previous answer.&nbsp; It's so much working
answering so many questions here and in the EMF newsgroup...<br>
<br>
This is pretty near is as good as it gets, although it would seem much
better to use getAttributeNS using the "wsdl" namespace so that you
aren't depending on a particular prefix being used by the instance.<br>
<br>
<br>
Fran wrote:
<blockquote cite="midda13ds$uma$1@news.eclipse.org" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.2668" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">Hi all,</font></div>
<div><font face="Arial" size="2">Hi Ed, before you tell me to read
before post something: I have read carefully the latest posts, and I
haven't found an&nbsp;appropriate&nbsp;suitable way describing what I wanna do
;-) . So,&nbsp; I have some simple thing like this:</font></div>
<div>&nbsp;</div>
<div>
<p><font color="#0000ff" face="Arial" size="2">&lt;complexType
name="ArrayOf_tns2_InputAddress"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;complexContent&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;restriction base="soapenc:Array"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;attribute ref="soapenc:arrayType"
wsdl:arrayType="tns2:InputAddress[]"/&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/restriction&gt;<br>
&lt;/complexContent&gt;</font></p>
<p><font color="#0000ff"><font color="#000000" face="Arial" size="2">I'm
trying to extract the value of "wsdl:arrayType" using something like
this:</font></font></p>
</div>
<div><font face="Arial" size="2">EList attributeList =
complexDefinition.getAttributeContents()</font></div>
<div><font face="Arial" size="2"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;for(Iterator attIterator=
attributeList.iterator();attIterator.hasNext();)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; XSDAttributeUse attribute = (XSDAttributeUse)
attIterator.next();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String cad =
attribute.getElement().getAttribute("wsdl:arrayType");</font ></div>
<div><font face="Arial" size="2">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">BUT, I guess there must be one more
"elegant" way to do it. Please, could someone light my way? :-D</font></div>
<div><font face="Arial" size="2">Thanks a lot in advance</font></div>
<div><br>
<font face="Arial" size="2">-- <br>
__________________________________________</font></div>
<div>&nbsp;</div>
<div><font face="Arial" size="2">Francisco Sanchez Cid, Research
Assistant<br>
Department of Computing<br>
City University<br>
Northampton Square, London, EC1V 0HB<br>
e-mail: </font><a href="mailto:F.Sanchez-Cid@soi.city.ac.uk"><font
face="Arial" size="2">F.Sanchez-Cid@soi.city.ac.uk</font></a><br>
<font face="Arial" size="2">T (+44) 020 7040 4042<br>
F (+44) 020 7040 0244<br>
__________________________________________</font></div>
</blockquote>
<br>
</body>
</html>

--------------070304090408010305070803--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Attribute in ComplexType [message #595928 is a reply to message #62189] Thu, 30 June 2005 15:18 Go to previous message
Eclipse UserFriend
Originally posted by: sa840.soi.city.ac.uk

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C57D97.BE9337E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello Ed,
You wasn't rude with me, don't worry about it ;-)=20
I also understand it is a heavy work and (believe me) I really =
appreciate it. Sometimes is difficult to start using a new library =
(that's my case) and it's a very good thing to have someone like you to =
help us. Reading the posts of the newsgroup, anyone can notice you are =
making a real good job. So,
thank you very much for your help
Regards,
Fran
--=20

"Ed Merks" <merks@ca.ibm.com> escribi=F3 en el mensaje =
news:da14e2$g6$1@news.eclipse.org...
Fran,

I hope I wasn't rude in my previous answer. It's so much working =
answering so many questions here and in the EMF newsgroup...

This is pretty near is as good as it gets, although it would seem much =
better to use getAttributeNS using the "wsdl" namespace so that you =
aren't depending on a particular prefix being used by the instance.


Fran wrote:=20
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_000C_01C57D97.BE9337E0
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=3Dtext/html;charset=3DISO-8859-1>
<META content=3D"MSHTML 6.00.2900.2668" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello Ed,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>You wasn't rude with me, don't worry =
about=20
it&nbsp;;-) </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I also understand it is a heavy work =
and (believe=20
me) I really appreciate it. Sometimes is difficult to start using a new =
library=20
(that's my case) and it's a very good thing to have someone like you to =
help us.=20
Reading the posts of the newsgroup, anyone can notice you are making a =
real good=20
job. So,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>thank you very much for your =
help</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Fran</FONT><BR>-- <BR></DIV>
<DIV>"Ed Merks" &lt;<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>&gt;=20
escribi=F3 en el mensaje <A=20
href=3D"news:da14e2$g6$1@news.eclipse.org">news:da14e2$g6$1@news.eclipse.=
org</A>...</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">Fran,<BR><BR>I=20
hope I wasn't rude in my previous answer.&nbsp; It's so much working =
answering=20
so many questions here and in the EMF newsgroup...<BR><BR>This is =
pretty near=20
is as good as it gets, although it would seem much better to use=20
getAttributeNS using the "wsdl" namespace so that you aren't depending =
on a=20
particular prefix being used by the instance.<BR><BR><BR>Fran wrote:=20
<BLOCKQUOTE cite=3Dmidda13ds$uma$1@news.eclipse.org type=3D"cite">
<META content=3D"MSHTML 6.00.2900.2668" name=3DGENERATOR>
<STYLE></STYLE>

<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 ;-) =
..=20
So,&nbsp; I have some simple thing like this:</FONT></DIV>
<DIV>&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></FONT></P></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;=20
XSDAttributeUse attribute =3D (XSDAttributeUse)=20
=
attIterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;=20
String cad =3D=20
attribute.getElement().getAttribute("wsdl:arrayType");</FONT ></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>BUT, I guess there must be one more =
"elegant"=20
way 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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Francisco Sanchez Cid, Research=20
Assistant<BR>Department of Computing<BR>City =
University<BR>Northampton=20
Square, 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></BLOCKQUO=
TE><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000C_01C57D97.BE9337E0--
Previous Topic:Attribute in ComplexType
Next Topic:XSDDiagnostic
Goto Forum:
  


Current Time: Tue Apr 16 07:02:35 GMT 2024

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

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

Back to the top