Answer the question
In order to leave comments, you need to log in
SOAP request in PHP?
Good afternoon! I need to complete a task. Register a new member using the SOAP method.
there is a Wsdl
https://webservices.saveonresorts.com/services/Clu...
the code is as follows:
<?php
$url = "https://webservices.saveonresorts.com/services/ClubMembership.svc?singleWsdl";
$client = new SoapClient($url, array('soap_version' => SOAP_1_2, "location" => "https://webservices.saveonresorts.com/services/ClubMembership.svc", 'trace' => 1));
$params = array('Email' => '[email protected]', 'LastName' => 'Carter', 'FirstName' => 'Patrick', 'Phone' => '+1111111111');
print_r($client->__getFunctions());
echo '<br><br>';
try {
$xml = $client->CreateMembership_Paid($params);
} catch (SoapFault $fault) {
$xml = array();
$xml['faultcode'] = $fault->faultcode;
$xml['faultstring'] = $fault->faultstring;
}
var_dump($xml);
?>
Answer the question
In order to leave comments, you need to log in
add
$actionHeader = new SoapHeader('http://www.w3.org/2005/08/addressing',
'Action',
'http://tempuri.org/IClubMembership/CreateMembership_Paid');
$client->__setSoapHeaders($actionHeader);
Now the message is "The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree." I thought that the parameters are not all. No, it's still an error message. Tell me, what can be connected with?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question