public void Init() { // initialize orderService orderService = new OrderService(); orderService.Credentials = new System.Net.NetworkCredential(WEBSERVICE_LOGIN, WEBSERVICE_PASSWORD); orderService.PreAuthenticate = true; orderService.Url = WEBSERVICE_URL; // initialize addresses TAddressNamed Address_in = new TAddressNamed(); Address_in.EMail = "*****@*****.**"; Address_in.FirstName = "Klaus"; Address_in.LastName = "Klaussen"; Address_in.Street = "Musterstraße 2"; Address_in.Street2 = "Ortsteil Niederfingeln"; TAttribute jobTitle = new TAttribute(); jobTitle.Name = "JobTitle"; jobTitle.Value = "best Job"; TAttribute salutation = new TAttribute(); salutation.Name = "Salutation"; salutation.Value = "Dr."; Address_in.Attributes = new TAttribute[] { jobTitle, salutation }; TAddressNamed Address_up = new TAddressNamed(); Address_up.FirstName = "Hans"; Address_up.LastName = "Hanssen"; Address_up.Street = "Musterstraße 2b"; Address_up.Street2 = "Ortsteil Oberfingeln"; //initialize order input data Order_in.Alias = alias; Order_in.Customer = customer; Order_in.BillingAddress = Address_in; Order_in.CreationDate = new DateTime(2006, 1, 1, 12, 0, 0, DateTimeKind.Local); Order_in.ViewedOn = new DateTime(2006, 1, 1, 23, 59, 0, DateTimeKind.Local); Order_in.ViewedOnSpecified = true; TAttribute OrderAttr_in = new TAttribute(); OrderAttr_in.Name = "Comment"; OrderAttr_in.Value = "my order comment"; Order_in.Attributes = new TAttribute[] { OrderAttr_in }; TProductLineItemIn Product_in = new TProductLineItemIn(); Product_in.Product = "/Shops/DemoShop/Products/ho_1112105010"; Product_in.Quantity = 10; TLineItemContainerIn lineItemContainer = new TLineItemContainerIn(); lineItemContainer.CurrencyID = "EUR"; lineItemContainer.PaymentMethod = "/Shops/DemoShop/PaymentMethods/Invoice"; lineItemContainer.ShippingMethod = "/Shops/DemoShop/ShippingMethods/Express"; lineItemContainer.TaxArea = "/TaxMatrixGermany/EU"; lineItemContainer.TaxModel = "gross"; lineItemContainer.ProductLineItems = new TProductLineItemIn[] { Product_in }; Order_in.LineItemContainer = lineItemContainer; //initialize order update data Order_up.Path = path; Order_up.BillingAddress = Address_up; Order_up.InProcessOn = new DateTime(2006, 1, 2, 0, 0, 0, DateTimeKind.Local); Order_up.InProcessOnSpecified = true; TAttribute OrderAttr_up = new TAttribute(); OrderAttr_up.Name = "Comment"; OrderAttr_up.Value = "my updated order comment"; Order_up.Attributes = new TAttribute[] { OrderAttr_up }; }
public void Init() { serviceClient = new OrderServiceClient(); // create test Orders that can be used with the create and update methods Order_in.Alias = alias; Order_in.Customer = "/Shops/DemoShop/Customers/1001"; Order_in.CreationDate = new DateTime(2006, 1, 1, 12, 0, 0, DateTimeKind.Local); Order_in.ViewedOn = new DateTime(2006, 1, 1, 23, 59, 0, DateTimeKind.Local); Order_in.ViewedOnSpecified = true; TProductLineItemIn productLineItem = new TProductLineItemIn(); productLineItem.Product = "/Shops/DemoShop/Products/ho_1112105010"; productLineItem.Quantity = 10; productLineItem.QuantitySpecified = true; TLineItemContainerIn lineItemContainer = new TLineItemContainerIn(); lineItemContainer.CurrencyID = "EUR"; lineItemContainer.PaymentMethod = "/Shops/DemoShop/PaymentMethods/Invoice"; lineItemContainer.ShippingMethod = "/Shops/DemoShop/ShippingMethods/Express"; lineItemContainer.TaxArea = "/TaxMatrixGermany/EU"; lineItemContainer.TaxModel = "gross"; lineItemContainer.ProductLineItems = new TProductLineItemIn[] { productLineItem }; Order_in.LineItemContainer = lineItemContainer; TAddress bill = new TAddress(); bill.FirstName = "Klaus"; bill.LastName = "Klaussen"; bill.Street = "Musterstraße 2"; bill.EMail = "*****@*****.**"; bill.Birthday = new DateTime(1976, 9, 25, 11, 33, 0, DateTimeKind.Local); bill.BirthdaySpecified = true; bill.VerifiedOn = new DateTime(2005, 1, 1, 0, 0, 0, DateTimeKind.Local); bill.VerifiedOnSpecified = true; Order_in.BillingAddress = bill; TAttribute attr = new TAttribute(); attr.Name = "Comment"; attr.Value = "my Order comment"; Order_in.Attributes = new TAttribute[] { attr }; Order_update.Path = path + alias; Order_update.CreationDate = new DateTime(2006, 1, 1, 2, 2, 2, DateTimeKind.Local); Order_update.CreationDateSpecified = true; Order_update.ViewedOn = new DateTime(2006, 1, 2, 0, 0, 0, DateTimeKind.Local); Order_update.ViewedOnSpecified = true; TAddress bill_update = new TAddress(); bill_update.FirstName = "Hans"; bill_update.LastName = "Hanssen"; bill_update.Street = "Musterstraße 2b"; bill_update.Birthday = new DateTime(1976, 9, 25, 11, 33, 0, DateTimeKind.Local); bill_update.BirthdaySpecified = true; bill_update.VerifiedOn = new DateTime(2005, 1, 1, 0, 0, 0, DateTimeKind.Local); bill_update.VerifiedOnSpecified = true; Order_update.BillingAddress = bill_update; TAttribute attr_update = new TAttribute(); attr_update.Name = "Comment"; attr_update.Value = "my updated Order comment"; Order_update.Attributes = new TAttribute[] { attr_update }; }
public void Init() { // initialize orderService orderService = new OrderService(); orderService.Credentials = new System.Net.NetworkCredential(WEBSERVICE_LOGIN, WEBSERVICE_PASSWORD); orderService.PreAuthenticate = true; orderService.Url = WEBSERVICE_URL; // initialize addresses TAddressNamed Address_in = new TAddressNamed(); Address_in.EMail = "*****@*****.**"; Address_in.FirstName = "Klaus"; Address_in.LastName = "Klaussen"; Address_in.Street = "Musterstraße 2"; Address_in.Street2 = "Ortsteil Niederfingeln"; TAttribute jobTitle= new TAttribute(); jobTitle.Name="JobTitle"; jobTitle.Value="best Job"; TAttribute salutation = new TAttribute(); salutation.Name="Salutation"; salutation.Value="Dr."; Address_in.Attributes = new TAttribute[]{jobTitle,salutation}; TAddressNamed Address_up = new TAddressNamed(); Address_up.FirstName = "Hans"; Address_up.LastName = "Hanssen"; Address_up.Street = "Musterstraße 2b"; Address_up.Street2 = "Ortsteil Oberfingeln"; //initialize order input data Order_in.Alias = alias; Order_in.Customer = customer; Order_in.BillingAddress = Address_in; Order_in.CreationDate = new DateTime(2006, 1, 1, 12, 0, 0, DateTimeKind.Local); Order_in.ViewedOn = new DateTime(2006, 1, 1, 23, 59, 0, DateTimeKind.Local); Order_in.ViewedOnSpecified = true; TAttribute OrderAttr_in = new TAttribute(); OrderAttr_in.Name = "Comment"; OrderAttr_in.Value="my order comment"; Order_in.Attributes = new TAttribute[] { OrderAttr_in }; TProductLineItemIn Product_in = new TProductLineItemIn(); Product_in.Product = "/Shops/DemoShop/Products/ho_1112105010"; Product_in.Quantity = 10; TLineItemContainerIn lineItemContainer = new TLineItemContainerIn(); lineItemContainer.CurrencyID = "EUR"; lineItemContainer.PaymentMethod = "/Shops/DemoShop/PaymentMethods/Invoice"; lineItemContainer.ShippingMethod = "/Shops/DemoShop/ShippingMethods/Express"; lineItemContainer.TaxArea = "/TaxMatrixGermany/EU"; lineItemContainer.TaxModel = "gross"; lineItemContainer.ProductLineItems = new TProductLineItemIn[]{Product_in}; Order_in.LineItemContainer = lineItemContainer; //initialize order update data Order_up.Path = path; Order_up.BillingAddress = Address_up; Order_up.InProcessOn = new DateTime(2006, 1, 2, 0, 0, 0, DateTimeKind.Local); Order_up.InProcessOnSpecified = true; TAttribute OrderAttr_up = new TAttribute(); OrderAttr_up.Name = "Comment"; OrderAttr_up.Value = "my updated order comment"; Order_up.Attributes = new TAttribute[] { OrderAttr_up }; }