继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

php 调用 .net webservice

绝地无双
关注TA
已关注
手记 333
粉丝 59
获赞 326


$client =  new soapclient('http://www.aaaaaa.com/WebService/AddOrderWebService.asmx?wsdl');

$parm=array('requestJson'=>json_encode($wbser),'createrID'=>$_SESSION['supUserCode']);

$result= $client->GetAddInnerOrder($parm);

$grtxt=$result->GetAddInnerOrderResult;



 $c =  new soapclient('http://supply.mesuca.com/WebService/AddOrderWebService.asmx?wsdl');

 $spam =array('requestJson'=> json_encode($sdarr));
 //file_put_contents('sdordergoods1.txt',  json_encode($sdarr));
 $flag = (array)$c->B2BOrder($spam);
 //file_put_contents('sdordergoods.txt', var_export($flag['B2BOrderResult'], true));

 if(intval($flag['B2BOrderResult'])==1)

 {


 }

  else

 {


 }


SoapDiscovery.class.php 生成 .wsdl

//生成wsdl文件,将上面的return注释
$fso = fopen($this->class_name . ".wsdl", "w");
fwrite($fso, sprintf('%s%s%s%s%s%s', $headerWSDL, $portTypeWSDL, $bindingWSDL, $serviceWSDL, $messageWSDL, '</definitions>'));

 //$SoapD =new SoapDiscovery('supply_order_web','supply_order_web');
 //$SoapD->getWSDL();  

   $server = new SoapServer('supply_web.wsdl', array('soap_version' => SOAP_1_2));
   $server->setClass("supply_web"); //注册Service类的所有方法
   $server->handle();

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP