I am using this wsdl to generate classes.
https://pal-live.adyen.com/pal/Payment.wsdl
When i add it as a ‘web reference’ it creates a Payment class which contains the methods needed to make a payment.
When adding it as a ‘service reference’ it only creates an interface with these methods but no Payment class.
There are other classes but the crucial Payment class is missing and its methods are only in an interface.
How can the wsdl generate different classes? What is the key difference here and how can I get this Payment class?
It might also be worth noting that the reason I cant use the web reference is because this code is being deployed to azure websites and I get sdk version errors if I push the web reference generated code. Presumably because of the .net version.
Thanks
I used svcutil to generate classes based on your wsdl.
It created the interface
PaymentPortType. This defines the contract of how to communicate with your service. However, this does not know where the service is located.It also created the class
PaymentPortTypeClient. This class inherits fromClientBase<PaymentPortType>. By giving PaymentPortTypeClient a Binding and EndpointAddress, you now have everything you need to talk to your service.Note: this can come from a config file, at which point you would use the constructor
ClientBase has a private ChannelFactory. ChannelFactory.CreateChannel() will create an object that implements PaymentPortType and can talk to your service. This is done automatically and stored in ClientBase.Channel.
Finally,
PaymentPortTypeClientalso implements PaymentPortType. Each method from the interface is implemented to call that method on the channel.