<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RomanT.net &#187; labmanager 4.0</title>
	<atom:link href="http://blog.romant.net/tag/labmanager-4-0/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.romant.net</link>
	<description>… hilariously not funny</description>
	<lastBuildDate>Fri, 25 Nov 2011 01:09:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>SOAP wrapper for LabManager written in PHP</title>
		<link>http://blog.romant.net/technology/soap-wrapper-for-labmanager-in-php/</link>
		<comments>http://blog.romant.net/technology/soap-wrapper-for-labmanager-in-php/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 13:49:30 +0000</pubDate>
		<dc:creator>Roman Tarnavski</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[labmanager 4.0]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[soap]]></category>

		<guid isPermaLink="false">http://www.romant.net/?p=268</guid>
		<description><![CDATA[SOAP wrapper for LabManager written in PHP]]></description>
			<content:encoded><![CDATA[<p>LabManager is a great product for when you have to deal with provisioning of images in a hands-off fashion from the IT team. If you&#8217;re already a vSphere shop, users don&#8217;t need access to a vSphere client and can manage the lifecycle of their machines through the browser (Windows only though for the console).</p>
<p>For what I&#8217;m building, I needed access to the API provided by VMware, and unfortunately, it is only provided as a SOAP interface. The documentation is a given, although it is of quite a poor standard. Since case-sensitivity is a must, not to mention <a href="http://twitter.com/romant/status/4496796125">correct parameters</a>.</p>
<p>So how do we go about creating an easy to use PHP page which would consume the .NET WebService?</p>
<p><code>&lt;?php</p>
<p>$namespace = "http://vmware.com/labmanager";</p>
<p>$soap_dat["username"] = "user";<br />
$soap_dat["password"] = "password";<br />
$soap_dat["organizationname"] = "org";<br />
$soap_dat["workspacename"] = "cake";</p>
<p>$client = new SoapClient("https://server_name/LabManager/SOAP/LabManager.asmx?wsdl");</p>
<p>$header = new SOAPHeader($namespace, 'AuthenticationHeader', $soap_dat);</p>
<p>$client-&gt;__setSoapHeaders($header);</p>
<p>$config["configurationType"] = "1";</p>
<p>$result = $client-&gt;ListConfigurations($config);</p>
<p></code></p>
<p><code>print_r($result);</code></p>
<p>?&gt;</p>
<p>After using some of the methods, I decided to write a wrapper for the LabManager&#8217;s API, so I could use it within other applications we develop inhouse. You can then call this directly from the command line, and integrate it with your bash/perl &#8211; and not have to re-invent the wheel.</p>
<p>As such &#8211; I present to you <a href="http://code.google.com/p/phlabmanager">phLabManager</a> &#8211; &#8220;Simple, lightweight wrapper for LabManager 4.0 SOAP API&#8221; written in PHP.</p>
<p>Once you&#8217;ve grabbed the labmanager.php, you can write quite succinct calls directly to the methods, without worrying about the implementation. There&#8217;s an <a href="http://code.google.com/p/phlabmanager/wiki/HowTo">example</a> on usage available.</p>
<p>I haven&#8217;t finished implementing all the methods, and in the coming days will endeavour to do so, alternatively &#8211; you can do it, and commit into the tree. It would be great to get some help in optimizing my rough implementation.<!-- PHP 5.x --></p>

	Tags: <a href="http://blog.romant.net/tag/net/" title=".net" rel="tag">.net</a>, <a href="http://blog.romant.net/tag/labmanager-4-0/" title="labmanager 4.0" rel="tag">labmanager 4.0</a>, <a href="http://blog.romant.net/tag/php/" title="php" rel="tag">php</a>, <a href="http://blog.romant.net/tag/soap/" title="soap" rel="tag">soap</a><br />
]]></content:encoded>
			<wfw:commentRss>http://blog.romant.net/technology/soap-wrapper-for-labmanager-in-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

