Page 1 of 1
can't connect to the web-service
#1
Posted 20 August 2009 - 07:50 AM
Hello!
I need help so if enyone could help I'll be really appreciated.
So my question is:
I have working .NET web-service to which I can't connect via PHP.
These lines of code:
$client= new SoapClient("http://kiparis.crimea.ua:81/ws/dataReturn.1cws?wsdl");
$response=$client->GetData();
cause this result:
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in D:\apache\test\www\nout.php:3 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://kiparis....', '', 1, 0) #1 [internal function]: SoapClient->__call('GetData', Array) #2 D:\apache\test\www\nout.php(3): SoapClient->GetData() #3 {main} thrown in D:\apache\test\www\nout.php on line 3
Yugene
I need help so if enyone could help I'll be really appreciated.
So my question is:
I have working .NET web-service to which I can't connect via PHP.
These lines of code:
$client= new SoapClient("http://kiparis.crimea.ua:81/ws/dataReturn.1cws?wsdl");
$response=$client->GetData();
cause this result:
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in D:\apache\test\www\nout.php:3 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://kiparis....', '', 1, 0) #1 [internal function]: SoapClient->__call('GetData', Array) #2 D:\apache\test\www\nout.php(3): SoapClient->GetData() #3 {main} thrown in D:\apache\test\www\nout.php on line 3
Yugene
#2
Posted 20 August 2009 - 08:07 AM
Catch the exception to find out more:
try { $client= new SoapClient("http://kiparis.crimea.ua:81/ws/dataReturn.1cws?wsdl"); $response=$client->GetData(); } catch (SoapFault $e) { print_r($e->getMessage(); }
#3
Posted 20 August 2009 - 08:58 AM
Mike, on 20 August 2009 - 08:07 AM, said:
Catch the exception to find out more:
try { $client= new SoapClient("http://kiparis.crimea.ua:81/ws/dataReturn.1cws?wsdl"); $response=$client->GetData(); } catch (SoapFault $e) { print_r($e->getMessage(); }
Thanks for replying
Tried this and got just "Not found"
#4
Posted 20 August 2009 - 03:40 PM
I tried a print_r($e) and found out that this URL seems te be used for the request:
http://kiparis.crime...dataReturn.1cws
It gives a "not found" and comes from the WSDL. So my guess is, that there might be something wrong in the WSDL description.
http://kiparis.crime...dataReturn.1cws
It gives a "not found" and comes from the WSDL. So my guess is, that there might be something wrong in the WSDL description.
#5
Posted 21 August 2009 - 04:07 AM
I've came to the same opinion, but there's a strange thing: service works perfectly when you call it with C#.
So I'm not sure it's only wsdl. May be php SoapClient doesn't work properly?
Well will try to play with the wsdl - may be will find the solution.
Thanks a lot for replying!
So I'm not sure it's only wsdl. May be php SoapClient doesn't work properly?
Well will try to play with the wsdl - may be will find the solution.
Thanks a lot for replying!
#7
Posted 22 August 2009 - 07:07 AM
Mike, on 21 August 2009 - 04:12 AM, said:
Or could it be that GetData() expects some parameters?
Well it seems that wsdl isn't right finally.
Service doesn't work both with or without parameters when i try to connect using PHP.
We cooperate with developer of the service so tried both ways.
Service was developed by .NET programmer and connection in C# works perfectly.
But when I use php SoapClient the connection fails.
So I think something in wsdl_document (which is good for C#) doesn't suit for php soapclient.
Well. thanks for support ))
Will research wsdl docs carefully I hope this will give me the answer)
#8
Posted 10 February 2013 - 03:12 AM
Hi jugene I try to connect to wsdl whit soapClient, it return me __getFunctions() a list of available funcs:
// return ....
array(6) {
[0]=>
string(29) "lsResponse ls(ls $parameters)"
[1]=>
string(32) "dirResponse dir(dir $parameters)"
[2]=>
string(41) "getlogResponse getlog(getlog $parameters)"
[3]=>
string(32) "getResponse get(get $parameters)"
[4]=>
string(32) "putResponse put(put $parameters)"
[5]=>
string(35) "mgetResponse mget(mget $parameters)"
}
how can execute these commands ?!
if I try this code:
return me error:
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in C:\web-dev\xampp\htdocs\ws-dogana\index.php:41
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://ws-tele...', 'ls', 2, 0)
#1 C:\web-dev\xampp\htdocs\ws-dogana\index.php(41): SoapClient->__call('ls', Array)
#2 C:\web-dev\xampp\htdocs\ws-dogana\index.php(41): SoapClient->ls()
#3 {main}
thrown in C:\web-dev\xampp\htdocs\ws-dogana\index.php on line 41
$client = new SoapClient($path_to_wsdl,array( 'trace' => 1, 'exceptions' => 1, 'features' => 'SOAP_SINGLE_ELEMENT_ARRAYS', 'cache_wsdl' => WSDL_CACHE_NONE, 'location' => $path_to_wsdl, 'uri' => $path_to_wsdl, // This may need to be the same as location. 'soap_version' => SOAP_1_2, 'login' => 'LUPIN', 'password' => '********', )); $allFunctions = $client->__getFunctions(); var_dump($allFunctions);
// return ....
array(6) {
[0]=>
string(29) "lsResponse ls(ls $parameters)"
[1]=>
string(32) "dirResponse dir(dir $parameters)"
[2]=>
string(41) "getlogResponse getlog(getlog $parameters)"
[3]=>
string(32) "getResponse get(get $parameters)"
[4]=>
string(32) "putResponse put(put $parameters)"
[5]=>
string(35) "mgetResponse mget(mget $parameters)"
}
how can execute these commands ?!
if I try this code:
var_dump($client->ls());
return me error:
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in C:\web-dev\xampp\htdocs\ws-dogana\index.php:41
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://ws-tele...', 'ls', 2, 0)
#1 C:\web-dev\xampp\htdocs\ws-dogana\index.php(41): SoapClient->__call('ls', Array)
#2 C:\web-dev\xampp\htdocs\ws-dogana\index.php(41): SoapClient->ls()
#3 {main}
thrown in C:\web-dev\xampp\htdocs\ws-dogana\index.php on line 41
#9
Posted 11 February 2013 - 07:32 AM
Hi paskuale
Is there any expected parameters you may send to that method?
For example
Quote
string(29) "lsResponse ls(ls $parameters)"
Is there any expected parameters you may send to that method?
For example
$params = array( 'someExpectedParam'=>$yourValue );
Share this topic:
Page 1 of 1