<?php

include '../bootstrap.php';
try {
    $instance = new interact();
    $instance->debug = true;
    $instance->intitializeSoapClient($config_file['location']['wsdl'], $config_file['location']['endpoint']);
    if ($instance->login($config_file['auth_regular']['login'], $config_file['auth_regular']['pass'])) {
        $retrieve_obj = new retrieveListMembers();
        $int_obj = new InteractObject();
        $int_obj->setFolderName("Mason");
        $int_obj->setObjectName("masonList1");
        $retrieve_obj->setFieldListParam(array("RIID_", "EMAIL_ADDRESS_", "FIRST_NAME"));
        $retrieve_obj->setIdsToRetrieve(array("*****@*****.**"));
        $retrieve_obj->setListParam($int_obj);
        $retrieve_obj->setQueryColumn(QueryColumn::EMAIL2);
        $results = $instance->execute($retrieve_obj);
        // do something with results?
        print_r($results);
        $instance->logout();
    } else {
        die("Login failed, no reason to go on...");
    }
} catch (SoapFault $fault) {
    print_r($fault);
} catch (Exception $exception) {
    print_r($exception);
}
<?php

include '../bootstrap.php';
try {
    $login = "******";
    $pass = "******";
    $folder = "Mark_J";
    $list = "MJlist4";
    $instance = new interact();
    $instance->debug = true;
    $instance->intitializeSoapClient($config_file['location']['wsdl'], $config_file['location']['endpoint']);
    if ($instance->login($login, $pass)) {
        /*
         * merge call begin
         */
        $merge_obj = new mergeListMembersRIID();
        $interact_object = new InteractObject();
        $interact_object->setFolderName($folder);
        $interact_object->setObjectName($list);
        $merge_obj->setListParam($interact_object);
        $rule = new ListMergeRule();
        $status = new DefaultPermissionStatus();
        $status->defaultPermissionStatus = DefaultPermissionStatus::OPT_IN;
        $rule->setDefaultPermissionStatus($status);
        $rule->setInsertOnNoMatch(true);
        $match1 = new MatchColumn();
        $match1->matchColumn = $match1::EMAIL;
        $rule->setMatchColumn1($match1);
        $match_op = new MatchOperator();
        $match_op->matchOperator = $match_op::_NONE_;
        $rule->setMatchOperator($match_op);
<?php

include '../bootstrap.php';
$instance = new interact();
// print out the XML of the requests and responses!
$instance->debug = true;
$instance->intitializeSoapClient($config_file['location']['wsdl'], $config_file['location']['endpoint']);
if ($instance->login($config_file['auth_content_library']['login'], $config_file['auth_content_library']['pass'])) {
    // init some vars - these are pre-existing objects in my test account
    $content_folder_location = '/contentlibrary/1_mason';
    $content_folder_file = 'randomFile_' . rand(1, 100) . '.htm';
    $some_random_html = '<html><header><title>Masons api example</title></header><body><div><h1>Hello World!</h1></div><div>Goodbye cruel world</div></body></html>';
    // sample of create document call
    $create_document_obj = new createDocument();
    $int_obj = new InteractObject();
    $int_obj->setFolderName($content_folder_location);
    $int_obj->setObjectName($content_folder_file);
    $create_document_obj->setDocumentParam($int_obj);
    $create_document_obj->setContentParam($some_random_html);
    $create_document_obj->setEncodingParameter($create_document_obj->char_sets[10]);
    $create_doc_result = $instance->execute($create_document_obj);
    // sample of setDocumentContent
    $set_content_obj = new setDocumentContent();
    $int_obj = new InteractObject();
    $int_obj->setFolderName($content_folder_location);
    $int_obj->setObjectName($content_folder_file);
    $set_content_obj->setDocumentParam($int_obj);
    $set_content_obj->setContentParam($some_random_html);
    $set_document_response = $instance->execute($set_content_obj);
    // sample of getDocumentContent
    $get_content_obj = new getDocumentContent();
<?php

include '../bootstrap.php';
try {
    $instance = new interact();
    $instance->debug == true;
    $instance->intitializeSoapClient('https://ws2.responsys.net/webservices/wsdl/ResponsysWS_Level1.wsdl', 'https://ws2.responsys.net/webservices/services/ResponsysWSService');
    if ($instance->login('masonTest', 'XixXcbF30j')) {
        $listFolders_object = new listFolders();
        $listFolders_result = $instance->execute($listFolders_object);
        foreach ($listFolders_result->result as $folder) {
            echo $folder->name . "\n";
        }
        $instance->logout();
    } else {
        die("Login failed, no reason to go on...");
    }
} catch (SoapFault $fault) {
    print_r($fault);
} catch (Exception $exception) {
    print_r($exception);
}
<?php

include '../bootstrap.php';
try {
    $instance = new interact();
    $instance->debug = true;
    $instance->intitializeSoapClient($config_file['hatm_location']['wsdl'], $config_file['hatm_location']['endpoint']);
    if ($instance->login($config_file['auth_hatm']['login'], $config_file['auth_hatm']['pass'])) {
        $merge_trigger_obj = new HAmergeTriggerEmail();
        // Print out XML transmissions - nice to have!
        $merge_trigger_obj->debug = true;
        $rule = new ListMergeRule();
        $status = new DefaultPermissionStatus();
        $status->defaultPermissionStatus = DefaultPermissionStatus::OPT_IN;
        $rule->setDefaultPermissionStatus($status);
        $rule->setInsertOnNoMatch(true);
        $match1 = new MatchColumn();
        $match1->matchColumn = $match1::RECIPIENT_ID;
        $rule->setMatchColumn1($match1);
        $match_op = new MatchOperator();
        $match_op->matchOperator = $match_op::_NONE_;
        $rule->setMatchOperator($match_op);
        $reject_channel = new RejectChannel();
        $reject_channel->rejectChannel = $reject_channel::EMAIL;
        $rule->setRejectChannel($reject_channel);
        $update = new UpdateOnMatch();
        $update->updateOnMatch = $update::REPLACE;
        $rule->setUpdateOnMatch($update);
        $merge_trigger_obj->setMergeRuleParam($rule);
        $interact_object = new InteractObject();
        $interact_object->setFolderName("z_ComprehensiveAccountTesting");