Hi all,
I'm exposing an orchestration as a web service which simply replies
the same object it receives by calling an internal ws I wrote which
does the same thing. (getting the object and returning it)
While I was using a simple string the circle worked fine, but after I
switched the object from string to my own type, which is defined in the
original ws, something went wrong.
I have a single function called update which looks like:
public Contact update(Contact contact)
{
return contact;
}
for some reason when I'm trying to use the exposed ws in one of my
projects the method looks like:
void update(ref contact)
why is that?
Thank you,
Doron.
Pablo Cibraro - 01 Sep 2005 15:17 GMT
Hi doron,
That happens because your method signature and "void update(ref contact)"
are equivalent in this case. Why are you returning the same object you
received ?.
All objects in .NET are passed by reference to a method, so, you don't need
to return it.
If you want to change some data on the customer object, the following method
signature should be fine:
public void update(Contact contact)
{
// Change some data on contact
}
Regards,
Pablo Cibraro
www.lagash.com
> Hi all,
>
[quoted text clipped - 25 lines]
>
> Doron.