Difference between SoapClient request and Soap curl request in php

前端 未结 3 917
醉话见心
醉话见心 2021-02-19 12:22

I am very confused with

Soap curl request I found here an example SOAP request in PHP with CURL

and Soap request using SoapClient PHP

3条回答
  •  不要未来只要你来
    2021-02-19 13:09

    First Question: Frankly, they fill the same niche in concept.. There might be a time when you think it's "better" to "print" the xml after some modification treating it as a string, rather than build it and send it via soap.. curl can do more than this, but when applied to the context of ws soap call, simply SOAP will treat the request as "complex" entity, whereas for curl your message is a string plain and simple..

    Second Question: this one i cannot provide any definite answer.. I know that you can do some multi-send with curl, but I've never noticed any particular performance hit, plus there are some framework like zebra, that wraps up php curl for a (supposed) performance boost, though I've never tried them... But ultimately curl will do little more than "send" a string in case of soap curl soo I doubt there can be any particular performance degradation..

提交回复
热议问题