SOAP : build envelope in php -


i want achieve xml.

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://eid.equifax.com/soap/schema/canada/v2"> <soapenv:header/> <soapenv:body>   <v2:initialrequest>      <v2:identity>         <v2:name>            <v2:firstname>milo</v2:firstname>            <v2:lastname>testadd</v2:lastname>         </v2:name>         <!--1 3 repetitions:-->         <v2:address timeataddress="50" addresstype="current">            <v2:hybridaddress>               <v2:addressline>731 bay ave</v2:addressline>               <v2:city>kelowna</v2:city>               <v2:province>bc</v2:province>               <v2:postalcode>v1y7k2</v2:postalcode>            </v2:hybridaddress>         </v2:address>         <v2:dateofbirth>            <v2:day>03</v2:day>            <v2:month>03</v2:month>            <v2:year>1989</v2:year>         </v2:dateofbirth>      </v2:identity>      <v2:processingoptions>         <v2:language>english</v2:language>      </v2:processingoptions>   </v2:initialrequest> </soapenv:body> </soapenv:envelope> 

so, far have created this:

$all_names = array('firstname'=>"perfume",                        'lastname'=>"testsweet");     $all_addresses = array('addressline'=>"109 albert st ne",                            'city'=>"airdrie",                            'province'=>"ab",                            'postalcode'=>"t4b0r5"                            );     $hybrid_address = array('hybridaddress'=>$all_addresses);     $dob = array('day'=>"31",                  'month'=>"09",                  'year'=>"1972"                  );     $identity = array('name'=>$all_names,                       'address'=>$hybrid_address,                       'dateofbirth'=>$dob                       );     $language = array('language'=>'english');     $initial_request = array('identity'=>$identity,                              'processingoptions'=>$language                              );  $test = $client->__call('starttransaction', array('initialrequest'=>$initial_request)); 

but, don't know, what's wrong in here. it's giving me internal server error.

ps: data seems different, b'coz copied different source.

edit

[14-may-2015 17:02:03 america/toronto] php fatal error:  uncaught soapfault     exception: [soap:server] unexpected internal error in     d:\home\site\wwwroot\application\third_party\wssoapclient.php:61 stack trace: #0 d:\home\site\wwwroot\application\third_party\wssoapclient.php(61): soapclient->__call('starttransactio...', array) #1 d:\home\site\wwwroot\application\controllers\equifax.php(58): wssoapclient->__call('starttransactio...', array) #2 [internal function]: equifax->verify() #3 d:\home\site\wwwroot\system\core\codeigniter.php(359): call_user_func_array(array, array) #4 d:\home\site\wwwroot\index.php(227): require_once('d:\\home\\site\\ww...') #5 {main} thrown in d:\home\site\wwwroot\application\third_party\wssoapclient.php on     line 61 

i've been trying equifax working couple weeks. support line next useless.

have set encoding? it's meant utf8. getting namespace in envelope right stops errors. it's changed documentation, full of typos , out of date. way header included little tempremental , not per documentation


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -