Hello I have a BusinessClass CreditCardInfo defined in a library:
namespace Cockpit.TrackingLibrary
{
/// <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.TrackingLibrary.wsOPCTransmitter
[WebMethod()]
public void MakeDebit(CreditCardInfo ccInfo, float amount)
{
// ... process the credit card ...
}
In the client I try to to call this Webservice:
srvOPCTransmitter = new wsOPCTransmitter.srvOPCTransmitter();
// create an instance of the CreditCardInfo object
CreditCardInfo cc = new CreditCardInfo();
cc.CardNumber = "1111222233334444";
cc.ExpirationMonth = 2;
cc.ExpirationYear = 2005;
srvOPCTransmitter.MakeDebit (cc,4.95F);
but the compiler says at line with MakeDebit:
cannot convert from Cockpit.TrackingLibrary.CreditCardInfo to
Cockpit.TrackingLibrary.wsOPCTransmitter.CreditCardInfo
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