一
$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();
共同学习,写下你的评论
评论加载中...
作者其他优质文章