The interface requires xml, but I cannot use xml data until "The object reference is not set to the instance of the object. & Quot; the returned value is returned only when xml is used for conversion, but it seems that the interface has not received the parameter & quot; the basic information of the packet header group is incomplete, "ini_set (& quot; soap. wsdl_cache_enabled & quot;, & quot; 0 & quot;); header (& quot; content-type: texthtml; charsetutf-8 & quot;); $ url & #39; http: PHP Java encoding for soap objects
The interface requires xml, but I cannot use xml data until "The object reference is not set to the instance of the object. ", The return value is returned only when the conversion is made in xml, but it seems that the interface has not received the parameter." The basic information of the packet header group is incomplete. The group code, user, and password are required"
Ini_set ("soap. wsdl_cache_enabled", "0 ");
Header ("content-type: text/html; charset = utf-8 ");
$url = 'http://221.179.7.250/NGADCInfcText/NGADCServicesForEC.svc?wsdl'; $client = new \SoapClient($url,array( 'soap_version'=>SOAP_1_1, 'trace'=>1, 'classmap' => array('Person' => "Person", 'PersonList' => "PersonList"))); $client->soap_defencoding = 'utf-8'; $client->decode_utf8 = false; $client->xml_encoding = 'utf-8'; $arr = array( 'OrigDomain' => 'NGEC', 'BIPCode' => 'EC0001', 'BIPVer' => 'V1.0', 'TransIDO' => 'NG'.rand(11,99).date('YmdHis',time()).rand(1,9), 'Areacode' => 'GZ', 'ECCode' => '200000426', 'ECUserName' => 'yangjie@2002219673', 'ECUserPwd' => md5('a3spmr3c'), 'ProcessTime'=> date('YmdHis',time()), );
$ Xml = new \ SimpleXMLElement ('');
$ This-> _ data2xml ($ xml, $ arr );
$ Str = $ xml-> asXML ();
// $ Xml = $ this-> array2xml ($ arr );
/// Convert xml into an object
// $ Dom = new \ domDocument;
// $ Dom-> loadXML ($ xml );
// $ Obj = simplexml_import_dom ($ dom );
// Echo'
';
// Print_r ($ client->GetFunctions ());
// Print_r ($ client->GetTypes ());Dump ($ str );
$ Res = $ client-> _ Call ('adcservice', array ('ngec' => $ str )));
This is my method.