【发布时间】:2021-02-04 04:56:10
【问题描述】:
我正在尝试提出一个肥皂请求,它需要具有这种结构
$requestBody=new sendDataExtraccionRequest(new sendDataExtraccionSubterranea("18-09-2020","00:02:01",1234567891,12345678.12,12345678.12),
new sendDataExtraccionSubterranea("18-09-2020","00:03:01",1234567891,12345678.12,12345678.12));
认为通过为每个对象创建一个数组然后进行强制转换应该可以,但是在肥皂调用中出现错误,表明日期字段丢失
$array_datos[] = new sendDataExtraccionSubterranea("03-02-2021","00:02:01",1234567891,12345678.12,12345678.12);
$array_datos[] = new sendDataExtraccionSubterranea("03-02-2021","00:03:01",1234567891,12345678.12,12345678.12);
$requestBody=new sendDataExtraccionRequest( (object)$array_datos );
还尝试了涉及json编码和解码数组的解决方案,但同样的错误
关于如何实现它的任何提示? 谢谢
【问题讨论】: