I want to use the SoapClient with a proxy server that proxies requests just for Cybersource. We noticed in our staging environment that when using a proxy with the CS SDK, all web requests were sent through the proxy because of UseDefaultWebProxy = true, which is not desirable for us (for example we send requests to our hosting provider's API which we would prefer not to be proxied). This appears to be inconsistent with the XmlClient's behaviour.
To get around this I've set UseDefaultWebProxy = false, however this caused authentication errors on the proxy. I observed that it is possible to add credentials to TransactionProcessorClient.ClientCredentials and they are used when connecting to the proxy server.
This behaviour was observed by creating a new WebRequest in the SoapSample class and watching the proxies access log (squid3). After applying these changes, the extra WebRequest was not shown in the access logs.
I'm not a WCF guy so any feedback on this change would be greatly appreciated!
I want to use the SoapClient with a proxy server that proxies requests just for Cybersource. We noticed in our staging environment that when using a proxy with the CS SDK, all web requests were sent through the proxy because of UseDefaultWebProxy = true, which is not desirable for us (for example we send requests to our hosting provider's API which we would prefer not to be proxied). This appears to be inconsistent with the XmlClient's behaviour.
To get around this I've set UseDefaultWebProxy = false, however this caused authentication errors on the proxy. I observed that it is possible to add credentials to TransactionProcessorClient.ClientCredentials and they are used when connecting to the proxy server.
This behaviour was observed by creating a new WebRequest in the SoapSample class and watching the proxies access log (squid3). After applying these changes, the extra WebRequest was not shown in the access logs.
I'm not a WCF guy so any feedback on this change would be greatly appreciated!