R
Ray Stevens
I have a simple method that is using a complex data class created by a
mainframe interface code generator. I compiled this into a Business Entities
project and referenced it in both the Web Service and the client, so it
should be identical in both.
A sample abrivation of the class is of the following form:
namespace SoftwareAG.EntireX.NETWrapper.Generated.tsrsubi1.Groups
{
public class Tsrsubi1
{
public class Xormsga2
{
[SendAs(IdlType.A, Length=3f, Trim=true)]public string
environment ;
[SendAs(IdlType.A, Length=3f, Trim=true)]public string sourceApp
;
[SendAs(IdlType.A, Length=8f, Trim=true)]public string
destinationApp ;
// etc
public class OrderHeader
{
[SendAs(IdlType.A, Length=12f, Trim=true)]public string
orderNo ;
[SendAs(IdlType.A, Length=5f, Trim=true)]public string
custId ;
[SendAs(IdlType.A, Length=7f, Trim=true)]public string
unitId ;
// etc
}
// etc
}
}
}
The test Web Service looks as follows:
using SoftwareAG.EntireX.NETWrapper.Generated.tsrsubi1.Groups;
[WebService(Namespace = "http://company.com/webservices")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class TSRTxns : System.Web.Services.WebService
{
[WebMethod]
public void ProcessTsrOrder(ref Tsrsubi1.Xormsga2 etx)
{
TSRBLL bll = new TSRBLL();
bll.ProcessTsrOrder(ref etx);
}
}
The test client is referencing the web service as:
using SoftwareAG.EntireX.NETWrapper.Generated.tsrsubi1.Groups;
namespace WebServiceTest
{
public partial class Form1 : Form
{
private void btnTest_Click(object sender, EventArgs e)
{
Tsrsubi1.Xormsga2 etx = new Tsrsubi1.Xormsga2();
etx.orderHeader.orderNo = "12321";
etx.clientTransactioId = "tran01";
etx.orderHeader.custId = "11111";
TSRWS.TSRTxns txns = new TSRWS.TSRTxns();
txns.ProcessTsrOrder(ref etx); // <<<< COMPILE ERROR HERE
txtMessage.Text = etx.messageText.ToString();
}
}
}
I am getting the following compile errors for some reason and don't know
why:
Error 1 The best overloaded method match for
'WebServiceTest.TSRWS.TSRTxns.ProcessTsrOrder(ref
WebServiceTest.TSRWS.Xormsga2)' has some invalid arguments C:\Documents and
Settings\bmattox\My Documents\Visual
Studio\Projects\TSRWS\WebServiceTest\Form1.cs 29 13 WebServiceTest
Error 2 Argument '1': cannot convert from 'ref
SoftwareAG.EntireX.NETWrapper.Generated.tsrsubi1.Groups.Tsrsubi1.Xormsga2'
to 'ref WebServiceTest.TSRWS.Xormsga2' C:\Documents and Settings\bmattox\My
Documents\Visual Studio\Projects\TSRWS\WebServiceTest\Form1.cs 29 38
WebServiceTest
Anyone have any suggestions?
mainframe interface code generator. I compiled this into a Business Entities
project and referenced it in both the Web Service and the client, so it
should be identical in both.
A sample abrivation of the class is of the following form:
namespace SoftwareAG.EntireX.NETWrapper.Generated.tsrsubi1.Groups
{
public class Tsrsubi1
{
public class Xormsga2
{
[SendAs(IdlType.A, Length=3f, Trim=true)]public string
environment ;
[SendAs(IdlType.A, Length=3f, Trim=true)]public string sourceApp
;
[SendAs(IdlType.A, Length=8f, Trim=true)]public string
destinationApp ;
// etc
public class OrderHeader
{
[SendAs(IdlType.A, Length=12f, Trim=true)]public string
orderNo ;
[SendAs(IdlType.A, Length=5f, Trim=true)]public string
custId ;
[SendAs(IdlType.A, Length=7f, Trim=true)]public string
unitId ;
// etc
}
// etc
}
}
}
The test Web Service looks as follows:
using SoftwareAG.EntireX.NETWrapper.Generated.tsrsubi1.Groups;
[WebService(Namespace = "http://company.com/webservices")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class TSRTxns : System.Web.Services.WebService
{
[WebMethod]
public void ProcessTsrOrder(ref Tsrsubi1.Xormsga2 etx)
{
TSRBLL bll = new TSRBLL();
bll.ProcessTsrOrder(ref etx);
}
}
The test client is referencing the web service as:
using SoftwareAG.EntireX.NETWrapper.Generated.tsrsubi1.Groups;
namespace WebServiceTest
{
public partial class Form1 : Form
{
private void btnTest_Click(object sender, EventArgs e)
{
Tsrsubi1.Xormsga2 etx = new Tsrsubi1.Xormsga2();
etx.orderHeader.orderNo = "12321";
etx.clientTransactioId = "tran01";
etx.orderHeader.custId = "11111";
TSRWS.TSRTxns txns = new TSRWS.TSRTxns();
txns.ProcessTsrOrder(ref etx); // <<<< COMPILE ERROR HERE
txtMessage.Text = etx.messageText.ToString();
}
}
}
I am getting the following compile errors for some reason and don't know
why:
Error 1 The best overloaded method match for
'WebServiceTest.TSRWS.TSRTxns.ProcessTsrOrder(ref
WebServiceTest.TSRWS.Xormsga2)' has some invalid arguments C:\Documents and
Settings\bmattox\My Documents\Visual
Studio\Projects\TSRWS\WebServiceTest\Form1.cs 29 13 WebServiceTest
Error 2 Argument '1': cannot convert from 'ref
SoftwareAG.EntireX.NETWrapper.Generated.tsrsubi1.Groups.Tsrsubi1.Xormsga2'
to 'ref WebServiceTest.TSRWS.Xormsga2' C:\Documents and Settings\bmattox\My
Documents\Visual Studio\Projects\TSRWS\WebServiceTest\Form1.cs 29 38
WebServiceTest
Anyone have any suggestions?