PHP: Querying Dell AssetService webservice to retrieve asset information

If you are reading this article because you stumbled upon my blog looking for information on a completely unrelated subject, you'll probably wonder what this is about. On the other hand, if you were specifically looking for information on how to query Dell's AssetService via PHP, this post will tell you exactly what to do!

Sept. 2015 update: this tutorial no longer works since Dell have updated their systems. If you manage to make it work please let us know what you did!

Dell is one of the top IT hardware supplier for professionals. The organization I currently work for has been working with Dell for over a decade: we have hundreds of Dell laptops, desktop PCs, screens, videoprojectors and whatnot. As it turns out, Dell makes use of a particular serial code that is assigned to each of the products they manufacture: it's called the "service tag".


The service tag can be found in at least three locations:
- on a label physically stuck on the item (see above picture, the back of a laptop)
- in the BIOS or menus
- on the cardboard box when you receive the item

If you know the service tag of an item, you can visit Dell's support page, enter the service tag, and you'll find all sorts of information and detail specific not only to the hardware model, but also to your particular item (warranty information etc.). Now, if you want to be allowed to retrieve such information programmatically, say, from a PHP script, you would use the very simple script below:



Let me explain what this code does.

  1. The first line ($DELL_URL...) sets the path of Dell's web service, AssetService
  2. The second line (new SoapClient...) creates a new SoapClient object specifying the WSDL URL and the option to use the SOA Protocol v1.2
  3. The third line ($tag...) specifies the service tag of the item you want to retrieve information about
  4. The last line ($response...) performs the actual request to the web service. You'll note that we're passing a dummy GUID, and the "applicationName" is arbitrarily set to "AssetService". I don't think it these two parameters make any difference.
Past this code, the item information is contained in the $response object. What can you do with this object? Let's begin with a var_dump / print_r:

This long piece of plain text details the structure of the response; you can use the following code to retrieve the information it contains:

You'll note that the $response->GetAssetInformationResult->Asset->Entitlements->EntitlementData array contains multiple elements: I am not sure that this corresponds to, but the first of these items always seems to match our warranty information.

Thank you for reading this post. If you have any more questions feel free to comment!

Comments

Seth said…
The other entries under EntitlementData are for additional/expired warranties. It returns the complete warranty history.
Thanks Seth, also I figured out how to get data on multiple service tags in one query.

You just have to insert multiple service tag values separated with commas in the "serviceTags" query parameter. Neat!
Anonymous said…
It doesnt F*^%&# Work!
Allan said…
For more information on Web Development company, check out the info available online; these will help you learn to find the Website Design company.
Ned Polian said…
I simply want to tell you that I am new to weblog and definitely liked this blog site. Very likely I’m going to bookmark your blog . You absolutely have wonderful stories. Cheers for sharing with us your blog. what notebook should I buy
Unknown said…

This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing..
PHP Course in Chennai
fifacosmetic said…
nice post..and i think this post very helpfull for me
download mp3 terbaru dan terlengkap di download mp3 terbaru
download mp3 gratis di mp3doank.com
download mp3 tanpa ribet di download mp3 terbaru
download mp3 terlengkap di download mp3 terbaru
firmware samsung on zon3-android.net
cara flashing on zon3-android.net
apk android on zon3-android.net
aplikasi bbm on zon3-android.net
go jek on ojekgratis.com
grabbike on ojekgratis.com
gojek bandung on ojekgratis.com
gojek jakarta on ojekgratis.com
uber gratis, uber promo code,uber coupon on ubergratis.com
orang ganteng indonesia,
uber gratis on ubergratis.com
uber promo code on ubergratis.com
uber coupon on ubergratis.com
property sunter ON property-sunter.com
gudang sunter on property-sunter.com
rumah sunter on property-sunter.com
cara menghilangkan jerawat
cara menghilangkan jerawat

thanks alot :)

Popular posts from this blog

Affiliate module for Interspire Shopping Cart

How to fix: Outlook on iOS/iPhone: "No Internet Connection"

Dealing with Nginx 400 Bad Request HTTP errors