Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Main()
- {
- // TODO: Add your code here
- // TODO: Add your code here
- MessageBox.Show((string)Dts.Variables["ServiceDateStart"].Value);
- string userName = "xxx";
- string password = "xxx";
- string licenceID = "xxx";
- ServiceReference.AuthenticationHeader a = new ServiceReference.AuthenticationHeader();
- a.LicenceID = new Guid(licenceID);
- a.UserName = userName;
- a.Password = password;
- ServiceReference.CompanyAccountXmlServiceSoapClient service = new ServiceReference.CompanyAccountXmlServiceSoapClient();
- string result;
- long numberOfResults;
- int counter1 = 0;
- int counter2 = 19;
- do
- {
- result = service.GetCompanyAccountUpdated(a, (string)Dts.Variables["ServiceDateStart"].Value, (string)Dts.Variables["ServiceDateEnd"].Value, counter1, counter2);
- //result = service.GetCompanyAccountUpdated(a, "20150101", "20150107", counter1, counter2);
- counter1 = counter1 + 20;
- counter2 = counter2 + 20;
- using (System.IO.StreamWriter file =
- new System.IO.StreamWriter(@"C:UsersjkrnetaDocumentsGetCompanyAccountUpdated.txt", true))
- {
- file.WriteLine(result);
- }
- } while (!result.Equals("<CompanyAccountDataSet />"));
- Dts.TaskResult = (int)ScriptResults.Success;
- }
- ServiceReference.CompanyAccountXmlServiceSoapClient service = new ServiceReference.CompanyAccountXmlServiceSoapClient();
- <?xml version="1.0" encoding="utf-8" ?>
- <configuration>
- <system.serviceModel>
- <bindings>
- <basicHttpBinding>
- <binding name="CompanyAccountXmlServiceSoap">
- <security mode="Transport" />
- </binding>
- <binding name="CompanyAccountXmlServiceSoap1" />
- </basicHttpBinding>
- </bindings>
- <client>
- <endpoint address="https://webservices.nbs.rs/CommunicationOfficeService1_0/CompanyAccountXmlService.asmx"
- binding="basicHttpBinding" bindingConfiguration="CompanyAccountXmlServiceSoap"
- contract="ServiceReference.CompanyAccountXmlServiceSoap" name="CompanyAccountXmlServiceSoap" />
- </client>
- </system.serviceModel>
- </configuration>
- ServiceReference.CompanyAccountXmlServiceSoapClient service =
- new ServiceReference.CompanyAccountXmlServiceSoapClient("CompanyAccountXmlServiceSoap");
- Reload the service reference of your project.
- service.Endpoint.Address = new System.ServiceModel.EndpointAddress("https://webservices.nbs.rs/CommunicationOfficeService1_0/CompanyAccountXmlService.asmx");
- EndpointAddress endpointAdress = new
- EndpointAddress("https://webservices.nbs.rs/CommunicationOfficeService1_0/CompanyAccountXmlService.asmx");
- BasicHttpBinding binding1 = new BasicHttpBinding();
- binding1.Security.Mode = BasicHttpSecurityMode.Transport;
- ServiceReference1.NetSuitePortTypeClient client = new ServiceReference1.NetSuitePortTypeClient(binding1, endpointAdress);
Add Comment
Please, Sign In to add comment