PHP SoapClient creating XML references for identical elements, makes it unacceptable for service

前端 未结 4 979
北恋
北恋 2020-12-19 08:17

I am working on a SOAP client in PHP, and the calls are going through to the service fine, with the exception of calls where there are elements that are identical to each ot

4条回答
  •  失恋的感觉
    2020-12-19 08:41

    In your PHP code make a property with unique index so the resulting XML will look like:

    
      name1
      value1
      0
    
    
      name1
      value1
      1
    
    

    Then PHP SoapClient will not make href references to the same copies of data and web service successfully ignored these unique fields in my case. No, I do not pass the same fields of someelement as reference in PHP code. They are cloned, however PHP SoapClient is smart enough to zip their multiple occurencies as references, unfortunately.

提交回复
热议问题