Re: [SOAP] PHP SOAP WSDL rookie needs help

From: Date: Wed, 22 Dec 2010 20:16:14 +0000
Subject: Re: [SOAP] PHP SOAP WSDL rookie needs help
References: 1 2 3  Groups: php.soap 
Request: Send a blank email to php-soap+get-3169@lists.php.net to get a copy of this message
Lets get some more information, You are close, looks like their system is responding to you. You are getting 2 errors, one from them and one from PHP. The one from PHP is saying you got an error back from them but you didn't handle it at all so since PHP doesn't know how to handle the error, it errors out. Try this (no pun intended ) try { $result = $client->createLoan($stuff); } catch (Exception $e) { echo $e->getMessage(); } This should remove the php error, because now you are dealing with the returned error and it also prints the error to the screen. Copy and paste the exact message you got back from the service, it will help in dealing with the issue. Jonathan On Dec 22, 2010, at 2:09 PM, Mariaxx wrote:
Sure, $stuff = array('LoanInfo' =>array('LoanAmount' => 10000, 'RepaymentTime' => 5, 'Product' => 1, 'Salary' => 300000, 'AccommodationForm' => 'house', 'NrOfChildrenHome' => 3, 'BankAccountNumber' => 11111111111, 'Bank' => 'seb'), 'PersonalInfoMainBorrower'=>array('CivicRegNumber' => '251051006F', 'Firstname' => 'xx', 'LastName' => 'xxx', 'AddressCoName' => '', 'StreetAddtress' => 'xx 14', 'ZipCode' => 13537, 'City' => 'xx', 'Email' => 'xx')); $client = new SoapClient('https://somesite/services/ApplicationFL?wsdl'); $result = $client->createLoan($stuff); I also tried setting up headers with $client-__setSoapHeaders($header); but I'm not sure, should I pass the header call via new SoapClient or separately. Jonathan Pitcher-2 wrote:
Can I get you to post a snippet of code that shows you connecting to the object and then calling a function if you have it ? Usually it goes something like: $client = new SoapClient(URL_TO_WSDL); $results = $client->myFunction(MyVar); That would be a very simplistic form. Do you have something like that already ? Jonathan Pitcher On Dec 22, 2010, at 1:46 PM, Mariaxx wrote:
I'm new to SOAP. I need to pass information via form to wsdl service. I'm unable to understand few things: 1) Do I need to write <soapenv: Envelope... kind of tags, or do I just get them by using PHP functions such as $a = new SoapClient() ? 2) Do I still need to pass normal HTTP header with XML definition plus SOAP header + SOAP body with PHP I get response from the server saying that my Header is missing. Also what does this mean: "Uncaught SoapFault exception: [soap:Client] Fault: java.lang.NullPointerException " I'd really appreciate your help. I shouldn't have taken this job : | --View this message in context: http://old.nabble.com/PHP-SOAP-WSDL-rookie-needs-help-tp30516854p30516854.html Sent from the Php - Soap mailing list archive at Nabble.com. --PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
--PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
--View this message in context: http://old.nabble.com/PHP-SOAP-WSDL-rookie-needs-help-tp30516854p30517017.html Sent from the Php - Soap mailing list archive at Nabble.com. --PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.soap (#3169) next »