Adding asubscriber in openemm 2012 beta3 in php via SOAP
Posted: Mon Dec 24, 2012 9:48 am
Hi,
I have now tried allot to get the api working to add a email into openemm,
What ever I try it seams like the values is sent wrong,
This is what I use together with the WS example file,
try {
$client = new WsseSoapClient( $wsdlURL, $username, $password);
} catch (SOAPFault $f) { print $f->faultstring; }
$subscriber=array('email'=>'test@hotmail.com','mailtype'=>0,'gender'=>0);
$params = array(
'in2' => 'true',
'in3' => 'email',
'in4' => 'false',
'parameters'=>$subscriber);
# 'in5' => array_keys($subscriber),
# 'in6' => array_values($subscriber));
/* 'doubleCheck' => 'true',
'keyColumn' => 'email',
'overwrite' => 'false',
'paramNames' => array(1 => 'gender', 2 => 'mailtype', 3 => 'email' ),
'paramValues' => array(1 => '0', 2 => '0', 3 => 'test@hotmail.com'));
*/
try {
$result = $client->__soapCall("addSubscriber",$params);
} catch (SOAPFault $f) { echo "\n";print $f->faultstring; echo "\n";}
The comment out parts is what I have been trying, I have also tried in other ways but every combination returns "mailtype is required",
Any input?
I have now tried allot to get the api working to add a email into openemm,
What ever I try it seams like the values is sent wrong,
This is what I use together with the WS example file,
try {
$client = new WsseSoapClient( $wsdlURL, $username, $password);
} catch (SOAPFault $f) { print $f->faultstring; }
$subscriber=array('email'=>'test@hotmail.com','mailtype'=>0,'gender'=>0);
$params = array(
'in2' => 'true',
'in3' => 'email',
'in4' => 'false',
'parameters'=>$subscriber);
# 'in5' => array_keys($subscriber),
# 'in6' => array_values($subscriber));
/* 'doubleCheck' => 'true',
'keyColumn' => 'email',
'overwrite' => 'false',
'paramNames' => array(1 => 'gender', 2 => 'mailtype', 3 => 'email' ),
'paramValues' => array(1 => '0', 2 => '0', 3 => 'test@hotmail.com'));
*/
try {
$result = $client->__soapCall("addSubscriber",$params);
} catch (SOAPFault $f) { echo "\n";print $f->faultstring; echo "\n";}
The comment out parts is what I have been trying, I have also tried in other ways but every combination returns "mailtype is required",
Any input?