I need to format/build a request for this SOAP \"service\": http://api.notificationmessaging.com/NMSOAP/NotificationService?wsdl
Ideally I would like to use the nati
"Is there a more direct approach where I could write the XML?"
By using a SoapVar and setting the encode parameter of the constructor to XSD_ANYXML you can write the raw XML.
There should be a way where the WSDL helps build the XML though.
You could try something like this:
$wsdl = "http://api.notificationmessaging.com/NMSOAP/NotificationService?wsdl";
$client = new SoapClient($wsdl, array( 'soap_version' => SOAP_1_1,
'trace' => true,
));
try {
$xml = '
1
Our powerful algorithms already
found a matching profile that matches your criteria:
Celina72
]]>
FIRSTNAME
john
johnblum@flowerpower.com
BdX7CqkmjSivyBgIcZoN4sPVLkx7FaXGiwsO
6464
985A8B992601985A
2008-12-12T00:00:00
NOTHING
EMAIL
';
$args = array(new SoapVar($xml, XSD_ANYXML));
$res = $client->__soapCall('sendObject', $args);
return $res;
} catch (SoapFault $e) {
echo "Error: {$e}";
}
echo "
Last Request";
echo "", htmlspecialchars($client->__getLastRequest()), "
";
- 热议问题