laravel-soap 使用
来源:互联网 发布:c语言双斜杠是什么意思 编辑:程序博客网 时间:2024/05/17 04:45
<?phpnamespace App\Http\Controllers;use SoapWrapper;class ApiController extends Controller{ public function demo() { SoapWrapper::add(function ($service) { $service ->name('currency') ->wsdl('http://127.0.0.1/terminal/trunk/api/soapwsdl.wsdl') ->header('http://127.0.0.1/terminal/trunk/soap/','Authentication',["username"=>"admin","pass"=>"admin"], false, SOAP_ACTOR_NEXT) ->trace(true); }); $string = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> <SOAP-ENV:Header><cwmp:ID SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next" SOAP-ENV:mustUnderstand="1">1</cwmp:ID> </SOAP-ENV:Header> <SOAP-ENV:Body><cwmp:Inform><DeviceId xsi:type="DeviceldStruct"><Manufacturer xsi:type="xsd:string">CYLIX</Manufacturer><OUI xsi:type="xsd:string">wmid</OUI><ProductClass xsi:type="xsd:string">CY-DZ1380</ProductClass><SerialNumber xsi:type="xsd:string">004201FF004188501442FCD5D901450H</SerialNumber></DeviceId><Event SOAP-ENC:arrayType="cwmp:EventStruct[1]"><EventStruct><EventCode xsi:type="xsd:string">1 BOOT</EventCode><CommandKey xsi:type="xsd:string"></CommandKey></EventStruct></Event><MaxEnvelopes xsi:type="xsd:unsignedInt">1</MaxEnvelopes><CurrentTime xsi:type="xsd:dateTime">2014-12-01T09:21:01+08:00</CurrentTime><RetryCount xsi:type="xsd:unsignedInt">0</RetryCount><ParameterList SOAP-ENC:arrayType="cwmp:ParameterValueStruct[22]"><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceInfo.HardwareVersion</Name><Value xsi:type="xsd:string">CY-DZ1380_1.0</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceInfo.SoftwareVersion</Name><Value xsi:type="xsd:string">53.1.6</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceInfo.AdditionalHardwareVersion</Name><Value xsi:type="xsd:string"></Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceInfo.AdditionalSoftwareVersion</Name><Value xsi:type="xsd:string"></Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.ManagementServer.ConnectionRequestURL</Name><Value xsi:type="xsd:string">http://192.168.1.109:7547</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.ManagementServer.ConnectionRequestUsername</Name><Value xsi:type="xsd:string">admin</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.ManagementServer.ConnectionRequestPassword</Name><Value xsi:type="xsd:string">admin</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceInfo.ModelName</Name><Value xsi:type="xsd:string">CY-DZ1380</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceInfo.Description</Name><Value xsi:type="xsd:string">SDMC STB</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceInfo.FirstUseDate</Name><Value xsi:type="xsd:string">2014-12-01 09:20:59</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceInfo.UpTime</Name><Value xsi:type="xsd:int">09:20:58</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.Time.NTPServer1</Name><Value xsi:type="xsd:string"></Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.LAN.DNSServers</Name><Value xsi:type="xsd:string">202.96.134.133</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.LAN.AddressingType</Name><Value xsi:type="xsd:string">DHCP</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.LAN.IPAddress</Name><Value xsi:type="xsd:string">192.168.1.109</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.LAN.MACAddress</Name><Value xsi:type="xsd:string">FC:D5:D9:01:7F:89</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.X_CMCC_OTV.STBInfo.STBID</Name><Value xsi:type="xsd:string">004201FF004188501442FCD5D901450H</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.X_CMCC_OTV.ServiceInfo.UserID</Name><Value xsi:type="xsd:string">user</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.X_CMCC_OTV.ServiceInfo.PPPoEID</Name><Value xsi:type="xsd:string"></Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.X_CMCC_OTV.ServiceInfo.AuthURL</Name><Value xsi:type="xsd:string">http://www.baidu.com</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceType</Name><Value xsi:type="xsd:string">STB</Value></ParameterValueStruct><ParameterValueStruct><Name xsi:type="xsd:string">Device.DeviceSummary</Name><Value xsi:type="xsd:string">This is a Mbox</Value></ParameterValueStruct></ParameterList></cwmp:Inform> </SOAP-ENV:Body></SOAP-ENV:Envelope>'; SoapWrapper::service('currency', function ($service) use ($string) { $s = $service->call('inform',['dd'=>$string]); print_r($s);exit;// $clean_xml = str_replace(['SOAP-ENV:', 'SOAP:','cwmp:'], '', $s);// $com = (array)simplexml_load_string($clean_xml);// print_r((array)$com['Body']->Inform->ParameterList);// foreach((array)$com['Body']->Inform->ParameterList as $k=>$v){// print_r($v);// } }); }}
0 0
- laravel-soap 使用
- [soap] -- soap简单使用
- 【soap】php中使用soap
- 演练:使用 SOAP 扩展更改 SOAP 消息
- HTTP+SOAP的使用
- SOAP Client(ActiveBEPL)使用
- 使用SOAP开发java
- 使用SOAP RPC 消息
- PHP使用SOAP
- SOAP UI 简单使用
- 使用SAAJ访问soap
- PHP SOAP 使用示例
- php soap 使用实例
- php soap的使用
- php soap 使用
- PHP的soap使用
- PHP 中使用 SOAP
- WebService开发 使用Soap
- OptionMenu布局问题
- 采用模态对话框交互时的变量传递
- POJ 2186 -- Popular Cows【强连通分支 && Tarjan缩点】
- Pipe - POJ 1039 几何
- android.os.NetworkOnMainThreadException(未开启子线程)
- laravel-soap 使用
- 求无向图割顶,桥,删除点后增加的连通块数
- 分分钟学会写简单的图片加载框架
- iframe图片上传
- 内容垂直、水平居中
- ssoj1933墨墨的等式(equ)
- wampserver localhost 403
- Ext.Net简单事件
- Quadtrees