Seit einer woche sitzte ich nun an diesem Project und kann den Webservice immer noch nicht nutzen.
Hier ist die wsdl: http://betaservices.membersolutions.com/Business.PartnerService/svc/SLIM.svc?wsdl
Ich weiss nicht mehr weiter. Kann mir bitte jemand helfen einen positiven "Call" zu "CreateAccount" machen.
Hier ist meine php datei:
<?php // pull back the wsdl to get the functions names
// and also the parameters and return values
$client = new SoapClient("http://betaservices.membersolutions.com/Business.PartnerService/svc/slim.svc?wsdl",
array(
"trace" => 1, // enable trace to view what is happening
"exceptions" => 0, // disable exceptions
"cache_wsdl" => 0, // disable any caching on the wsdl, encase you alter the wsdl server
"soap_version" => SOAP_1_1)
);
$client->soap_defencoding = 'UTF-8';
/*
$search_query = new StdClass();
$search_query->ClientID = new SoapVar("999985", XSD_STRING, 'xsd:string');
$search_query->MerchantClientID = new SoapVar("YB0000", XSD_STRING, 'xsd:string');
$search_query->ClientPassword = new SoapVar("oPtbjC+1x0cB18kmiQgJg6ZEAzmNIxCM2A==", XSD_STRING, 'xsd:string');
$search_query->FirstName = new SoapVar("Tester", XSD_STRING, 'xsd:string');
$search_query->LastName = new SoapVar("Testington", XSD_STRING, 'xsd:string');
$search_query->MI = new SoapVar("T", XSD_STRING, 'xsd:string');
$search_query->StreetLine1 = new SoapVar("1111 W Test Ave", XSD_STRING, 'xsd:string');
$search_query->StreetLine2 = new SoapVar("STE 111", XSD_STRING, 'xsd:string');
$search_query->City = new SoapVar("Test City", XSD_STRING, 'xsd:string');
$search_query->StateProvince = new SoapVar("AZ", XSD_STRING, 'xsd:string');
$search_query->Zip = new SoapVar("11111", XSD_STRING, 'xsd:string');
$search_query->Email = new SoapVar("[email protected]", XSD_STRING, 'xsd:string');
$search_query->Country = new SoapVar("USA", XSD_STRING, 'xsd:string');
$search_query->HomePhone = new SoapVar("111 111 1111", XSD_STRING, 'xsd:string');
$search_query->WorkPhone = new SoapVar("222 222 2222", XSD_STRING, 'xsd:string');
$search_query->ReferenceID = new SoapVar("dfgsdftgh554645yfghfh", XSD_STRING, 'xsd:string');
$search_query->ContractType = new SoapVar("1", XSD_INTEGER, 'xsd:integer');
$search_query->TotalPrice = new SoapVar("550.00", XSD_STRING, 'xsd:string');
$search_query->PaymentAmount = new SoapVar("55.00", XSD_STRING, 'xsd:string');
$search_query->FirstPaymentDueDate = new SoapVar("05/31/2011", XSD_STRING, 'xsd:date');
$search_query->PaymentFrequencyName = new SoapVar("1", XSD_INTEGER, 'xsd:string');
$search_query->PaymentFrequencyValue = new SoapVar("1", XSD_INTEGER, 'xsd:string');
$response = $client->CreateAccount(new SoapVar($search_query, SOAP_ENC_OBJECT));
// get a response from the WSDL zend server function CreateAccount()
*/
$body = <<<XML
<CreateAccount xmlns="http://betaservices.membersolutions.com/">
<ClientID xmlns="http://betaservices.membersolutions.com/">4443345</ClientID>
<MerchantClientID xmlns="http://betaservices.membersolutions.com/">345345</MerchantClientID>
<ClientPassword xmlns="http://betaservices.membersolutions.com/">345345fgfdgdfg345345</ClientPassword>
<FirstName xmlns="http://betaservices.membersolutions.com/">John</FirstName>
<LastName xmlns="http://betaservices.membersolutions.com/">Smith</LastName>
<MI xmlns="http://betaservices.membersolutions.com/">E</MI>
<StreetLine1 xmlns="http://betaservices.membersolutions.com/">123 Main Street</StreetLine1>
<StreetLine2 xmlns="http://betaservices.membersolutions.com/"></StreetLine2>
<City xmlns="http://betaservices.membersolutions.com/">Springfield</City>
<StateProvince xmlns="http://betaservices.membersolutions.com/">MA</StateProvince>
<Zip xmlns="http://betaservices.membersolutions.com/">12345</Zip>
<Email xmlns="http://betaservices.membersolutions.com/">[email protected]</Email>
<Country xmlns="http://betaservices.membersolutions.com/">USA</Country>
<HomePhone xmlns="http://betaservices.membersolutions.com/">516-123-4567</HomePhone>
<WorkPhone xmlns="http://betaservices.membersolutions.com/">215-123-4455</WorkPhone>
<ReferenceID xmlns="http://betaservices.membersolutions.com/">1234567890XXX</ReferenceID>
<ContractType xmlns="http://betaservices.membersolutions.com/">2</ContractType>
<TotalPrice xmlns="http://betaservices.membersolutions.com/">0.00</TotalPrice>
<PaymentAmount xmlns="http://betaservices.membersolutions.com/">45.00</PaymentAmount>
<FirstPaymentDueDate xmlns="http://betaservices.membersolutions.com/">04/10/2011</FirstPaymentDueDate>
<PaymentFrequencyName xmlns="http://betaservices.membersolutions.com/">1</PaymentFrequencyName>
<PaymentFrequencyValue xmlns="http://betaservices.membersolutions.com/">1</PaymentFrequencyValue>
<PaymentProfile type='1' xmlns="http://betaservices.membersolutions.com/"><AccountNumber xmlns="http://betaservices.membersolutions.com/">5454545454545454</AccountNumber>
<ExpDate xmlns="http://betaservices.membersolutions.com/">0612</ExpDate>
<NameOnTheCard xmlns="http://betaservices.membersolutions.com/">John E. Smith</NameOnTheCard>
<CvvValue xmlns="http://betaservices.membersolutions.com/">1245</CvvValue>
<BankAccount xmlns="http://betaservices.membersolutions.com/"></BankAccount>
<RoutingNumber xmlns="http://betaservices.membersolutions.com/"></RoutingNumber>
<NameOnTheAccount xmlns="http://betaservices.membersolutions.com/"></NameOnTheAccount>
</PaymentProfile>
</CreateAccount>
XML;
$response = $client->CreateAccount(new SoapVar($body, XSD_ANYXML));
print_r($response);
// display what was sent to the server (the request)
echo "<p>Request :".htmlspecialchars($client->__getLastRequest()) ."</p>";
// display the response from the server
echo "<p>Response:".htmlspecialchars($client->__getLastResponse())."</p>";
?>
Hier ist die wsdl: http://betaservices.membersolutions.com/Business.PartnerService/svc/SLIM.svc?wsdl
Ich weiss nicht mehr weiter. Kann mir bitte jemand helfen einen positiven "Call" zu "CreateAccount" machen.
Hier ist meine php datei:
<?php // pull back the wsdl to get the functions names
// and also the parameters and return values
$client = new SoapClient("http://betaservices.membersolutions.com/Business.PartnerService/svc/slim.svc?wsdl",
array(
"trace" => 1, // enable trace to view what is happening
"exceptions" => 0, // disable exceptions
"cache_wsdl" => 0, // disable any caching on the wsdl, encase you alter the wsdl server
"soap_version" => SOAP_1_1)
);
$client->soap_defencoding = 'UTF-8';
/*
$search_query = new StdClass();
$search_query->ClientID = new SoapVar("999985", XSD_STRING, 'xsd:string');
$search_query->MerchantClientID = new SoapVar("YB0000", XSD_STRING, 'xsd:string');
$search_query->ClientPassword = new SoapVar("oPtbjC+1x0cB18kmiQgJg6ZEAzmNIxCM2A==", XSD_STRING, 'xsd:string');
$search_query->FirstName = new SoapVar("Tester", XSD_STRING, 'xsd:string');
$search_query->LastName = new SoapVar("Testington", XSD_STRING, 'xsd:string');
$search_query->MI = new SoapVar("T", XSD_STRING, 'xsd:string');
$search_query->StreetLine1 = new SoapVar("1111 W Test Ave", XSD_STRING, 'xsd:string');
$search_query->StreetLine2 = new SoapVar("STE 111", XSD_STRING, 'xsd:string');
$search_query->City = new SoapVar("Test City", XSD_STRING, 'xsd:string');
$search_query->StateProvince = new SoapVar("AZ", XSD_STRING, 'xsd:string');
$search_query->Zip = new SoapVar("11111", XSD_STRING, 'xsd:string');
$search_query->Email = new SoapVar("[email protected]", XSD_STRING, 'xsd:string');
$search_query->Country = new SoapVar("USA", XSD_STRING, 'xsd:string');
$search_query->HomePhone = new SoapVar("111 111 1111", XSD_STRING, 'xsd:string');
$search_query->WorkPhone = new SoapVar("222 222 2222", XSD_STRING, 'xsd:string');
$search_query->ReferenceID = new SoapVar("dfgsdftgh554645yfghfh", XSD_STRING, 'xsd:string');
$search_query->ContractType = new SoapVar("1", XSD_INTEGER, 'xsd:integer');
$search_query->TotalPrice = new SoapVar("550.00", XSD_STRING, 'xsd:string');
$search_query->PaymentAmount = new SoapVar("55.00", XSD_STRING, 'xsd:string');
$search_query->FirstPaymentDueDate = new SoapVar("05/31/2011", XSD_STRING, 'xsd:date');
$search_query->PaymentFrequencyName = new SoapVar("1", XSD_INTEGER, 'xsd:string');
$search_query->PaymentFrequencyValue = new SoapVar("1", XSD_INTEGER, 'xsd:string');
$response = $client->CreateAccount(new SoapVar($search_query, SOAP_ENC_OBJECT));
// get a response from the WSDL zend server function CreateAccount()
*/
$body = <<<XML
<CreateAccount xmlns="http://betaservices.membersolutions.com/">
<ClientID xmlns="http://betaservices.membersolutions.com/">4443345</ClientID>
<MerchantClientID xmlns="http://betaservices.membersolutions.com/">345345</MerchantClientID>
<ClientPassword xmlns="http://betaservices.membersolutions.com/">345345fgfdgdfg345345</ClientPassword>
<FirstName xmlns="http://betaservices.membersolutions.com/">John</FirstName>
<LastName xmlns="http://betaservices.membersolutions.com/">Smith</LastName>
<MI xmlns="http://betaservices.membersolutions.com/">E</MI>
<StreetLine1 xmlns="http://betaservices.membersolutions.com/">123 Main Street</StreetLine1>
<StreetLine2 xmlns="http://betaservices.membersolutions.com/"></StreetLine2>
<City xmlns="http://betaservices.membersolutions.com/">Springfield</City>
<StateProvince xmlns="http://betaservices.membersolutions.com/">MA</StateProvince>
<Zip xmlns="http://betaservices.membersolutions.com/">12345</Zip>
<Email xmlns="http://betaservices.membersolutions.com/">[email protected]</Email>
<Country xmlns="http://betaservices.membersolutions.com/">USA</Country>
<HomePhone xmlns="http://betaservices.membersolutions.com/">516-123-4567</HomePhone>
<WorkPhone xmlns="http://betaservices.membersolutions.com/">215-123-4455</WorkPhone>
<ReferenceID xmlns="http://betaservices.membersolutions.com/">1234567890XXX</ReferenceID>
<ContractType xmlns="http://betaservices.membersolutions.com/">2</ContractType>
<TotalPrice xmlns="http://betaservices.membersolutions.com/">0.00</TotalPrice>
<PaymentAmount xmlns="http://betaservices.membersolutions.com/">45.00</PaymentAmount>
<FirstPaymentDueDate xmlns="http://betaservices.membersolutions.com/">04/10/2011</FirstPaymentDueDate>
<PaymentFrequencyName xmlns="http://betaservices.membersolutions.com/">1</PaymentFrequencyName>
<PaymentFrequencyValue xmlns="http://betaservices.membersolutions.com/">1</PaymentFrequencyValue>
<PaymentProfile type='1' xmlns="http://betaservices.membersolutions.com/"><AccountNumber xmlns="http://betaservices.membersolutions.com/">5454545454545454</AccountNumber>
<ExpDate xmlns="http://betaservices.membersolutions.com/">0612</ExpDate>
<NameOnTheCard xmlns="http://betaservices.membersolutions.com/">John E. Smith</NameOnTheCard>
<CvvValue xmlns="http://betaservices.membersolutions.com/">1245</CvvValue>
<BankAccount xmlns="http://betaservices.membersolutions.com/"></BankAccount>
<RoutingNumber xmlns="http://betaservices.membersolutions.com/"></RoutingNumber>
<NameOnTheAccount xmlns="http://betaservices.membersolutions.com/"></NameOnTheAccount>
</PaymentProfile>
</CreateAccount>
XML;
$response = $client->CreateAccount(new SoapVar($body, XSD_ANYXML));
print_r($response);
// display what was sent to the server (the request)
echo "<p>Request :".htmlspecialchars($client->__getLastRequest()) ."</p>";
// display the response from the server
echo "<p>Response:".htmlspecialchars($client->__getLastResponse())."</p>";
?>