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" <> wrote in message
news:EFE30D65-77E1-43EB-8713-...
> 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.
>
>
>
>
|