Ask a Question related to ASP.NET Web Services, Design and Development.
-
PMCG #1
WebMethod and WSDL with optional parameters
Hi
If i have a simple web service lik
[WebMethodAttribute()
public string DoIt(string Name, int Age
return ""
and i look at the WSDL i get
element minOccurs="0" for the string parameter but element minOccurs="1" for the int parameter
I cannot find any of the Serialization attributes that i could use on the string parameter to indicate it should occour at least once
If anyone has a solution for this i would appreciate your hel
Pat
PMCG Guest
-
#40531 [NEW]: mb_substr optional parameters
From: emwebdev at hotmail dot com Operating system: Windows XP PHP version: 5.2.1 PHP Bug Type: mbstring related Bug... -
Making a value-type property optional in WSDL generated by ASP.NET
Hello all, Is there a way to mark a value-type property on a class as optional when being used as a parameter to a web service? The problem is... -
WSDL and Optional Parameters
Since there's no way to create a c# method with optional, or nullable parameters. And since you can't write an overloaded web method. Is it... -
Optional Parameters ASP to SQL stored procedure
Hi there, Can someone help, this is driving me crazy I have written a stored procedure in sql with input, output and return parameters. This... -
Function definition with optional parameters?
Some of the functions that are part of PHP have optional parameters. Is it possible to define your own function so that it has optional parameters?... -
Jan Tielens #2
Re: WebMethod and WSDL with optional parameters
This is because a string is a reference type and a int is a value type.
I don't know how you could control this... But I think it doesn't make sense
to change this. Consider this (normal) function:
public TestMe(string p)
{}
There is no way you could prevent an empty string to be passed...
--
Greetz,
Jan
________________________
Read my weblog: [url]http://weblogs.asp.net/jan[/url]
"PMCG" <anonymous@discussions.microsoft.com> schreef in bericht
news:5AB0DD1B-3AE3-46E8-852E-04240DE1F30D@microsoft.com...for the int parameter.> Hi,
> If i have a simple web service like
> [WebMethodAttribute()]
> public string DoIt(string Name, int Age)
> {
> return "";
> }
> and i look at the WSDL i get
> element minOccurs="0" for the string parameter but element minOccurs="1"string parameter to indicate it should occour at least once.> I cannot find any of the Serialization attributes that i could use on the>
> If anyone has a solution for this i would appreciate your help
> Pat
Jan Tielens Guest



Reply With Quote

