Parsing XML file using php -
rephrase it. here's code xml. everytime try print_r response, not reflect anything.
$portal = 'caregiverportal'; $username = 'dxt3uyk27u3wrrrzafgiwq=='; $password = 'wd81pilmpujx2fyfek937a=='; $url = "https://webapp.healthcaresynergy.com:8002/demoalpha/caregiverportalmobile/caregiverportals ervice.svc?singlewsdl"; $option = array('trace' => 1 ); $xml = '<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">'. '<soapenv:header/>'. '<soapenv:body>'. '<logincaregiverportal>'. '<username>anything</username>'. '<password>anything</password>'. '<portal>'.$portal.'</portal>'. '<caregiverid>'.$username.'</caregiverid>'. '<timestamp>'.$password.'</timestamp>'. '</logincaregiverportal>'. '</soapenv:body>'. '</soapenv:envelope>'; $client = new localsoapclient($url, $option, $xml); try { $client->logincaregiverportal(); $response = $client->__getlastresponse(); //echo 'result'; //echo "<br/>"; //echo htmlspecialchars($response); $xml = simplexml_load_string($response); $json = json_encode($xml); $array = json_decode($json,true); print_r($array);
}
this result.
array ( )
i think i'm getting empty result.
$xml = simplexml_load_string($response); $json = json_encode($xml); $array = json_decode($json,true); print_r($array);
many help.
while difficult tell much, have not provided code of localsoapclient
have used in program , there not known me in terms of requirements of healthcaresynergy.com.
however see 2 probable errors. 2 lines in soap request should be:
'<username>'.$username.'</username>'. '<password>'.$password.'</password>'.
Comments
Post a Comment