473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WSDL and Optional Parameters

WHY

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 possible to edit the WSDL in conjunction with a c# method to make the
parameter optional, or have a default value at the client consumer?
--
http://kentpsychedelic.blogspot.com/
Updated 8/8/04
Nov 21 '05 #1
15 9597
Hi WHY,

You tapped out: <<
Since there's no way to create a c# method with optional,
or nullable parameters. >>

No sprintf ( char * Format, ... ) ?

You added: <<
And since you can't write an overloaded web method. >>

Could that be true ? I don't believe it.

You asked: <<
Is it possible to edit the WSDL [ .XML file ]
in conjunction with a c# method
to make the parameter optional,
or have a default value at the client consumer ? >>

Perhaps you could emulates sprintf() by parsing
a string that tells you what parameters are on the stack...

What's a stack ? I hear you asking.

It's a dynamic FILO queue, First In Last Out.

You could create a dynamic FILO queue via a dynamic array,
with pointers to the top and the bottom of the stack.

Of course I would use realloc() to manage a dynamic array...

But I think C#'s automatic allocations
could do something similar... perhaps using the VAR type.
Nov 21 '05 #2
WHY
Jeff Relf wrote:

But I think C#'s automatic allocations
could do something similar... perhaps using the VAR type.


You rant and spew acuneiform you want so much to be a c# programmer so you
can get a job.

But let me tell you -- there is only one real language: Graffiti 2 and it's
part of the Palm OS. I spend the whole weekend learning the little
cuneiform symbols and it was very cool.

I can sync up Linux with KPilot -- no problem.

--
http://kentpsychedelic.blogspot.com/
Updated 8/8/04
Nov 21 '05 #3
On 9 Aug 2004 08:29:33 GMT, Jeff Relf wrote:
But I think C#'s automatic allocations
could do something similar... perhaps using the VAR type.


..NET has a Stack class:

Stack s = new Stack();
s.Push(42);
int i = (int)s.Pop();
Nov 21 '05 #4
Hi Thomas Edison,

You mentioned: << .NET has a Stack class:
Stack s = new Stack(); s.Push(42);
int i = (int)s.Pop(); >>

How would that Stack class be added in C# or C++ ?

In C/C++ I would do something like this:
#include <Something.H> // Something.LIB
Nov 21 '05 #5
In article <_J************ ************@NC Plus.NET>, Jeff Relf wrote:
Hi Thomas Edison,

You mentioned: << .NET has a Stack class:
Stack s = new Stack(); s.Push(42);
int i = (int)s.Pop(); >>

How would that Stack class be added in C# or C++ ?

In C/C++ I would do something like this:
#include <Something.H> // Something.LIB

Well, the stack class is in the System.Collecti ons namespace - but that
resides in System.dll so, you don't actually have to do anything to add
it. If you want to access it with an unqualified name you have to place
a using statement in the file:

using System.Collecti ons;
....

Stack stack = new Stack();

Other wise you would have to write the code like this:

System.Collecti ons.Stack stack = new System.Collecti ons.Stack();

--
Tom Shelton
Nov 21 '05 #6
Hi Tom Shelton,

Re: System.Collecti ons.Stack stack
= new System.Collecti ons.Stack();

Upon compiling that in a .CPP file, I got this error:

'System' : undeclared identifier

Re: using System.Collecti ons;

That give me the following errors:

1. missing ';' before '.'

2. 'System' cannot be used in a using-declaration
Nov 21 '05 #7
On 9 Aug 2004 22:58:44 GMT, Jeff Relf wrote:
Hi Tom Shelton,

Re: System.Collecti ons.Stack stack
= new System.Collecti ons.Stack();

Upon compiling that in a .CPP file, I got this error:


That's C#/.NET code. :-)
Nov 21 '05 #8

"Jeff Relf" <Jeff_Relf_@_NC Plus.NET.Invali d> wrote in message
news:_J******** *************** *@NCPlus.NET...
Hi Tom Shelton,

Re: System.Collecti ons.Stack stack
= new System.Collecti ons.Stack();

Upon compiling that in a .CPP file, I got this error:

'System' : undeclared identifier

Re: using System.Collecti ons;

That give me the following errors:

1. missing ';' before '.'

2. 'System' cannot be used in a using-declaration


