Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region Namespaces
- using System;
- using System.Data;
- using Microsoft.SqlServer.Dts.Runtime;
- using System.Windows.Forms;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.ServiceModel;
- #endregion
- namespace ST_c9ff0d0cdf0a455e804af51f85eb8494
- {
- enum ScriptResults
- {
- Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
- Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure,
- };
- [Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]
- public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
- {
- public void Main()
- {
- var binding = new BasicHttpBinding();
- binding.Security.Mode = BasicHttpSecurityMode.Transport;
- binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
- binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Basic;
- binding.Security.Transport.Realm = "";
- binding.Security.Message.AlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.Default;
- var endpointAddress = new EndpointAddress("Web Service URL");
- dmvcrashns.RMSIntegrationServiceSoapClient soapClient = new dmvcrashns.RMSIntegrationServiceSoapClient(binding, endpointAddress);
- soapClient.ClientCredentials.UserName.UserName = "username";
- soapClient.ClientCredentials.UserName.Password = "password";
- dmvcrashns.FindLEApprovedCrashesRequest r = new dmvcrashns.FindLEApprovedCrashesRequest();
- r.pStart = new DateTime(2016, 09, 01);
- r.pEnd = new DateTime(2017, 01, 01);
- dmvcrashns.RMSIntegrationServiceSoapClient c = new dmvcrashns.RMSIntegrationServiceSoapClient();
- var resp = c.FindLEApprovedCrashes(new dmvcrashns.TREDSCredentials() {
- Password = "username",
- UserName = "password" },
- r.pStart, r.pEnd);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement