Passing the credentials in ServerConfigProperty
Summary
Can we access the ServerConfigProperty values outside the addin factory class?Content
Hi friends,
I have used the ServerConfigProperty to get login credentials for SOAP wsdl from add-in manager. I am able to get these values in workspace add-in class where I have set up factory components. But how do I pass these to a helper class where I am connecting to service cloud soap wsdl ? Any help would be appreciated.
Below is the code for both the classes:
I want to send the values for wsdlUsername and wsdlPassword.
Version
19CCode Snippet
WorkspaceAddin.cs>>>>> [ServerConfigProperty(DefaultValue = "username")] public string WSDLUsername { get { return _add_in_username; } set { _add_in_username = value; } } [ServerConfigProperty(DefaultValue = "password")] public string WSDLPassword { get { return _wsdl_pass; } set { _wsdl_pass = value; } } RightNowSoapHelper.cs>>>> public RightNowSoapHelper() { BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential); binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName; binding.MessageEncoding = WSMessageEncoding.Mtom; EndpointAddress endPointAddr = new EndpointAddress(WorkspaceAddIn._globalContext.GetInterfaceServiceUrl(ConnectServiceType.Soap));
2