| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Ross,
try the example shown below. I am not using PEAR soap library but the standard PHP library:
<?php
error_reporting(E_ALL);
// Do not cache the WSDL file <- good for developing/bad for production
$ini = ini_set("soap.wsdl_cache_enabled","0");
try {
$options = array(
'trace' => true,
'exceptions' => true,
'soap_version' => SOAP_1_1
);
$client = new SoapClient("http://api.emaildirect.com/v3/api.asmx?WSDL", $options);
//print_r($client);
// Build the parameters
$parameter = array(
'AccountName' => 'test',
'APIPassword' => '123456',
'Email' => 'foo@example.com',
'SourceID' => '',
'PublicationIDs' => array(array('int' => 2), array('int' => 3)),
'ListIDs' => array(array('int' => 2), array('int' => 3)),
'AutoResponderID' => '',
'CustomFields' => array(
array('CustomField' =>
array('FieldName' => '', 'Value' => '')
)
)
);
// Call the Email Force Addition function
$client->Email_ForceAddition($parameter);
// Shows the Request and Response in XML
echo("<br />REQUEST :<br />" .
htmlspecialchars($client->__getLastRequest()) . "<br />");
echo("<br />RESPONSE:<br />" .
htmlspecialchars($client->__getLastResponse()) . "<br />");
}
catch (SoapFault $ex) // Catch any errors and do appropriate debugging
{
echo "Error:<br />" . nl2br($ex->faultcode) . '<br /><br />';
echo 'Error Details:<br />'. nl2br($ex->faultstring) . '<br />';
echo("<br />REQUEST :<br />" .
htmlspecialchars($client->__getLastRequest()) . "<br />");
echo("<br />RESPONSE:<br />" .
htmlspecialchars($client->__getLastResponse()) . "<br />");
}
?>
They above should work provided you give the right Account name and API Password.
cheers,
Jeffery Fernandez
On Fri, 6 Jun 2008 06:14:22 am Ross King II wrote:
> I am using the SOAP Package and have an issue.
>
[snip]
--
Internet Vision Technologies
Level 1, 520 Dorset Road
Croydon
Victoria - 3136
Australia
web: http://www.ivt.com.au
phone: +61 3 9723 9399
fax: +61 3 9723 4899
Attachment:
signature.asc
Description: This is a digitally signed message part.
![]() |