Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComplexType - renaming attribute causes loss of name

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
Sorry, its hard to write a 1liner to say the problem is. I do not think it is a visual studio problem, but if you think it is, please just confirm my assumptions at the bottom, thanks

Code:
   <complexType name="ArrayOf_xsd_String">
    <complexContent>
     <restriction base="soapenc:Array"> <!-- the problem is with this attribute -->
      <attribute type="soapenc:arrayType" wsdl:arrayType="string[]"/>
     </restriction>
    </complexContent>
   </complexType>

when I try to use a wsdl in visual studio that has the above fragment in it, I get an error stating that attribute ??? must have a name

When I add a name to the attribute, I get a message claiming that datatype Array is missing

1) With no name="" in the attribute, my application is happy, so why does assigning a name to the attribute cause the type, which is defined in the restrictionbase to disappear?

2) Is it legal to have a name to an attribute inside a complex type?

Ive been rattling this round for over a day now, and have slowly got the problem down to this block, so if anyone can help Id really appreciate it.

Regards
K
 
Its ok, I fixed the problem, I was just trying to understand why a name token on the attribute messed things up.

Solution was simple, our services programmer copied an example down wrong of the net, and so where he had attribute type="" it neede to be ref=""

Thanks anyway,

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top