C # komut dosyası görevi kullanan bir SSIS paketinde çalışıyorum. Hata ayıklama ve kayıt için web servisinden sabun isteğini/yanıtı almak istiyorum.
Şimdi daha önce hiç yapmak zorunda olmadığım bir şey burası ve nereye gideceğim ile biraz sıkışmış durumdayım.
Web servislerini ve oluşturulan proxy sınıfını destekleyen Net'i kullanıyorum.
Bununla ilgili herhangi bir yardım büyük beğeni topluyor.
İşte şu anki kodum:
public void Main()
{
try
{
DataTable dt = new DataTable();
OleDbDataAdapter oleDa = new OleDbDataAdapter();
ArrayList itemArray = new ArrayList();
ArrayList orderArray = new ArrayList();
oleDa.Fill(dt, Dts.Variables["User::ZBatch_Order_Export_ResultSet"].Value);
int i = 0;
foreach (DataRow row in dt.Rows)
{
orderArray.Add(ConstructOrderTransaction(row));
itemArray.Add(ConstructItemTransaction(row));
i++;
}
ZBatch_PublisherService.ZBatchPublisherServiceService ws = new ZBatchPublisherServiceService();
ZBatch_PublisherService.bcfItemTransaction[] itemObjects = itemArray.ToArray() as bcfItemTransaction[];
ZBatch_PublisherService.bcfOrderTransaction[] orderObjects = orderArray.ToArray() as bcfOrderTransaction[];
ZBatch_PublisherService.zBatchResults results = new zBatchResults();
results = ws.saveBatch(orderObjects, itemObjects);
Dts.TaskResult = (int)ScriptResults.Success;
}
catch (Exception e)
{
Dts.Events.FireError(0, "ZBatch - Script Task", e.Message.ToString(), string.Empty, 0);
//do some logging of this error message
}
}