Hello I have a BusinessClass CreditCardInfo defined in a library:
namespace Cockpit.Trackin gLibrary
{
/// <summary>
/// Summary description for OPCSignal.
/// </summary>
[Serializable]
public class CreditCardInfo
{
private string _number;
private int _expMonth, _expYear;
public string CardNumber
{
get { return _number; }
set { _number = value;}
}
public int ExpirationMonth
{
get { return _expMonth; }
set { _expMonth = value;}
}
public int ExpirationYear
{
get { return _expYear; }
set { _expYear = value;}
}
}
I have a webService using this BusinessClass as Parameter:
namespace Cockpit.Trackin gLibrary.wsOPCT ransmitter
[WebMethod()]
public void MakeDebit(Credi tCardInfo ccInfo, float amount)
{
// ... process the credit card ...
}
In the client I try to to call this Webservice:
srvOPCTransmitt er = new wsOPCTransmitte r.srvOPCTransmi tter();
// create an instance of the CreditCardInfo object
CreditCardInfo cc = new CreditCardInfo( );
cc.CardNumber = "11112222333344 44";
cc.ExpirationMo nth = 2;
cc.ExpirationYe ar = 2005;
srvOPCTransmitt er.MakeDebit (cc,4.95F);
but the compiler says at line with MakeDebit:
cannot convert from Cockpit.Trackin gLibrary.Credit CardInfo to
Cockpit.Trackin gLibrary.wsOPCT ransmitter.Cred itCardInfo
It seems it excpects the proxy class insted of the BusnissClass in the Web
Service Call!!!??
Waht is wrong?
Has anybody an example in C# with using an BusinessClass as Parameter in a
WebMethod?
Thanks
Seli