Hi
At work, we have been wanting to populate an internal IT asset database with warranty information from our major vendors Dell and HP.
I decided to write a VB.Net application that would use the Dell web service found at http://xserv.dell.com/services/assetservice.asmx.
This web service has one operation GetAssetInformation.
Here is the code. Note that this sample is a synchronous call.
The iData.Entitlements has one element in the array for each year warranty was renewed post purchase. For my purpose, I only require the current information. That is the reason I have exited the "For Each item" loop.
Hope this helps
Cheers
Iyer
Dim myGuid As Guid = Guid.NewGuid() 'create a new GUID
Dim applicationName As String = "AssetService" 'anything will work here
Dim oAssetServiceProxy As New DellServiceReference.AssetServiceSoapClient 'instantiate the proxy
Dim oData = oAssetServiceProxy.GetAssetInformation(myGuid, applicationName, "xxxxx") 'call the service
For Each iData In oData
ListBox1.Items.Add("System Mode : " + iData.AssetHeaderData.SystemModel)
ListBox1.Items.Add("System Ship Date : " + iData.AssetHeaderData.SystemShipDate)
ListBox1.Items.Add("System ID: " + iData.AssetHeaderData.SystemID)
For Each item In iData.Entitlements
ListBox1.Items.Add("Warranty Start Date: " + item.StartDate.ToLongDateString)
ListBox1.Items.Add("Warranty End Date: " + item.EndDate.ToLongDateString)
ListBox1.Items.Add("# of days Left : " + item.DaysLeft.ToString)
Exit For
Next
'ListBox1.Items.Add(iData.
Next
At work, we have been wanting to populate an internal IT asset database with warranty information from our major vendors Dell and HP.
I decided to write a VB.Net application that would use the Dell web service found at http://xserv.dell.com/services/assetservice.asmx.
This web service has one operation GetAssetInformation.
Here is the code. Note that this sample is a synchronous call.
The iData.Entitlements has one element in the array for each year warranty was renewed post purchase. For my purpose, I only require the current information. That is the reason I have exited the "For Each item" loop.
Hope this helps
Cheers
Iyer
Dim myGuid As Guid = Guid.NewGuid() 'create a new GUID
Dim applicationName As String = "AssetService" 'anything will work here
Dim oAssetServiceProxy As New DellServiceReference.AssetServiceSoapClient 'instantiate the proxy
Dim oData = oAssetServiceProxy.GetAssetInformation(myGuid, applicationName, "xxxxx") 'call the service
For Each iData In oData
ListBox1.Items.Add("System Mode : " + iData.AssetHeaderData.SystemModel)
ListBox1.Items.Add("System Ship Date : " + iData.AssetHeaderData.SystemShipDate)
ListBox1.Items.Add("System ID: " + iData.AssetHeaderData.SystemID)
For Each item In iData.Entitlements
ListBox1.Items.Add("Warranty Start Date: " + item.StartDate.ToLongDateString)
ListBox1.Items.Add("Warranty End Date: " + item.EndDate.ToLongDateString)
ListBox1.Items.Add("# of days Left : " + item.DaysLeft.ToString)
Exit For
Next
'ListBox1.Items.Add(iData.
Next