Example #1
0
 /**
  * When calling a method that exists in the WSDL but is not defined in the routes then throw SoapFault with expected message.
  */
 public function testWhenCallingAMethodThatExistsInTheWSDLButIsNotDefinedInTheRoutesThenThrowSoapFaultWithExpectedMessage()
 {
     $client = new \SoapClient(APP_URL . '/wsdl', ['cache_wsdl' => WSDL_CACHE_NONE, 'location' => APP_URL]);
     try {
         $response = $client->ping();
         static::fail('was expecting a SoapFault, got [' . serialize($response) . '] instead');
     } catch (\SoapFault $e) {
         static::assertEquals('Not Found', $e->getMessage());
     }
 }
Example #2
0
		 </div>
		 <div class="header-bottom" id="home">
			<div class="container" style="background: rgba(82, 220, 242, .7);">
			  <form action="ping.php" method="post" role="form"style="margin-bottom:20px;">
				<div class="form-group">
				  <p style="font-family: 'caviar_dreamsregular';color: #FFF;font-size: 2.7em;padding: 10px;width: 48%;margin: 0px auto 2%;" ><label for="usr">URL WSDL</label></p>
				  <input type="text" class="form-control" name ="url" id="usr">
				</div>
				<button type="submit" class="btn btn-default">Submit</button>
			  </form>
			  <?php 
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $wsdl = $_POST["url"];
    ini_set("soap.wsdl_cache_enabled", "0");
    $client = new SoapClient($wsdl, array('trace' => 1));
    echo "<h2>Ping: " . $client->ping() . "</h2>";
}
?>
			</div>
		 </div>
	</div>
	<!--end header-->
	  <div class="footer-bottom">
	  	<div class="container">
	  		<div class="copy">
			    <p>Template by  <a href="http://w3layouts.com" target="_blank"> w3layouts</a></p>
		    </div>
	  	</div>
	  </div>
	  <!--end contact-->