can't connect to the web-service

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

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"

[font="Verdana"]I tried a print_r($e) and found out that this URL seems te be used for the request:

[/font][font="Verdana"]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.

[/font]

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!

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)

Hi jugene I try to connect to wsdl whit soapClient, it return me __getFunctions() a list of available funcs:




$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);



[i]// 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)"

}[/i]

how can execute these commands ?!

if I try this code:


var_dump($client->ls());

return me error:

[color="#FF0000"]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[/color]

Hi paskuale

Is there any expected parameters you may send to that method?

For example




$params = array(

	'someExpectedParam'=>$yourValue

);