by
0
3
195
2
Easy-to-find
Refined
MultiPlatform
Created
Modified Jan 31, 2019
AuthorEvaldo Maciel
BrowserFirefox
DatabaseMS SQL
Languagephp
LicenseMIT_X11
OSWindows
TechnologySOAP
Windows VersionWindows 10

Consumir dados do RM por PHP via SOAP

Este código faz uma consulta simples e direta via PHP / SOAP no banco de dados do Totvs RM
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/4298612/Consumir-dados-do-RM-por-PHP-via-SOAP?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
<?php // SOAP client $wsdl ='http://servidor:8051/wsDataServer/MEX?wsdl'; $soapParametros = array('login' => 'mestre', 'password' => 'totvs', 'authentication' => SOAP_AUTHENTICATION_BASIC, 'trace' => 1, 'exceptions' => true ); $paramentros = array('DataServerName' => 'EduAlunoData', 'Filtro'=>'1=1', 'Contexto'=>'?'); try{ $client = new SoapClient($wsdl, $soapParametros); $retorno = $client->ReadView($paramentros); $retorno2 = $client->__getLastResponse(); echo "<pre>" . $retorno2 . "</pre>"; } catch (Exception $e) { echo "<h4>Error!</h4>"; echo $e -> getMessage (); echo '<pre>Last response: '. $client->__getLastResponse() . '</pre>'; }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus