473,729 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xsi:nil="true" changes min occurs from xsd to wsdl

Hi,
I have a brief question regarding the .net framework renders class
definitions of schemas to wsdl descritions.
I have observed the following:
1. I have a schema with a mandatory field (in this example a string) in my
schema.
2. When I convert this to a class (using xsd.exe) all is well. There is
nothing in the code that is created to suggest that the field create is
mandatory or otherwise.
3. When I render run the project and inspect the WSDL the minoccurs is set
to 0 (as opposed to 1)

Question
----------
Why the change from minoccurs 1 (in the schema) to minoccurs 0 (in the
wsdl)? I am guessing that there is nothing in the source created to define
"mandatorin ess" of elements (fields) to the .Net framwork decides this itself?

4. If I set the nillable attribute to true on an element that has
minoccurs=0 and execute the same procedure as above the minoccurs now is set
to 1

Question
---------
Why is this. To my knowledge there is no necessary connection between
setting the nillable attribute in a schema and the change in minoccurs
setting. If there is a connection coes this mean that it makes no sense
tohave nillable="true" and minoccurs set to 0?

Any replies greatly appreciated.

Aug 22 '06 #1
0 1602

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

Similar topics

0
1906
by: Stefan Prange | last post by:
Hi everyone, I have a little problem here and wasn't able to find a proper solution by searching the web. So this newsgroups is my last resort ;-) I have an xml-schema definition of an element which reads: <xsd:element name="DoubleValue" type="xsd:double" nillable="true"/> In my instance document I have the following element:
0
3518
by: John Jenkins | last post by:
Hi, can someone tell me why the following scneario occurs. With the nillable attribute set to true on an element that has min occurs set to zero, I generate a class. As expected this adds the IsNullable=true attribute <xs:element name="SSN" type="xs:string" minOccurs="0" nillable="true"/> /// <remarks/>
0
1233
by: Greg | last post by:
I'm writing a program which uses the ImportNode function of an XMLDataDocument. This works fine for elements which may appear once at most; however, for elements which may appear multiple times, it inserts 'xsi:nil="true"' for each of those elements, which is a violation of my schema (and logic). (The code below is for cataloging laboratory instruments. The element "calibrationtuid" is a globally unique identification string which...
0
5607
by: info | last post by:
Dear all, is the first time that I use SOAP, and i must say that i'm having several problems. this is SOAP message that expects the server =================XML EXPECTED FROM THE SERVER================ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
0
1821
by: jazzygirl | last post by:
I'm fairly new to vb.net (self-taught and realizing how much I DON'T know). I need to create an XML output file (I'm quite ignorant in this area as well!). I used an XMLDataDocument and Xml.XmlTextWriter, creating each element node since the agency I'm sending the file to is very specific about the format. How do I specify an element/node/attribute (whatever) to output xsi:nil="true"? Desired Output: <D02 xsi:nil="true" /> ...
0
8921
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8763
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9284
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9148
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8151
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2165
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.