Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "<pre>";
- $WSDL_URL='https://servis.turkiye.gov.tr/services/g2g/kdgm/test/uetds?wsdl';
- $username='999999';
- $password='999999testtest';
- $params = array(
- 'login' => $username,
- 'password' => $password,
- 'trace' => 0,
- 'exceptions' => 0,
- 'location' => $WSDL_URL,
- 'uri' => $WSDL_URL
- );
- $soap = new SoapClient(null, $params);
- $RESULT = $soap->servisTest( 'HELLO' );
- echo "<h1>ServisTEST Result:</h1>";
- print_r($RESULT);
- SoapFault Object
- (
- [message:protected] => Client Error
- [string:Exception:private] =>
- [code:protected] => 0
- [file:protected] => /Applications/MAMP/htdocs/soap/test.php
- [line:protected] => 24
- [trace:Exception:private] => Array
- (
- [0] => Array
- (
- [file] => /Applications/MAMP/htdocs/soap/test.php
- [line] => 24
- [function] => __call
- [class] => SoapClient
- [type] => ->
- [args] => Array
- (
- [0] => servisTest
- [1] => Array
- (
- [0] => HELLO
- )
- )
- )
- )
- [previous:Exception:private] =>
- [faultstring] => Client Error
- [faultcode] => s:Client
- )
- $client = new SoapClient($wsdl, [
- 'login' => $username,
- 'password' => $password,
- ]);
- $client = new SoapClient(
- 'http://' . urlencode($login) . ':' . urlencode($password) . '@www.server.com/path/to/wsdl',
- [
- 'login' => $login,
- 'password' => $password
- ]
- );
Add Comment
Please, Sign In to add comment