R
Ray Stevens
I have a C# dataclass object that I would like to pass to a Web Service
WebMethod, modify some strings, and return it to the caller but I am getting
compiler errors in the client. I'm not an expert on Web Services and am
wondering if what I am attempting is even doable?
Even this simple test generates the error:
From the Web Service:
[WebMethod]
public StringBuilder ProcessTsrOrder(StringBuilder sb)
{
return sb.Append("Hello World!");
}
From the test client:
private void btnTest_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
TSRWS.TSRTxns txns = new TSRWS.TSRTxns();
sb = txns.ProcessTsrOrder(sb); //<<< compiler error here
txtMessage.Text = sb.ToString();
}
Error 1 The best overloaded method match for
'WebServiceTest.TSRWS.TSRTxns.ProcessTsrOrder(WebServiceTest.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
WebMethod, modify some strings, and return it to the caller but I am getting
compiler errors in the client. I'm not an expert on Web Services and am
wondering if what I am attempting is even doable?
Even this simple test generates the error:
From the Web Service:
[WebMethod]
public StringBuilder ProcessTsrOrder(StringBuilder sb)
{
return sb.Append("Hello World!");
}
From the test client:
private void btnTest_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
TSRWS.TSRTxns txns = new TSRWS.TSRTxns();
sb = txns.ProcessTsrOrder(sb); //<<< compiler error here
txtMessage.Text = sb.ToString();
}
Error 1 The best overloaded method match for
'WebServiceTest.TSRWS.TSRTxns.ProcessTsrOrder(WebServiceTest.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