Sending Raw XML via PHP SoapClient request

后端 未结 2 1770
梦毁少年i
梦毁少年i 2020-12-19 07:47

I am trying to simply send RAW xml to a webservice via PHP and SoapClient. The problem is when I encode my XML it changes the order of elements in the XML that is converted

2条回答
  •  被撕碎了的回忆
    2020-12-19 08:20

    For testing purposes, you can subclass SoapClient and override the __doRequest method - it receives the generated XML and you can pre-process it.

    But better find what's going wrong with the XML encoding. You can use SoapVar and SoapParam instances to specify the exact way given object has to be represented. Those saved my life when namespaces had to be given

提交回复
热议问题