<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic MSM760 Soap Call returning an unexpected response in M and MSM Series</title>
    <link>https://community.hpe.com/t5/m-and-msm-series/msm760-soap-call-returning-an-unexpected-response/m-p/2346039#M27</link>
    <description>&lt;P&gt;Good evening,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;I'm trying to work out a simple proof of concept monitoring/data collection system using soap. I'm starting off with some basic HP provided PHP samples. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm trying to poll an MSM760 to report the status of its controlled APs, everytime I call&amp;nbsp;ControlledNetworkGetDiscoveredAPStatus it returns a bad response and fails&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;$rc = $c-&amp;gt;ControlledNetworkGetDiscoveredAPStatus("Group", "Default Group", "All_States");&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Results in&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;string: &amp;lt;Validation constraint violation: tag name or namespace mismatch in element &amp;lt;param1&amp;gt;&amp;gt;
code:   &amp;lt;SOAP-ENV:Client&amp;gt; &lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;I'm using the HP supplied WDSL and&amp;nbsp;soapapi-inc.php of like versions&lt;BR /&gt;&lt;BR /&gt;Attached is my code,&lt;BR /&gt;Thanks for any insight into this, I've called everything according to examples and its getting frustrating :O&lt;BR /&gt;&lt;BR /&gt;As a side note... I can call other controlled mode related items just fine eg.&lt;/P&gt;&lt;PRE&gt;$rc = $c-&amp;gt;ControlledNetworkGetGroupList();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;results in the list of groups on the controller.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EDIT: Wouldn't attach my file so I've embeded it...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php
	// Copyright Colubris Network Inc. 2008 */

	// This code is provided "as is", without any warranty of any kind, either
	// expressed or implied, including but not limited to, any implied warranty
	// of merchantibility or fitness for any purpose.
	// In no event will Colubris Networks Inc. or any party who distributed
	// the code be liable for damages or for any claim(s) by any other party,
	// including but not limited to, any lost profits, lost data or data rendered
	// inaccurate, losses sustained by third parties, or any other special,
	// incidental or consequential damages arising out of the use or inability to
	// use the program, even if the possibility of such damages has been advised
	// against.
	// The entire risk as to the quality, the performance, and the fitness of the
	// program for any particular purpose lies with the party using the code.
	//
	// It is possible that the provided example script may not work with your
	// specific combination of Colubris software and the SOAP client toolkit.
	// The example script is known to work with  certain versions of the software
	// and SOAP.
	// When possible, we will specify which versions of software and SOAP are known
	// to work with the example.
	// The main purpose of the example is to give you a general idea of how to
	// write a SOAP client application and, therefore, even if the example does
	// not work with your software, the example script still provides many valuable
	// clues as to how such scripts should be written.

	require_once("soapapi-inc.php");

	// connection settings
	define("SOAPAPI_PROTO", "https");
	define("SOAPAPI_HOST", "192.168.1.1");
	define("SOAPAPI_PORT", "448");
	define("SOAPAPI_FORMAT", "%s://%s:%d/SOAP");
	define("SOAPAPI_WSDL_FILE", "soapapi.wsdl");

	// SSL settings
	define("SOAPAPI_CLIENT_CERT", "x509/soap-api-client.crt");
	define("SOAPAPI_CLIENT_CERT_PASSPHRASE", "soap-api-client");

	// defining some useful constants.
	define("REQUIRED_API_VERSION", "2.6.0");
	define("VAP_GLOBAL", "Global");
	define("EQUIPMENT_ID", "EQPT_1");
	define("COUNTRY_CODE", "CANADA");

	// clearing WSDL cache in the case the WSDL
	// file would have changed.
	SoapApi::ClearWSDLCache();

	try {
		// creating target URL
		$url = sprintf(SOAPAPI_FORMAT, SOAPAPI_PROTO, SOAPAPI_HOST, SOAPAPI_PORT);
		echo "connecting to " . SOAPAPI_HOST . " using " . SOAPAPI_PROTO . "\n";

		if (strcmp("http", SOAPAPI_PROTO) == 0) {
			$c = new SoapApi(SOAPAPI_WSDL_FILE, array(	'location' =&amp;gt; $url ,
														'proxy_host' =&amp;gt; SOAPAPI_HOST,
														'proxy_port' =&amp;gt; SOAPAPI_PORT 
													 )
							);
							
		} else if (strcmp("https", SOAPAPI_PROTO) == 0) {
			// creating a new SoapApi object. A fault will be raised if unsucessul.
			$c = new SoapApi(SOAPAPI_WSDL_FILE, array( 'location' =&amp;gt; $url,
													   'local_cert' =&amp;gt; SOAPAPI_CLIENT_CERT,
													   'passphrase' =&amp;gt; SOAPAPI_CLIENT_CERT_PASSPHRASE
													 )
							) or die("Failed casting");	
		} else {
			echo "unknown protocol &amp;lt;" . SOAPAPI_PROTO . "&amp;gt;\n";
			exit(1);
		}

		echo "Retrieving SOAP API version...\n";
		$rc = $c-&amp;gt;soapGetSOAPVersion();
		if (strcmp($rc-&amp;gt;version, REQUIRED_API_VERSION) != 0) {
			printf("Incorrect SOAP API version found: &amp;lt;%s&amp;gt; - expecting &amp;lt;%s&amp;gt;\n",
				   $rc-&amp;gt;version,
				   REQUIRED_API_VERSION
				  );
			exit(1);
		}

		//Print system name/ip
		$rc = $c-&amp;gt;GetSNMPInterface();
			echo "&amp;lt;b&amp;gt;".$rc-&amp;gt;systemName."&amp;lt;/b&amp;gt;\n&amp;lt;br&amp;gt;".$SOAPAPI_HOST."\n&amp;lt;br&amp;gt;";
		
		//Print basic system info
		$rc = $c-&amp;gt;GetSystemInfo();
			echo $rc-&amp;gt;productName . " : " . $rc-&amp;gt;firmwareRevision . " : " . $rc-&amp;gt;serialNumber."\n&amp;lt;br&amp;gt;";
		
		$rc = $c-&amp;gt;ControlledNetworkGetGroupList();
		if(count($rc-&amp;gt;result-&amp;gt;item)&amp;gt;0){
		echo "&amp;lt;ul&amp;gt;\n";
			foreach($rc-&amp;gt;result-&amp;gt;item as $groupname){
				echo "&amp;lt;li&amp;gt;".$groupname-&amp;gt;grpName."&amp;lt;/li&amp;gt;\n";
			}
		echo "&amp;lt;/ul&amp;gt;\n";
		}
		
		$rc = $c-&amp;gt;ControlledNetworkGetDiscoveredAPStatus("Group", "Default Group", "All_States");
		print_r($rc);

		
		
	} catch (SoapFault $fault) {
		// displaying fault.
		printf("string: &amp;lt;%s&amp;gt;\n",  $fault-&amp;gt;faultstring);
		printf("code:   &amp;lt;%s&amp;gt;\n",  $fault-&amp;gt;faultcode);
		printf("actor:  &amp;lt;%s&amp;gt;\n",  $fault-&amp;gt;error_message_prefix);
		printf("detail: &amp;lt;%s&amp;gt;\n",  $fault-&amp;gt;userinfo);

		// terminating and returning an error.
		exit(1);
	}

