web services - WSDL TO PHP implementation -


i got converted wsdl php script not working trying connect http://www.regcheck.org.uk/api/reg.asmx?wsdl, getting error

array ( [regcheckservicecheck::check] => soapfault object ( [message:protected] => system.web.services.protocols.soapexception: server unable process request. ---> system.nullreferenceexception: object reference not set instance of object. @ webtropy.carreg.check(string registrationnumber, string username) in c:\inetpub\wwwroot\regcheck.org.uk\api\reg.asmx:line 26 --- end of inner exception stack trace --- [string:exception:private] => [code:protected] => 0 [file:protected] => c:\xampp\htdocs\check\regcheckservicecheck.php [line:protected] => 32 [trace:exception:private] => array ( [0] => array ( [file] => c:\xampp\htdocs\check\regcheckservicecheck.php [line] => 32 [function] => __call [class] => soapclient [type] => -> [args] => array ( [0] => check [1] => array ( [0] => regcheckstructcheck object ( [registrationnumber] => [username] => [result:regcheckwsdlclass:private] => [lasterror:regcheckwsdlclass:private] => array ( ) [internarraytoiterate:regcheckwsdlclass:private] => [internarraytoiterateisarray:regcheckwsdlclass:private] => [internarraytoiterateoffset:regcheckwsdlclass:private] => ) ) ) ) [1] => array ( [file] => c:\xampp\htdocs\check\regcheckservicecheck.php [line] => 32 [function] => check [class] => soapclient [type] => -> [args] => array ( [0] => regcheckstructcheck object ( [registrationnumber] => [username] => [result:regcheckwsdlclass:private] => [lasterror:regcheckwsdlclass:private] => array ( ) [internarraytoiterate:regcheckwsdlclass:private] => [internarraytoiterateisarray:regcheckwsdlclass:private] => [internarraytoiterateoffset:regcheckwsdlclass:private] => ) ) ) [2] => array ( [file] => c:\xampp\htdocs\sample-regcheck.php [line] => 46 [function] => check [class] => regcheckservicecheck [type] => -> [args] => array ( [0] => regcheckstructcheck object ( [registrationnumber] => [username] => [result:regcheckwsdlclass:private] => [lasterror:regcheckwsdlclass:private] => array ( ) [internarraytoiterate:regcheckwsdlclass:private] => [internarraytoiterateisarray:regcheckwsdlclass:private] => [internarraytoiterateoffset:regcheckwsdlclass:private] => ) ) ) ) [previous:exception:private] => [faultstring] => system.web.services.protocols.soapexception: server unable process request. ---> system.nullreferenceexception: object reference not set instance of object. @ webtropy.carreg.check(string registrationnumber, string username) in c:\inetpub\wwwroot\regcheck.org.uk\api\reg.asmx:line 26 --- end of inner exception stack trace --- [faultcode] => soap:server [detail] => ) )

i sure missing in config files, mybe got idea ?

it's possible call web service via http request follows;

<?php $username = 'your username here'; $regnumber = 'sk08kpt'; $xmldata = file_get_contents("https://www.regcheck.org.uk/api/reg.asmx/check?registrationnumber=" . $regnumber  ."&username=" . $username); $xml=simplexml_load_string($xmldata);     $strjson = $xml->vehiclejson;     $json = json_decode($strjson);     print_r($json->description);     ?> 

not elegant soap call, simpler.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -