//ExpressServiceClient public static SFExpressServiceResponseData GetsFExpressServiceResponseData(SFExpressServiceRequestData sFExpressServiceRequestData) { SFExpressServiceResponseData sFExpressServiceResponseData = new SFExpressServiceResponseData(); ExpressServiceClient expressServiceClient = new ExpressServiceClient(); try { string combineXMLRequest_CheckWord = sFExpressServiceRequestData.OrderRequest + sFExpressServiceRequestData.Checkword; System.Security.Cryptography.MD5 hs = System.Security.Cryptography.MD5.Create(); byte[] base64Encryption = hs.ComputeHash(System.Text.Encoding.UTF8.GetBytes(combineXMLRequest_CheckWord)); string base64VeirificatioCode = Convert.ToBase64String(base64Encryption); sFExpressServiceResponseData.SFExpressServiceResponse = Task.Run( () => new ExpressServiceClient() .sfexpressServiceAsync( sFExpressServiceRequestData.OrderRequest, base64VeirificatioCode)) .Result.ToString(); sFExpressServiceResponseData.Response = true; } catch (Exception exception) { sFExpressServiceResponseData.exception = exception; } return(sFExpressServiceResponseData); }
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return(ExpressServiceClient.GetEndpointAddress(EndpointConfiguration.CommonExpressServicePort)); }
private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return(ExpressServiceClient.GetBindingForEndpoint(EndpointConfiguration.CommonExpressServicePort)); }
public ExpressServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(ExpressServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public ExpressServiceClient(EndpointConfiguration endpointConfiguration) : base(ExpressServiceClient.GetBindingForEndpoint(endpointConfiguration), ExpressServiceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }
public ExpressServiceClient() : base(ExpressServiceClient.GetDefaultBinding(), ExpressServiceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.CommonExpressServicePort.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); }