Exemplo n.º 1
0
        private backendModuleServiceV1PortTypeClient CreateMagentoBackendModuleServiceV1Client(string baseMagentoUrl)
        {
            var endPoint = new List <string> {
                baseMagentoUrl, SoapApiUrl + "backendModuleServiceV1"
            }.BuildUrl(trimTailsSlash: true);

            var customBinding      = CustomBinding(baseMagentoUrl, MessageVersion.Soap12);
            var magentoSoapService = new backendModuleServiceV1PortTypeClient(customBinding, new EndpointAddress(endPoint));

            magentoSoapService.Endpoint.Behaviors.Add(new ChannelBehaviour.CustomBehavior()
            {
                AccessToken = this.ApiKey
            });

            return(magentoSoapService);
        }
Exemplo n.º 2
0
 public backendModuleServiceV1PortTypeClient RefreshMagentoBackendModuleServiceV1Client(backendModuleServiceV1PortTypeClient client)
 {
     return(this.RefreshClient(client));
 }