Re: ByRef/Ref passing in Web Services

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Y'know this is what another gentleman just recommended. I guess it must work
then. I swear I wrote an example last night which didn't, the only
difference was I didn't have a public int, I had a private string with a
get/set property.

Anyway, thanks for your help - I'll try this out tonight when I have my
hands on a 1.1 machine.

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/



"Brock Allen" <ballen@xxxxxxxxxxxxxxxxx> wrote in message
news:627180632507170521992896@xxxxxxxxxxxxxxxxxxxxxxx
> > Now back to the question - How do I make ref type work with non scalar
> > data types? (Not that I'd ever want to, but for academic reasons ..
> > How?)
>
> This works for me:
>
> public class Foo
> {
> public int xoxo;
> }
>
> [WebService(Namespace = "http://tempuri.org/";)]
> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1,
EmitConformanceClaims
> = true)]
> public class WebService : System.Web.Services.WebService
> {
> [WebMethod]
> public void HelloWorld(ref Foo param)
> {
> }
> }
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>


.



Relevant Pages