<?php try{ require_once ('lib/nusoap.php'); $client = new SoapClient("http://localhost:51732/Service1.svc?wsdl"); $params = array('value' => '10'); // Call web service PassMember methordd $webService = $client-> GetData($parms); $wsResult = $webService->GetDataResult(); print_r($wsResult); } catch (Exception $e) { echo 'Caught exception:', $e->getMessage(), "\n"; } ?>
namespace First { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together. public class Service1 : IService1 { public string GetData(int value) { return string.Format("You entered: {0}", value); } public CompositeType GetDataUsingDataContract(CompositeType composite) { if (composite == null) { throw new ArgumentNullException("composite"); } if (composite.BoolValue) { composite.StringValue += "Suffix"; } return composite; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)