我正在尝试使用php soap客户端调用asp.net webservice。但没有成功。 以下是运行正确执行的Web服务的asp代码。
BASWebService webService = new BASWebService();
XmlDocument objInput = new XmlDocument();
objInput.Load(Server.MapPath("FuelDetails.xml"));
AuthenticationHeader authentication = new AuthenticationHeader();
authentication.Username = "LTAMSEDI";
authentication.Password = "LT@2015AMS";
authentication.strVendorCode = "V0021240";
string dsData1 = webService.GetEquipmentFuelData(objInput, authentication);
但我怎么能在php中使用我的php代码:
$data1 = file_get_contents('test_xml.xml');
$client = new SoapClient('https://net.lntecc.com/cms/services/BAS/BASWebService.asmx?WSDL', array('trace' => 1,'exceptions' => 0));
$ret = $client->GetEquipmentFuelData($data1, array('classmap' => array(
'AuthenticationHeader' => array('Username'=>'LTAMSEDI', 'Password'=>'LT@2015AMS', 'strVendorCode' => 'V0021240')
)));
var_dump($ret);
提前致谢.....