shelzmike
-
Total Posts
:
1
- Scores: 0
-
Reward points
:
0
- Joined: 9/7/2010
-
Status: offline
|
Where to even start - multiple command line exe's that interact with webservices.
Tuesday, September 07, 2010 7:06 AM
( permalink)
H ello! This is my first post here and I was not sure where the appropriate place was for this post. Hopefully it is here. Anyhow, I am the IT Specialist for a Dish Network Regional Service Provider and we currently use our own 3rd party customer management system that is cloud-based. They offer pretty good reports; however, we need special reports and the only way to do this is to download our database though web services that the vendor offers. I have some education and experience with programming, but it has been a while. Instead of having to actively engage the webservices directly, our vendor has offered a stepping stone. They have a command line exe that interacts with the webservices and, with the use of different parameters, gets us to the point of having all the data downloaded in xml, csv, or screen printed - the only problem is that it will only do this a table at a time and there are 43 tables I need to interact with. I need to build something that can either be a console application or something that can be run automatically in the middle of the night when there is no load on the server. Here is what I need to happen: The command is CMSDownload.exe. It needs to login (again, there are already parameters set up to do this so I can hard code that into the script) Once logged in, the script needs to check a parameter that has been saved that signifies the last date of successful completion. (Obviously, it needs somewhere in the code to place this parameter also). As I mentioned before, each table needs to be downloaded into its own xml file individually. For instance, the following is one example of a table being downloaded in this fashion: Generate an XML file of all of the data in the accounts table between '01/15/2009 09:13:34 AM' and 01/16/2009. CMSDownload -d somedn -u someusername -p somepassword -f c:\temp\accounts.xml -m xml -o all -t accounts -s 'start date' -e 'end date' -d is a login component (credentials) -u is a login component (username) -p is a login component (password) -f is the file parameter (this should be the same directory at each iteration, but a different file name each time - for instance, the account table would be account.xml, the customer table would be customer.xml, etc.) -m is the media type (this will always be xml) -o is the operation and will always be 'all' in this application -t is the table name -s is the start date -e is the end date These are the only parameters needed for this application. The only thing that will change is the table name and thus the file name. There are 43 different tables and they are: Tables: accounts, invoice, transactions, campaigns, leads, invoicestatushistory, loginhistory, appointment, area, employee, invoice_line_item, notes, dnscodes, dnscommissions, roles, promotions, inventoryitem, equipmentitem, equipmentmaster, syncdatastats, rmadetails, basepackage, basepackageprice, basepackageprogramming, customerprogramming, dnsfunding, funding, item, kitconfigreceivers, kitconfi gs, kits, programming, programmingcategory, promokits, invoicetypes, accountupgrades, upgradeoptions , emergencycontact, provider, deletedrecords, arearights, payroll, receivertype So the following is what I ultimately need the script to do, but am sure there is an easier way to update the dynamic information other than hardcoding: CMSDownload -d somedn -u someusername -p somepassword -f c:\temp\accounts.xml -m xml -o all -t accounts -s 'start date' -e 'end date' CMSDownload -d somedn -u someusername -p somepassword -f c:\temp\invoice.xml -m xml -o all -t invoice -s 'start date' -e 'end date' CMSDownload -d somedn -u someusername -p somepassword -f c:\temp\transactions.xml -m xml -o all -t transactions -s 'start date' -e 'end date' etc. Can this be done easily? Thanks! Mike
<message edited by shelzmike on Tuesday, September 07, 2010 7:09 AM>
|