473,402 Members | 2,046 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,402 software developers and data experts.

mandatory fields....

I have defined a set of SOAP messages using an xsd file, each element in the
xsd has the minoccurs, maxoccurs & nillable attributes defined when I then
use xsd.exe to generation C# classes for these message the attributes are
NOT defined for the class members - e.g.

<xsd:complexType name="Session">
<xsd:sequence>
<xsd:element name="Id" type="xsd:int" nillable="false" minOccurs="1"
maxOccurs="1" />
<xsd:element name="Name" type="xsd:string" nillable="false"
minOccurs="1" maxOccurs="1" />
<xsd:element name="StartDate" type="xsd:date" nillable="false"
minOccurs="1" maxOccurs="1" />
<xsd:element name="EndDate" type="xsd:date" nillable="false"
minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>

when the C# class is generated it appears as:

[System.Xml.Serialization.XmlTypeAttribute(Namespac e="uk.org.XXX.esm.v1")]
[System.Xml.Serialization.XmlRootAttribute(Namespac e="uk.org.XXX.esm.v1",
IsNullable=false)]
public class Session
{
/// <remarks/>
public int Id;
/// <remarks/>
public string Name;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataT ype="date")]
public System.DateTime StartDate;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataT ype="date")]
public System.DateTime EndDate;
}

Can I mark the class members as having minoccurs, maxoccurs & nillable
attributes or is this impossible?

Is it possible to make a WS end point not accept a null value(message)? - if
so will it throw a SOAP exception?

If I go the contract first way of development for the WS do I have to
manually create the WSDL file after creating the xsd ?

Anyone know of a good tool for generating the WSDL with the attributes I
want....

Cheers in advance

Ollie


Nov 21 '05 #1
0 2731

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

Similar topics

1
by: Le Tubs | last post by:
Hi I am wondering if anybody has come accross this problem before, basically I have to validate a xml schema (not the data, this is done at a later stage). The only problem is that there are...
1
by: AR123 | last post by:
Hi I have set up mandatory form fields but it dosne t seem to be working. Would appreciate it if somone could have a look. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> ...
4
by: plumba | last post by:
Let me explain.... I have a form (most of which you guys have helped me with!!). The initial problem I was having is that it was holding the data in the fields after submit, I resolved this by...
1
by: AR123 | last post by:
The mandatory form field that is not working is the TYPE OF ILLUSTRATION. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Proforma</title> <meta...
2
by: bugsbunny12345 | last post by:
i have a form contains 7 fields .. in that if the user enters the value in any one of the field all the remaining 6 fields should be MANDATORY.. if the user didn't enter any value in any field ...
2
by: AR123 | last post by:
Hi I have set up a form. What I want to to is with the fields: Company Postcode Agency Number Policy Number I want these to be mandatory however if someone fills in the company postcode for...
6
by: Dameon99 | last post by:
Ive been looking through a whole tonne of sites to try to find out how I can make my fields mandatory but havnt been able to find something so far which actually tells me whwta I want to know. Ive...
1
by: ajd335 | last post by:
Hi.. there are some radio buttons,which are mandatory in my site. So how can i find whether they are filled by the user or not ..so that i can respond accordingly.(i.e if all mandatory fields are...
7
by: sva0008 | last post by:
Hi , I have a scenario in which i have four input fields in asp with the same name batchlist. I have a button called add batch . The user can add the batch by clicking the add batch button . out...
1
pradeepjain
by: pradeepjain | last post by:
Hii , I have a form which has 20-30 textboxes which are mandatory ! is there a way of validating mandatory fields in easier ways by using a single function or some thing like tht ! bcos i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.