For managed C++ you have to write
using namespace System::Collect ions;
If memory serves.
Nov 21 '05 #9

"Jeff Relf" <Jeff_Relf_@_NC Plus.NET.Invali d> wrote in message
news:_J******** *************** *@NCPlus.NET...
Hi WHY,

You tapped out: <<
Since there's no way to create a c# method with optional,
or nullable parameters. >>

No sprintf ( char * Format, ... ) ?
Different concept. ... is analgous to the params keyword in C#

public void sprintf(string format, params string[] parameters);

would work. However, its not the same as a VB optional parameter or an SQL
style nullable type. C# gains the latter in 2.0.

I do'nt know if params maps to WSDL or not.
You added: <<
And since you can't write an overloaded web method. >>

Could that be true ? I don't believe it.
WSDL works based on names, you cannot create overloads because the message
name determines which method is called. Two methods with teh same name
clash. I don't know the specifics but there is an attribute that will allow
you to change the method name.
Of course I would use realloc() to manage a dynamic array...

But I think C#'s automatic allocations
could do something similar... perhaps using the VAR type.


There *is* no VAR type, please learn the langauge before responding, -_-.
ArrayList, Stack, Queue, etc handle it for you. There is no simple
reallocation operation like C provides as it isn't always really logical to
do so, writing a dynamic array class isn't terribly hard, even if it is a
waste of time.
Nov 21 '05 #10

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

Similar topics

24
8655
by: Generic Usenet Account | last post by:
Does anyone have an opinion on how IDL and WSDL compare to each other? Are they equally powerful in their "expressive power"? Sometimes it appears to me that IDL is a little easier for humans to follow. Also, it appears to be more compact. Are IDL and WSDL equally powerful in expressing complex data types, and describing inheritance and...
3
2991
by: WHY | last post by:
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 possible to edit the WSDL in conjunction with a c# method to make the parameter optional, or have a default value at the client consumer? --
5
5384
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 separate files for ease of maintainability. These schemas are all part of the same namespace. When defining a web service that access more than one...
0
1679
by: Elhanan | last post by:
hi.. i have a small Web Service which is consumed by dotnet application the webservice is located in 2 places. the first is my local tomcat, and the second is in websphere server. problems is that if i generate a proxy from the wsdl in websphere, i can't get the databean if refer the proxy's url my tomcat's (i simply recive null). this...
1
5040
by: Mike Logan | last post by:
I have a schema that defines my messages and objects. I then have a WSDL that defines the web services. I have my sample XSD, sample WSDL, and the code generated from WSDL.exe. In the generated code from WSDL.exe, the "applicationList" object is not a array or "application", which is what it should be, correct? Thanks for the help. ...
5
10317
by: Mike Logan | last post by:
I used WSDL.exe to generate a client side web proxy for a web service, called the web service, got the results but an array returned by the web service is not in the results. However if I use "Add Web Reference" for the same service the same function works appropriately. Here is the client proxy generated from WSDL.exe ...
0
2123
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService" targetNamespace="http://swaMaragatoNS" xmlns:tns="http://swaMaragatoNS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"...
5
4971
by: Nick K. | last post by:
I use wsdl.exe to generate client code to call a web service. The actual web service is generated with the BizTalk Web Services Publishing Wizard. I'm not sure this is particular to the BizTalk code but the calls to web methods pass parameters by ref so that I have to call it like: XmlDocument doc = new XmlDocument(); ...
1
1643
by: HYPERVIEW | last post by:
I am generating a web service from an application called Remedy. It has a sort of wizard that is responsible for creating the web service. It produces the following WDSL file that is properly parsed by SOAPSonar and other applications. However, when I try to bring it into both Visual Studio 2003 and 2005 it doesn't seem to parse out the WSDL...
0
1703
by: lehu | last post by:
Hi, I have created web service, it's practically finished, but I wanted to do some improvements in generated wsdl: - For string parameters i get element tag such as this in wsdl: <s:element minOccurs="0" maxOccurs="1" name="xml" type="s:string"/> 1.) For some of those parameters i want to make it mandatory, changing minOccurs to 1: ...
0
7695
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...
0
7922
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. ...
1
7668
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...
0
6281
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...
1
5509
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...
0
5218
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...
0
3653
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...
1
2111
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
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.