0
if(!empty($_POST['submit'])) {
$client = new SoapClient('http://hidroweb.ana.gov.br/fcthservices/mma.asmx?WSDL');
$function = 'Estado';
$options = array('location' => 'http://hidroweb.ana.gov.br/fcthservices/mma.asmx');
$result = $client->__soapCall($function,$options);
var_dump($result);
?>
The result is this:
Object(stdClass)#2 (1) { ["Estadoresult"]=> Object(stdClass)#3 (1) { ["any"]=> string(2956) "URURUGUAIARARGENTINAPGPARAGUAICHCHILEBOBOLÍVIAPUPERUCOCOLÔMBIAEQEQUADORVEVENEZUELAGUGUIANASUSURINAMEGFGUIANA FRANCESA11RORONDÔNIA12ACACRE13AMAMAZONAS14RRRORAIMA15PAPARÁ16APAMAPÁ17TOTOCANTINS21MAMARANHÃO22PIPIAUÍ23CECEARÁ24RNRIO GREAT OF NORTE25PBPARABA26PEPERNAMBUCO27ALAGOAS28SESERGIPE29BABAHIA31MGMINAS GERAIS32ESESPING PAULO41PRAPRANA42SCSANTA CATARINA43RSRIO GRANDE DO SUL50MSMATATO GROSSO OF THE FEDERAL POLICE" } }
I don’t understand I need the object to come apart. Because Soap is returning everything together. It’s like??
Exactly what is returning all together? The string inside the
any
or the object as a whole?– Renato Dinhani
Returns that ["any"]=> string(2956) all together! But the xml is separated. Take a look here. http://hidroweb.ana.gov.br/fcthservices/mma.asmx/BaciaDataSet Deveria vim with the XML structure. The following: Diffgr basin:id="Bacia1" msdata:rowOrder="0"> <Code>1</Code> <Name>AMAZON RIVER</Name> </Basin>
– Paulo Costa
It was to return a structured object with Basin > code > name. Got it?
– Paulo Costa