I think I am missing something basic. I tried a simple test passing
StringBuilder with no ref and get the same error:
[WebMethod]
public StringBuilder ProcessTsrOrder(StringBuilder sb)
{
return sb.Append("Hello World!");
}
private void btnTest_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
TSRWS.TSRTxns txns = new TSRWS.TSRTxns();
sb = txns.ProcessTsrOrder(sb);
txtMessage.Text = sb.ToString();
}
Error 1 The best overloaded method match for
'WebServiceTest.TSRWS.TSRTxns.ProcessTsrOrder(WebS erviceTest.TSRWS.StringBuilder)'
has some invalid arguments C:\Documents and Settings\bmattox\My
Documents\Visual Studio\Projects\TSRWS\WebServiceTest\Form1.cs 25 18
WebServiceTest
Error 2 Argument '1': cannot convert from 'System.Text.StringBuilder' to
'WebServiceTest.TSRWS.StringBuilder' C:\Documents and Settings\bmattox\My
Documents\Visual Studio\Projects\TSRWS\WebServiceTest\Form1.cs 25 39
WebServiceTest
"Josh Twist" <> wrote in message
news: oups.com...
> Because a web service leaves the appdomain (and process) boundary you
> can't pass variables by reference (using the 'ref' keyword).
>
> Therefore, when the proxy (client code) is generated it doesn't contain
> the ref keyword and therefore there is no matching overload.
>
> I have to say, I'm slightly surprised that the Web Service itself
> doesn't throw an error when you try to access the help page or WSDL.
>
> HTH
>
> Josh
> http://www.thejoyofcode.com/
>