I tried to add the lead to exacttarget api, but always get error "Bad Request". All the code are follow the sample from Exacttarget, can anyone hlep
Below is the SOPA envelop:
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<UsernameToken>
<Username>****</Username>
<Password>****</Password>
</UsernameToken>
</Security>
</Header>
<Body>
<CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Objects xsi:type="Subscriber">
<EmailAddress>test@example</EmailAddress>
<SubscriberKey>test@example</SubscriberKey>
<EmailTypePreference>HTML</EmailTypePreference>
<Attributes>
<Name>FIRST_NAME</Name>
<Value>test</Value>
</Attributes>
<Attributes>
<Name>LAST_NAME</Name>
<Value>test</Value>
</Attributes>
<Attributes>
<Name>BIRTHDAY</Name>
<Value>'04/03/1988'</Value>
</Attributes>
<lists>
<partnerkey xsi:nil="true"></partnerkey>
<id>111111</id>
<objectid xsi:nil="true"></objectid>
<status>Active</status>
</lists>
<Status>Active</Status>
</Objects>
</CreateRequest>
</Body>
</Envelope>
Here is my curl code:
$endpoint = 'https://webservice.s6.exacttarget.com/service.asmx';
$soap_do = curl_init();
curl_setopt($soap_do, CURLOPT_URL, $endpoint);
curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_TIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($soap_do, CURLOPT_POST, true);
curl_setopt($soap_do, CURLOPT_POSTFIELDS, $dataString);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8', 'Content-Length: ' . strlen($dataString),'SOAPAction: "http://exacttarget.com/wsdl/partnerAPI/Create"'));
$result = curl_exec($soap_do);
Please help