To use the eConnect Integration Service you need to initialize one or more of the eConnect WCF client classes. Typically, you would use the eConnectClient class but the service includes other client classes. All of the following classes inherit from the System.ServiceModel.ClientBase class.
To initialize a new instance of a client class, use the constructor that supplies information about your eConnect Integration Service endpoint. Typically, you use the default constructor which uses the default target endpoint from your application configuration file. The following C# code example initializes a new instance of the eConnectClient.
// Initialize a new instance of the eConnectClient eConnectClient eConnectObject = new eConnectClient();
The ClientBase class provides several overloaded constructors that enable you to specify endpoint information for your service. For example, the following table specifies the constructors available for the eConnectClient class.
Name |
Description |
eConnectClient() |
Initializes a new instance of the eConnectClient class using the default target endpoint from your application configuration file. |
eConnectClient(string endpointConfigurationName) |
Initializes a new instance of the eConnectClient class using the specified endpoint configuration information from the application configuration file. |
eConnectClient(string endpointConfigurationName, string remoteAddress) |
Initializes a new instance of the eConnectClient class using the specified endpoint configuration information from the application configuration file and using the specified service address. |
eConnectClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) |
Initializes a new instance of the eConnectClient class using the specified target address and endpoint information. |
eConnectClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) |
Initializes a new instance of the eConnectClient class using the specified binding and target endpoint address. |
The constructors use the following parameters.
Name |
Type |
Description |
binding |
System.ServiceModel.Channels.Binding |
Specifies the binding to use to make calls to the service. |
endpointConfiguationName |
string |
Specifies the name of the endpoint in the application configuration file. |
remoteAddress |
string |
Specifies the address of the eConnect Integration Service. |
remoteAddress |
System.ServiceModel.EndpointAddress |
Specifies the address of the eConnect Integration Service. |
The DocumentNumberRollbackClient and TransactionRecordIdsClient include overloaded constructors with the same parameters as the eConnectClient class.