notfalsedev / laravel-soap

A soap client wrapper for Laravel
MIT License
633 stars 121 forks source link

The formatter threw an exception while trying to deserialize the message: Error in deserializing body #169

Open helderjosex opened 5 years ago

helderjosex commented 5 years ago

SoapFault The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'GetToken'. End element 'Body' from namespace 'http://schemas.xmlsoap.org/soap/envelope/' expected. Found element 'param1' from namespace ''. Line 2, position 149.

hanynasyr commented 4 years ago

Same error SoapFault The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'GetCasesByOrgID'. End element 'Body' from namespace 'http://schemas.xmlsoap.org/soap/envelope/' expected. Found element 'param1' from namespace ''. Line 2, position 156.

traqy21 commented 4 years ago

Hi, I have encountered this error. I have a request like this with Body on it. What I did is add the data to array. Please see below

XML Request: `

00000000-0000-0000-0000-000000000000 101 101 Smith Joe test@ezidebit.com.au 0400000000 1 Joe Smith 064001 1234 500 2010-12-24 NO NO NO WebServiceUser ` Request in PHP: `$response = $this->soapWrapper->call('PaymentGateway.AddBankDebit', array([ "DigitalKey" => "9083461D-9BD2-48D7-C352-05D1B26F871C", "YourSystemReference" => "101", "YourGeneralReference" => "101", "LastName" => "TestLast1", "FirstName" => "TestFirst1", "EmailAddress" => "test@test.com", "MobilePhoneNumber" => "0400000000", "PaymentReference" => "2", "BankAccountName" => "TestFirst1 TestLast1", "BankAccountBSB" => "010194", "BankAccountNumber" => "001234000", "PaymentAmountInCents" => "100", "DebitDate" => "2019-11-24", "SmsPaymentReminder" => "NO", "SmsFailedNotification" => "NO", "SmsExpiredCard" => "NO", "Username" => "testUsername1" ]));`