I am trying to generate the following XML block in php to send it to SMG soap server. How can i do that?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dom="http://schemas.symantec.com/jaxws/domainProvisioningService">
<soapenv:Header/>
<soapenv:Body>
<dom:AddDomains>
<dom:domains>
<domain name="domain1.com" local="true">
</domain>
<domain name="domain2.com" local="true">
</domain>
</dom:domains>
</dom:AddDomains>
</soapenv:Body>
</soapenv:Envelope>
So #1 I hate working with soap. That said I would recommend using SoapClient (https://www.php.net/manual/en/book.soap.php).
You start off by instantiating a client and you pass in the wsdl like so:
Whoever created the soap service will tell you where the wsdl is.
Now you can do something like:
But that might not work because the WSDL might require some specific wacky formatting or something. You need to check that the response isn't a soapfault
This should hopefully get you on the right track.