首页 新闻 会员 周边 捐助

PHP怎么调用设置为wshttpbinding的VS.NET写的WCF

1
悬赏园豆:15 [已关闭问题] 关闭于 2012-09-08 13:50

PHP怎么调用设置为wshttpbinding的WCF

目前设置为BasicHttpBinding的已经调用成功,

$client = new SoapClient("DataCenter.svc?wsdl");

$sql = "SELECT id,email,firstname,lastname,password FROM `user`;";
$users = $db->get_results($sql);
foreach ( $users as $user )
{
$customer = array();
$customer['refId'] = $user->id;
$customer['email'] = $user->email;
$customer['userName'] = $user->email;
$customer['firstName'] = $user->firstname;
$customer['lastName'] = $user->lastname;
$customer['password'] = $user->password;
$customer['siteId'] = 1;

try
{
$result = $client->__call("RegisterCustomer",array($customer));
$registerSuccessful = $result->RegisterCustomerResult;

if($registerSuccessful ==0)
{
echo "注册成功".var_dump($registerSuccessful);
}
else
{
echo "失败".var_dump($registerSuccessful);
}
}
catch (SoapFault $fault)
{
$error = 1;
print("Sorry, blah returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring);
}
}

kaixin110的主页 kaixin110 | 初学一级 | 园豆:16
提问于:2011-04-13 14:37
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册