Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Request for design guideline on parameter

Reply
Thread Tools

Request for design guideline on parameter

 
 
Louis Yeung
Guest
Posts: n/a
 
      04-06-2005
Hi,

I am going around circles on the use of parameters in Web Service. I believe
that the parameters should be of primitive type for Web Service interop. If
my method expects 2 input parms (say int and string), modifies them and
returns them to call, how should I define the Web service method in C#? Any
Pro and Con (especially on Interop).

Please remember I am not going after a Web service or else debate. I just
need to know the catch in the following solutions and best practice from
everyone.

1. public void method(ref int in1, ref string in2)
I like this one because it is like RPC and with interop in my own mind.

2. public ClassA method(int in1, string in2) where ClassA {int in1; string
in2;}
Some of our people is against byref in web service method. Your opinion? I
feel this ClassA is redundant. Can interop be an issue when "class" is being
passed around?

3. public string method(int in1, string in2) where string is a XML of the
output
I personally feel like undoing some of the provided plumbing. We have to
decode again.

My starting point may not be 100% correct because the SOA model recommends
you define the Web Service XSD first to ensure interop and develop the Web
service based on the definition. This is why I am keeping to primitive types,
no class.




 
Reply With Quote
 
 
 
 
Selden McCabe
Guest
Posts: n/a
 
      04-12-2005
I see you have not received any answers yet, so let me jump in.

I use ByRef arguments all the time in web services. In fact, I also use
custom classes as parameters in web services, without any problems.

However, I'm not sure what you mean by "web service interop" so I may be a
bit off-track here.

---Selden


"Louis Yeung" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I am going around circles on the use of parameters in Web Service. I
> believe
> that the parameters should be of primitive type for Web Service interop.
> If
> my method expects 2 input parms (say int and string), modifies them and
> returns them to call, how should I define the Web service method in C#?
> Any
> Pro and Con (especially on Interop).
>
> Please remember I am not going after a Web service or else debate. I just
> need to know the catch in the following solutions and best practice from
> everyone.
>
> 1. public void method(ref int in1, ref string in2)
> I like this one because it is like RPC and with interop in my own mind.
>
> 2. public ClassA method(int in1, string in2) where ClassA {int in1; string
> in2;}
> Some of our people is against byref in web service method. Your opinion? I
> feel this ClassA is redundant. Can interop be an issue when "class" is
> being
> passed around?
>
> 3. public string method(int in1, string in2) where string is a XML of the
> output
> I personally feel like undoing some of the provided plumbing. We have to
> decode again.
>
> My starting point may not be 100% correct because the SOA model recommends
> you define the Web Service XSD first to ensure interop and develop the Web
> service based on the definition. This is why I am keeping to primitive
> types,
> no class.
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
style guideline for naming variables? John Salerno Python 2 03-18-2006 01:18 AM
What's the guideline for dealing with unwanted chars in input stream? lovecreatesbeauty C Programming 17 01-01-2006 07:42 PM
Redundant behavior in coding guideline lovecreatesbeauty C Programming 2 10-27-2005 01:26 PM
Redundant behavior in coding guideline lovecreatesbeauty C Programming 0 10-27-2005 10:01 AM
macro style guideline Vyom C Programming 7 11-23-2004 05:13 PM



Advertisments