Quantcast
Channel: SCN: Message List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 7329

Re: Ws Security config file wont regenerate with current code changes PB.NET

$
0
0

I missed the fact (despite your having put it in the subject) that you were trying to pass a certificate for WS-Security.  The example I gave you was for authentication.  For WS-Security, try the following:


BasicHttpSecurity security 
security = create BasicHttpSecurity() 
security.SecurityMode = BasicHttpSecurityMode.TRANSPORTWITHMESSAGECREDENTIAL! 
security.Message.ClientCredentialType = BasicHttpMessageCredentialType.CERTIFICATE! 
WCFBasicHttpBinding binding ; 
binding = create WCFBasicHttpBinding() 
binding.Security = security ; 
client.wcfConnectionObject.BasicHttpBinding = binding ; 
client.wcfConnectionObject.BindingType = WCFBindingType.BasicHttpBinding! 
ClientCertificateCredential cert ; 
cert = create ClientCertificateCredential() 
cert.SubjectName = <subject of your certificate>
cert.StoreLocation = CertStoreLocation.CurrentUser! 
cert.StoreName = CertStoreName.My! 
WCFClientCredential credential ; 
credential = create WCFClientCredential() 
credential.ClientCertificate = cert 
client.wcfConnectionObject.ClientCredential = credential 

Viewing all articles
Browse latest Browse all 7329

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>