?&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jan 2011 01:52:56 GMT</pubDate>
    <dc:creator>Master_lain</dc:creator>
    <dc:date>2011-01-18T01:52:56Z</dc:date>
    <item>
      <title>MSM760 Soap Call returning an unexpected response</title>
      <link>https://community.hpe.com/t5/m-and-msm-series/msm760-soap-call-returning-an-unexpected-response/m-p/2346039#M27</link>
      <description>&lt;P&gt;Good evening,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;I'm trying to work out a simple proof of concept monitoring/data collection system using soap. I'm starting off with some basic HP provided PHP samples. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm trying to poll an MSM760 to report the status of its controlled APs, everytime I call&amp;nbsp;ControlledNetworkGetDiscoveredAPStatus it returns a bad response and fails&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;$rc = $c-&amp;gt;ControlledNetworkGetDiscoveredAPStatus("Group", "Default Group", "All_States");&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Results in&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;string: &amp;lt;Validation constraint violation: tag name or namespace mismatch in element &amp;lt;param1&amp;gt;&amp;gt;
code:   &amp;lt;SOAP-ENV:Client&amp;gt; &lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;I'm using the HP supplied WDSL and&amp;nbsp;soapapi-inc.php of like versions&lt;BR /&gt;&lt;BR /&gt;Attached is my code,&lt;BR /&gt;Thanks for any insight into this, I've called everything according to examples and its getting frustrating :O&lt;BR /&gt;&lt;BR /&gt;As a side note... I can call other controlled mode related items just fine eg.&lt;/P&gt;&lt;PRE&gt;$rc = $c-&amp;gt;ControlledNetworkGetGroupList();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;results in the list of groups on the controller.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EDIT: Wouldn't attach my file so I've embeded it...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php
	// Copyright Colubris Network Inc. 2008 */

	// This code is provided "as is", without any warranty of any kind, either
	// expressed or implied, including but not limited to, any implied warranty
	// of merchantibility or fitness for any purpose.
	// In no event will Colubris Networks Inc. or any party who distributed
	// the code be liable for damages or for any claim(s) by any other party,
	// including but not limited to, any lost profits, lost data or data rendered
	// inaccurate, losses sustained by third parties, or any other special,
	// incidental or consequential damages arising out of the use or inability to
	// use the program, even if the possibility of such damages has been advised
	// against.
	// The entire risk as to the quality, the performance, and the fitness of the
	// program for any particular purpose lies with the party using the code.
	//
	// It is possible that the provided example script may not work with your
	// specific combination of Colubris software and the SOAP client toolkit.
	// The example script is known to work with  certain versions of the software
	// and SOAP.
	// When possible, we will specify which versions of software and SOAP are known
	// to work with the example.
	// The main purpose of the example is to give you a general idea of how to
	// write a SOAP client application and, therefore, even if the example does
	// not work with your software, the example script still provides many valuable
	// clues as to how such scripts should be written.

	require_once("soapapi-inc.php");

	// connection settings
	define("SOAPAPI_PROTO", "https");
	define("SOAPAPI_HOST", "192.168.1.1");
	define("SOAPAPI_PORT", "448");
	define("SOAPAPI_FORMAT", "%s://%s:%d/SOAP");
	define("SOAPAPI_WSDL_FILE", "soapapi.wsdl");

	// SSL settings
	define("SOAPAPI_CLIENT_CERT", "x509/soap-api-client.crt");
	define("SOAPAPI_CLIENT_CERT_PASSPHRASE", "soap-api-client");

	// defining some useful constants.
	define("REQUIRED_API_VERSION", "2.6.0");
	define("VAP_GLOBAL", "Global");
	define("EQUIPMENT_ID", "EQPT_1");
	define("COUNTRY_CODE", "CANADA");

	// clearing WSDL cache in the case the WSDL
	// file would have changed.
	SoapApi::ClearWSDLCache();

	try {
		// creating target URL
		$url = sprintf(SOAPAPI_FORMAT, SOAPAPI_PROTO, SOAPAPI_HOST, SOAPAPI_PORT);
		echo "connecting to " . SOAPAPI_HOST . " using " . SOAPAPI_PROTO . "\n";

		if (strcmp("http", SOAPAPI_PROTO) == 0) {
			$c = new SoapApi(SOAPAPI_WSDL_FILE, array(	'location' =&amp;gt; $url ,
														'proxy_host' =&amp;gt; SOAPAPI_HOST,
														'proxy_port' =&amp;gt; SOAPAPI_PORT 
													 )
							);
							
		} else if (strcmp("https", SOAPAPI_PROTO) == 0) {
			// creating a new SoapApi object. A fault will be raised if unsucessul.
			$c = new SoapApi(SOAPAPI_WSDL_FILE, array( 'location' =&amp;gt; $url,
													   'local_cert' =&amp;gt; SOAPAPI_CLIENT_CERT,
													   'passphrase' =&amp;gt; SOAPAPI_CLIENT_CERT_PASSPHRASE
													 )
							) or die("Failed casting");	
		} else {
			echo "unknown protocol &amp;lt;" . SOAPAPI_PROTO . "&amp;gt;\n";
			exit(1);
		}

		echo "Retrieving SOAP API version...\n";
		$rc = $c-&amp;gt;soapGetSOAPVersion();
		if (strcmp($rc-&amp;gt;version, REQUIRED_API_VERSION) != 0) {
			printf("Incorrect SOAP API version found: &amp;lt;%s&amp;gt; - expecting &amp;lt;%s&amp;gt;\n",
				   $rc-&amp;gt;version,
				   REQUIRED_API_VERSION
				  );
			exit(1);
		}

		//Print system name/ip
		$rc = $c-&amp;gt;GetSNMPInterface();
			echo "&amp;lt;b&amp;gt;".$rc-&amp;gt;systemName."&amp;lt;/b&amp;gt;\n&amp;lt;br&amp;gt;".$SOAPAPI_HOST."\n&amp;lt;br&amp;gt;";
		
		//Print basic system info
		$rc = $c-&amp;gt;GetSystemInfo();
			echo $rc-&amp;gt;productName . " : " . $rc-&amp;gt;firmwareRevision . " : " . $rc-&amp;gt;serialNumber."\n&amp;lt;br&amp;gt;";
		
		$rc = $c-&amp;gt;ControlledNetworkGetGroupList();
		if(count($rc-&amp;gt;result-&amp;gt;item)&amp;gt;0){
		echo "&amp;lt;ul&amp;gt;\n";
			foreach($rc-&amp;gt;result-&amp;gt;item as $groupname){
				echo "&amp;lt;li&amp;gt;".$groupname-&amp;gt;grpName."&amp;lt;/li&amp;gt;\n";
			}
		echo "&amp;lt;/ul&amp;gt;\n";
		}
		
		$rc = $c-&amp;gt;ControlledNetworkGetDiscoveredAPStatus("Group", "Default Group", "All_States");
		print_r($rc);

		
		
	} catch (SoapFault $fault) {
		// displaying fault.
		printf("string: &amp;lt;%s&amp;gt;\n",  $fault-&amp;gt;faultstring);
		printf("code:   &amp;lt;%s&amp;gt;\n",  $fault-&amp;gt;faultcode);
		printf("actor:  &amp;lt;%s&amp;gt;\n",  $fault-&amp;gt;error_message_prefix);
		printf("detail: &amp;lt;%s&amp;gt;\n",  $fault-&amp;gt;userinfo);

		// terminating and returning an error.
		exit(1);
	}

?&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2011 01:52:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/m-and-msm-series/msm760-soap-call-returning-an-unexpected-response/m-p/2346039#M27</guid>
      <dc:creator>Master_lain</dc:creator>
      <dc:date>2011-01-18T01:52:56Z</dc:date>
    </item>
  </channel>
</rss>

