473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

xml schema in wsdl

Hello All,
I have a schema ( XSD) as follows.
- <xs:complexType name="Tzp3wsXSPOP3MessageArray">
- <xs:complexContent>
- <xs:restriction base="soapenc:Array">
<xs:sequence />
<xs:attribute ref="soapenc:arrayType"
n1:arrayType="ns1:Tzp3wsXSPOP3Message[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="Tzp3wsXSPOP3Message">
- <xs:sequence>
<xs:element name="Body" type="xs:string" />
<xs:element name="Date" type="xs:dateTime" />
<xs:element name="From" type="xs:string" />
<xs:element name="Size" type="xs:int" />
<xs:element name="Subject" type="xs:string" />
<xs:element name="UID" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>

I get the complextype name as Tzp3wsXSPOP3MessageArray,
now I need to go to the attribute ref element annd get the
array type as "Tzp3wsXSPOP3Message[]".
The problem is how do I get to <xs:attribute ref> element
since I dont find any property in XmlSchemaSequence class
that gets me there. The "items" property is null in the
above given case.Am I missing anything?
Once i get the array I need to go to that particular type
i.e "Tzp3wsXSPOP3Message" and expand it.
The above schema is a part of a WSDL file.
Iam using C# on .NET.

Thanks for your time.
Regards
Suresh
Nov 11 '05 #1
1 2592
You won't be able to get to the attribute definition from the sequence since
attributes are contained in complexTypes. From a complexType you can easily
get to the attribute definitions though using code such as:

//Iterate through attribute definitions within complexType
foreach (XmlSchemaObject attribute in complexType.Attributes) {
XmlSchemaAttribute att = (XmlSchemaAttribute)attribute;
//work with att here
}

You'd of course need to write code to track down the attribute reference to
get more details. I posted a more complete example that should help get you
started at the following URL if you're interested:

http://www.xmlforasp.net/codeSection.aspx?csID=78

Dan Wahlin

Wahlin Consulting
Microsoft MVP - ASP.NET and XML Web Services
http://www.xmlforasp.net
"Suresh" <su**********@hotmail.com> wrote in message
news:06****************************@phx.gbl...
Hello All,
I have a schema ( XSD) as follows.
- <xs:complexType name="Tzp3wsXSPOP3MessageArray">
- <xs:complexContent>
- <xs:restriction base="soapenc:Array">
<xs:sequence />
<xs:attribute ref="soapenc:arrayType"
n1:arrayType="ns1:Tzp3wsXSPOP3Message[]"
xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="Tzp3wsXSPOP3Message">
- <xs:sequence>
<xs:element name="Body" type="xs:string" />
<xs:element name="Date" type="xs:dateTime" />
<xs:element name="From" type="xs:string" />
<xs:element name="Size" type="xs:int" />
<xs:element name="Subject" type="xs:string" />
<xs:element name="UID" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>

I get the complextype name as Tzp3wsXSPOP3MessageArray,
now I need to go to the attribute ref element annd get the
array type as "Tzp3wsXSPOP3Message[]".
The problem is how do I get to <xs:attribute ref> element
since I dont find any property in XmlSchemaSequence class
that gets me there. The "items" property is null in the
above given case.Am I missing anything?
Once i get the array I need to go to that particular type
i.e "Tzp3wsXSPOP3Message" and expand it.
The above schema is a part of a WSDL file.
Iam using C# on .NET.

Thanks for your time.
Regards
Suresh

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Bedford | last post by:
Hi... would be interested in the feedback of wsdl experts on this. I think there are two bugs in the w3c's wsdl/soap schemas. First, in section A 4.1 there is this element, with no closing...
2
by: Ali | last post by:
I am having problem compiling schema contained in WSDL file when analyzing schema types contained in it (for example http://www.ebout.net/net/GoogleSearch.wsdl). Following code demonstrates my...
1
by: billa1972 | last post by:
Hi, I am trying to hook into Yellow Freight's rating webservice. Below is the wsdl. When i try and create a proxy file with wsdl.exe i get the following errors, see below. Also, when i...
12
by: Whoever | last post by:
Hi, I'm trying to return an XmlDocument or XmlNode converted from a typed dataset. public XmlNode whatever() { MyTypedDataSet ds = new MyTypedDataSet(); return new XmlDataDocument(ds); }
5
by: Jeff | last post by:
We are using .Net and the wsdl Utility to generate proxies to consume web services built using the BEA toolset. The data architects on the BEA side create XML schemas with various entities in...
1
by: drb | last post by:
Hi, Newbie question #2 - hope that's OK! I'm trying to create a WSDL file using one or more XSD schema files. While WSDL.exe doesn't seem to support the XSD "import" function, if I include a...
2
by: Jiho Han | last post by:
I am trying to validate a document against a set of schema and in order to do that, I am using XmlValidatingReader.Schemas.Add to add the schemas. However, since there are dependencies, the...
2
by: SteveChamp | last post by:
I have been experimenting with .Net web services for a while and have a few questions about the schema in the automatically generated WSDL file, and whether its content can be manipulated...
1
by: Christof Winter | last post by:
I am trying to use a webservice with SOAPpy: import SOAPpy intact_wsdl = "http://www.ebi.ac.uk/intact/binary-search-ws/binarysearch?wsdl" intact_serv = SOAPpy.WSDL.Proxy(intact_wsdl) The...
0
by: mmaslar | last post by:
Can Visual Studio ('05 or '08) generate a WSDL file with an external Schema file? eg. Instead of placing the schema within the WSDL file, generate it in a separate XSD file? In other words......
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.