473,503 Members | 1,656 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 9592
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************************@NCPlus.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.Collections 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.Collections;
....

Stack stack = new Stack();

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

System.Collections.Stack stack = new System.Collections.Stack();

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

Re: System.Collections.Stack stack
= new System.Collections.Stack();

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

'System' : undeclared identifier

Re: using System.Collections;

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.Collections.Stack stack
= new System.Collections.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_@_NCPlus.NET.Invalid> wrote in message
news:_J************************@NCPlus.NET...
Hi Tom Shelton,

Re: System.Collections.Stack stack
= new System.Collections.Stack();

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

'System' : undeclared identifier

Re: using System.Collections;

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::Collections;
If memory serves.
Nov 21 '05 #9

"Jeff Relf" <Jeff_Relf_@_NCPlus.NET.Invalid> 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
Hi Thomas Edison,

Re: How System.Collections.Stack
is not available for .CPP files,

Thanks.

That makes sense,
kind of like how C# doesn't support realloc()
and memmove().
Nov 21 '05 #11
Jeff Relf wrote:
Hi Thomas Edison,

Re: How System.Collections.Stack
is not available for .CPP files,

Thanks.

That makes sense,
kind of like how C# doesn't support realloc()
and memmove().


Why would a language with automatic garbage collection need to do this ?

--
http://www.nlc.no/
Norwegian Linux Community
Nov 21 '05 #12
Hi Jessup Silstrom,

Re: C# not supporting realloc() and memmove().

You asked, <<
Why would a language with automatic garbage collection
need to do this ? >>

Even if supporting functions that
have been around for decades
means absolutely nothing to you...

realloc() and memmove() provide much more
control over how memory gets allocated, used
and reclaimed.

But then you've never used those 2 routines, have you.
Nov 21 '05 #13
On 10 Aug 2004 03:26:34 GMT, Jeff Relf wrote:
Hi Thomas Edison,

Re: How System.Collections.Stack
is not available for .CPP files,

Thanks.

That makes sense,
kind of like how C# doesn't support realloc()
and memmove().


// You can work with unmanaged memory....

using System.Runtime.Interop.Services;

....

IntPtr memPtr = Marshal.AllocHGlobal (numberOfBytesRequired);

....

// Oh, I need to realloc it...
memPtr = Marshal.ReallocHGlobal (memPtr, theNewSize);

....

// Ok, were done...
Marshal.FreeHGlobal (memPtr);

Nothing, exactly equivalent to memmove (at least in the unmanaged sense) -
but, you could implement it your self, or just make a call to the C runtime
to access the call dynamically. But all of this is almost never necessary.

--
Tom Shelton
Nov 21 '05 #14
On 9 Aug 2004 22:58:44 GMT, Jeff Relf wrote:
Hi Tom Shelton,

Re: System.Collections.Stack stack
= new System.Collections.Stack();

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

'System' : undeclared identifier

Re: using System.Collections;

That give me the following errors:

1. missing ';' before '.'

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


This is C#. You asked how you would access the Stack class from C# - I
gave an example.

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

Re: The .NET SDK,

You wrote: << Nothing, exactly equivalent to memmove()
( at least in the unmanaged sense ) -
but, you could implement it your self,
or just make a call to the C runtime
to access the call dynamically.
But all of this is almost never necessary. >>

I use memmove() all the time.

Also, I question the quality of any virtual OS like .NET,

What's wrong with using Win XP directly ?
Nov 21 '05 #16

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

Similar topics

24
8646
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...
3
2987
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#...
5
5375
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...
0
1674
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...
1
5030
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...
5
10307
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...
0
2114
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"...
5
4967
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...
1
1632
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...
0
1694
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...
0
7271
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
7319
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...
1
6979
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...
1
4998
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...
0
4666
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...
0
3160
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...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
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 ...
1
730
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.