- <?php
- echo ‘<pre>’;
- echo $path = $_SERVER['DOCUMENT_ROOT'].‘tests/tested/00 Includes/’;
- require($path . ‘exacttarget_soap_client.php’);
-
- $wsdl = ‘https://webservice.s4.exacttarget.com/etframework.wsdl’;
- try{
-
-
- $client = new ExactTargetSoapClient($wsdl, array(‘trace’=>1));
-
-
- $client->username = ‘xxx’;
- $client->password = ‘xxx’;
-
-
- $list = new ExactTarget_List();
- $list->ID = “xxx”;
- $list->ListName = “-modified1″;
- $list->Description = “test12366″;
-
- $object = new SoapVar($list, SOAP_ENC_OBJECT, ‘List’, “http://exacttarget.com/wsdl/partnerAPI”);
-
-
- $list = new ExactTarget_List();
- $list->ID = “xxx”;
- $list->ListName = “p-modified”;
- $list->Description = “test added list modifed66″;
-
- $object1 = new SoapVar($list, SOAP_ENC_OBJECT, ‘List’, “http://exacttarget.com/wsdl/partnerAPI”);
-
-
- $request = new ExactTarget_UpdateRequest();
- $request->Options = NULL;
- $request->Objects = array($object, $object1);
- $results = $client->Update($request);
-
-
- var_dump($results);
-
- if ($results->OverallStatus == ‘OK’)
- {
- echo ‘SUCCESS’;
- }
- else
- {
- echo ‘FAILED’;
- }
-
- } catch (SoapFault $e) {
-
-
- var_dump($e);
- }
- echo ‘</pre>’;
- ?>
$wsdl = ‘https://webservice.s4.exacttarget.com/etframework.wsdl’;
try{
/* Create the Soap Client */
$client = new ExactTargetSoapClient($wsdl, array(‘trace’=>1));
/* Set username and password here */
$client->username = ‘xxx’;
$client->password = ‘xxx’;
/*% ExactTarget_List */
$list = new ExactTarget_List();
$list->ID = “xxx”; // update the list with this ID
$list->ListName = “-modified1″; // change the name of the list to ‘hello’
$list->Description = “test12366″;
$object = new SoapVar($list, SOAP_ENC_OBJECT, ‘List’, “http://exacttarget.com/wsdl/partnerAPI”);
/*% ExactTarget_List */
$list = new ExactTarget_List();
$list->ID = “xxx”; // update the list with this ID
$list->ListName = “p-modified”; // change the name of the list to ‘hello’
$list->Description = “test added list modifed66″;
$object1 = new SoapVar($list, SOAP_ENC_OBJECT, ‘List’, “http://exacttarget.com/wsdl/partnerAPI”);
/* Update the list */
$request = new ExactTarget_UpdateRequest();
$request->Options = NULL;
$request->Objects = array($object, $object1);
$results = $client->Update($request);
/*Output the results */
var_dump($results);
if ($results->OverallStatus == ‘OK’)
{
echo ‘SUCCESS’;
}
else
{
echo ‘FAILED’;
}
} catch (SoapFault $e) {
/* output the resulting SoapFault upon an error */
var_dump($e);
}
echo ‘</pre>’;
?>