I get this strange error "The value cannot be null. Parameter name: input" But there is no parameter named "input".
I tried to change the code and play with it, but I think that there is something simple that I have not been here (I have not used SOAP for many years).
<?php $xmlData = '<LoanRequest><VendorId>20</VendorId> <SubVendorId>0</SubVendorId> <Tier>Dynamic</Tier> <FirstName>TestFname</FirstName> <LastName>TestLname</LastName> <DateOfBirth>1979-03-09</DateOfBirth> <Title>Mr</Title> <Postcode>SO164LN</Postcode> <HouseNumber>98</HouseNumber> <Street>Test Street</Street> <Town>Test Town</Town> <County>Test County</County> <HomeOwner>False</HomeOwner> <HomePhone>02300000000</HomePhone> <WorkPhone>02000000000</WorkPhone> <MobilePhone>0799123321</MobilePhone> <Email> pdbuktest@pbuk.com </Email> <IncomeSource>5</IncomeSource> <EmployerName>PDB Test</EmployerName> <TimeWithEmployer>48</TimeWithEmployer> <PaidByDirectDeposit>1</PaidByDirectDeposit> <NetMonthlyIncome>1700</NetMonthlyIncome> <PayFrequency>3</PayFrequency> <NextPayDay>2013-05-31</NextPayDay> <PaydayAfterNext>2013-06-07</PaydayAfterNext> <DebitCard>VD</DebitCard> <BankAccountNumber>12345678</BankAccountNumber> <BankSortCode>9987655</BankSortCode> <NIN></NIN> <LoanAmount>500</LoanAmount> <IPAddress>127.0.0.1</IPAddress> <Consent>1</Consent> <TimeAtAddressYears>2</TimeAtAddressYears> <TimeAtAddressMonths>3</TimeAtAddressMonths> <UserAgent>Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)</UserAgent> <LoanPurpose>Car</LoanPurpose> <Pricequote>10</Pricequote> <HousingExpenditure>100</HousingExpenditure> <CreditExpenditure>150</CreditExpenditure> <OtherExpenditure>220</OtherExpenditure></LoanRequest>'; $url = 'http://www.pdbuk.co.uk/API/loan.asmx?wsdl'; $options["location"] = $url; $options['trace'] = 1; $client = new SoapClient($url, $options); $result = $client->SendRequest($xmlData); var_dump($result); ?>
What am I doing wrong? Thanks!
source share