当前位置:网站首页>How do I dump SoapClient requests for debugging- How to dump SoapClient request for debug?
How do I dump SoapClient requests for debugging- How to dump SoapClient request for debug?
2022-07-07 02:19:00 【javail】
problem :
I need to debug some code which uses soap client. I need to debug some usage soap Client code .I found getLast* methods in php.net, but when I try to get last request for debug it returns NULL I am here php.net Found in the getLast* Method , But when I try to get the last debug request , It returns NULL
<?php $client = new SoapClient("http://www.webservicex.net/ConverPower.asmx?WSDL"); $response = $client->ChangePowerUnit(array( "PowerValue" => 100, "fromPowerUnit" => "horsepower", "toPowerUnit" => "megawatts" )); echo "====== REQUEST HEADERS =====" . PHP_EOL; var_dump($client->__getLastRequestHeaders()); echo "========= REQUEST ==========" . PHP_EOL; var_dump($client->__getLastRequest()); echo "========= RESPONSE =========" . PHP_EOL; var_dump($response);?>
The result of code execution: Code execution result :
$php soap_test.php ====== REQUEST HEADERS =====NULL========= REQUEST ==========NULL========= RESPONSE =========object(stdClass)#2 (1) { ["ChangePowerUnitResult"]=> float(0.0746)}
How to get the content of body and headers of the last SoapClient request? How to get the last one SoapClient The content of the body and title of the request ?
Solution :
Reference resources : https://stackoom.com/en/question/wru0边栏推荐
- 豆瓣平均 9.x,分布式领域的 5 本神书!
- centos8安装mysql报错:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
- ROS学习(26)动态参数配置
- 将截断字符串或二进制数据
- Treadpoolconfig thread pool configuration in real projects
- Schedulx v1.4.0 and SaaS versions are released, and you can experience the advanced functions of cost reduction and efficiency increase for free!
- ROS learning (XIX) robot slam function package cartographer
- Chang'an chain learning notes - certificate model of certificate research
- String or binary data will be truncated
- Lumion 11.0软件安装包下载及安装教程
猜你喜欢
ROS学习(26)动态参数配置
Flir Blackfly S工业相机:颜色校正讲解及配置与代码设置方法
ROS learning (24) plugin
FLIR blackfly s industrial camera: synchronous shooting of multiple cameras through external trigger
ROS学习(二十)机器人SLAM功能包——rgbdslam的安装与测试
Lidar: introduction and usage of ouster OS
The last line of defense of cloud primary mixing department: node waterline design
go swagger使用
机器人队伍学习方法,实现8.8倍的人力回报
2022/0524/bookstrap
随机推荐
大咖云集|NextArch基金会云开发Meetup来啦!
Blackfly S USB3工业相机:缓冲区处理
ROS学习(24)plugin插件
Treadpoolconfig thread pool configuration in real projects
【服务器数据恢复】raid损坏导致戴尔某型号服务器崩溃的数据恢复案例
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
阿里云中间件开源往事
centos8 用yum 安装MySQL 8.0.x
Chang'an chain learning notes - certificate model of certificate research
传感器:DS1302时钟芯片及驱动代码
Centros 8 installation MySQL Error: The gpg Keys listed for the "MySQL 8.0 Community Server" repository are already ins
Redis configuration class redisconfig
Twenty or thirty thousand a leaf? "Yang Mou" behind the explosion of plant consumption
6 seconds to understand the book to the Kindle
Dall-E Mini的Mega版本模型发布,已开放下载
Sensor: introduction of soil moisture sensor (xh-m214) and STM32 drive code
The GPG keys listed for the "MySQL 8.0 community server" repository are already ins
Cisp-pte practice explanation (II)
Blackfly s usb3 industrial camera: buffer processing
Zabbix 5.0:通过LLD方式自动化监控阿里云RDS