473,811 Members | 3,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to chagne the mandatory type when automatcially generating WSDL in .net 1.1?

Fan
Hi, everyone

When I first set up a web service in .Net 1.1, seems .Net will
automatically build the WSDL file. And the element type of each field
in input and output has been automatically created. How can I change
some fields from mandatory to optional from the code, instead of
manually modifying the WSDL file?

Thank you very much.

Fan

Aug 8 '06 #1
1 1960
If you're on .NET 2.0 make them nullable types (e.g. Nullable<int>).

I'd be careful about changing your WSDL file. It can be done. Actually, I
create web services by first creating a WSDL file and then generating server
and client classes via WSDL.exe. But studio really, REALLY wants you to just
create the server class and then cllow the WSDL and client classes to be
auto-generated. So, if you want to take that approach you lose a lot of the
built-in features that are supplied by Visual Studio.

(even though you end up with a scrict interface...whi ch is somehwat
important with enterprise apps...just my opinion)

"Fan" wrote:
Hi, everyone

When I first set up a web service in .Net 1.1, seems .Net will
automatically build the WSDL file. And the element type of each field
in input and output has been automatically created. How can I change
some fields from mandatory to optional from the code, instead of
manually modifying the WSDL file?

Thank you very much.

Fan

Aug 9 '06 #2

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

Similar topics

0
302
by: Softwaremaker | last post by:
I tried the tool...However, I think it was fairly difficult to use. Unless my config is wrong somewhat, everthing is a Passed. Any other tool you can recommend ? If not, do u know if the Service Element is necessary in a WSDL Document ? Thanks.
0
2759
by: Ollie | last post by:
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"...
1
18214
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it is serialized correctly, and the server returns a response (I've captured the response and it's correct!) but when the .NET deserialize this response, it throws the exception "System.InvalidOperationException: There is an error in XML
0
1779
by: Chris Fink | last post by:
When I am consuming a webservice, an object has an undefined value (inq3Type.Call3Data). I do not completely understand why this is happening and apologize for the vague question. My assumption is that the WSDL is defined incorrectly and .NET cannot parse the types. Any help is greatly appreciated! CustDDGSvc ws = new CustDDGSvc(); ws.Url = "http://dmapfra003.decisionone.com:8080/JISOAP/CustDDGSvc"; // don't understand why the...
6
2622
by: Serkan DIRIARIN | last post by:
hi! i have created a document class. I have a .net client application and a web service. Both of them using same object model and referencing a doctypes.dll file. But when i want to run a client application getting error InvalidCastException. I deleted class declaration in reference.vb in web reference defination and reference my document dll file, altough it is still has error... What is the problem.. thanks.... Serkan
0
1989
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project by serveraddresss?wsdl, it gives me following error: Custom tool error: Unable to import WebService/Schema. Unable to import binding 'MyRemoteObjectBinding' from namespace...
0
4851
by: Jigar.Patel | last post by:
I have simple remoting server exposing following simple method. When I try to add webreference to this server in another project, it gives me following error: Custom tool error: Unable to import WebService/Schema. Unable to import binding 'MyRemoteObjectBinding' from namespace 'http://schemas.microsoft.com/clr/nsassem/RemoteServer/RemoteServer%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull'. Unable to import...
5
4918
by: CindyRob | last post by:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET 2003, hotfixes 892202 and 823639. I create a proxy class using wsdl.exe, and in the serialized XML request, I see that any elements that are nested elements in the schema (not global elements) have their namespaces set to the null namespace. I can see that the proxy classes have serialization attributes specifying these nested elements as unqualified: ///...
15
1898
by: =?Utf-8?B?TWFkcyBOaWVsc2Vu?= | last post by:
Hi, I am developing a web service for a customer. The service has a method, that returns an array of Forms. Each form has a Name property of Type String. The customer wants the contract to specify, thath the name is mandatory and not nullable. To reflect this, they want the xml in the wsdl (the Form part) to look similar to this: <xs:complexType name="Form">
0
9727
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
9605
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
10647
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10398
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4339
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
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3017
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.