Re: WCF & PHP SOAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, however I get the same result.  I'm not sure why I would need the 
arrays, however, say many posts on the PHP site that it was required for 
.NET and just went with it.

The following code generates the following display:

CODE
<?
$wsdl_url = "http://localhost:8000/LimmWatcherController/service?wsdl";;
$client = new SoapClient($wsdl_url);
var_dump($client->__getFunctions());
print "<BR><BR>";
var_dump($client->__getTypes());
print "<BR><BR>";
$result = $client->GetModelFile(7455);
?>

RESULT
array(1) { [0]=> string(59) "GetModelFileResponse GetModelFile(GetModelFile 
$parameters)" }

array(5) { [0]=> string(36) "struct GetModelFile { int nodeId; }" [1]=> 
string(59) "struct GetModelFileResponse { string GetModelFileResult; }" 
[2]=> string(8) "int char" [3]=> string(17) "duration duration" [4]=> 
string(11) "string guid" }


Fatal error: Uncaught SoapFault exception: [HTTP] Unsupported Media Type in 
c:\Inetpub\wwwroot\mastermodel\testService.php:21 Stack trace: #0 [internal 
function]: SoapClient->__doRequest('<?xml version="...', 
'http://localhos...', 'http://tempuri....', 1, 0) #1 [internal function]: 
SoapClient->__call('GetModelFile', Array) #2 
c:\Inetpub\wwwroot\mastermodel\testService.php(21): 
SoapClient->GetModelFile(7455) #3 {main} thrown in 
c:\Inetpub\wwwroot\mastermodel\testService.php on line 8


Thank you,

Kris



""Claus Jørgensen"" <thedeathart@gmail.com> wrote in message 
7eabb8d10802271220r79bdaa36n2a2860e9c3351228@mail.gmail.com">news:7eabb8d10802271220r79bdaa36n2a2860e9c3351228@mail.gmail.com...
> Hi
>
> Have you tried just doing the following?
>
> $wsdl_url = "http://localhost:8000/LimmWatcherController/service?wsdl";;
> $client = new SoapClient($wsdl_url);
> $client->GetModelFile(7455);
>
> Unless your GetModelFile method requires a specific object, it should
> simply be to send the param as above.
> (And it would seem rather odd to require a object, just for a integer 
> value).
>
> 2008/2/27, Kris <klh@iti-global.com>:
>> I have a .NET WCF hosted by a windows service which my PHP app needs to
>>  communcate with.
>>
>>  I am trying a very simple example and cannot get them linked:
>>
>>  PHP CODE
>>  --------------------
>>  $wsdl_url = "http://localhost:8000/LimmWatcherController/service?wsdl";;
>>  $client = new SoapClient($wsdl_url);
>>
>>  $params->nodeId = 7455;
>>
>>  var_dump($client->__getFunctions());
>>
>>  $result = $client->__soapCall('GetModelFile',array('parameters' =>
>>  $params));
>>
>>  RESULT
>>  --------------------
>>  array(1) { [0]=> string(59) "GetModelFileResponse 
>> GetModelFile(GetModelFile
>>  $parameters)" }
>>  Fatal error: Uncaught SoapFault exception: [HTTP] Unsupported Media Type 
>> in
>>  c:\Inetpub\wwwroot\mastermodel\testService.php:9 Stack trace: #0 
>> [internal
>>  function]: SoapClient->__doRequest('<?xml version="...',
>>  'http://localhos...', 'http://tempuri....', 1, 0) #1
>>  c:\Inetpub\wwwroot\mastermodel\testService.php(9):
>>  SoapClient->__soapCall('GetModelFile', Array) #2 {main} thrown in
>>  c:\Inetpub\wwwroot\mastermodel\testService.php on line 9
>>
>>  Notice that the first line here accurately shows my method so I'm 
>> assuming
>>  I'm incorrectly identifying my parameters.?.
>>
>>  I can access this through any .NET client and the function just returns 
>> a
>>  Hello World string (no processing to rule out issues with the method).
>>
>>  Any ideas?
>>
>>  Thank you,
>>
>>  Kris
>>
>>
>>  --
>>  PHP Soap Mailing List (http://www.php.net/)
>>  To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> -- 
> Sincerely
>  Claus Jørgensen, Denmark
>  Mobil: +45 30 13 27 32
>  http://www.dragons-lair.org
> 

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux