Hi Guys,
I am not very familiar with SOAP, so I have an xml that i need to submit it to a wsdl and I now the format and methods the xml needs, but i just struggle/dont know how to submit it using SAOP.
here is what I have so far:
$client = new
SoapClient(
"http//:www.url.com?wsdl"
);
try {
echo "<pre>\
";
print($client->submitNewSurveyResponse());
echo "\
";
} catch (SoapFault $exception) {
echo $exception;
}
and the xml format is here:
URL:
===================================
http//:www.url.com?wsdl
Method:
===================================
submitNewSurveyResponse
Returns:
===================================
On Failure: -1
On Success: iMarketing Sync ID
Parameters:
===================================
accesskey (string): 1ysr3w7gr57fqz2qr8nl
response (string):
<?xml version="1.0" encoding="UTF-16"?>
<iMAWebServiceRequests>
<Requests>
<SurveyResponse surveyID="42261" leadsource="" clicksource="" iMarketingSyncID="" mode="live">
<Response questionID="1">
<DisplayText><![CDATA[First Name]]></DisplayText>
<UserInput><![CDATA[]]></UserInput>
</Response>
<Response questionID="2">
<DisplayText><![CDATA[Last Name]]></DisplayText>
<UserInput><![CDATA[]]></UserInput>
</Response>
<Response questionID="14">
<DisplayText><![CDATA[Email Address]]></DisplayText>
<UserInput><![CDATA[]]></UserInput>
</Response>
<Response questionID="105330">
<DisplayText><![CDATA[What is your SEX?]]></DisplayText>
<UserInput><![CDATA[]]></UserInput>
</Response>
<Response questionID="106763">
<DisplayText><![CDATA[checkbox]]></DisplayText>
<UserInput><![CDATA[]]></UserInput>
</Response>
<Response questionID="108819">
<DisplayText><![CDATA[Age]]></DisplayText>
<UserInput><![CDATA[]]></UserInput>
</Response>
</SurveyResponse>
</Requests>
</iMAWebServiceRequests>