Re: [PHP] PHP and curl

2013-09-26 Thread Shawn McKenzie
Unfortunately this isn't anything to do with PHP.  I don't have any info on
the app, what it's supposed to return or what the parameter passed should
be.  The PHP soap call is working, but the app isn't returning what you
want or expect I guess.


On Thu, Sep 26, 2013 at 8:36 AM, Alf Stockton a...@stockton.co.za wrote:

  Shawn, that was silly of me. I have now removed the echo but I still do
 not get the expected result from the server.
 var_dump of $result returns:-

 object(stdClass)#2 (1) {
   [GetSequenceNoResult]=
   object(stdClass)#3 (6) {
 [iServerNo]=
 int(0)
 [iClientNo]=
 int(0)
 [bNoLimitDownload]=
 bool(false)
 [dtStartDate]=
 string(19) 0001-01-01T00:00:00
 [dtEndDate]=
 string(19) 0001-01-01T00:00:00
 [dtServerTime]=
 string(19) 0001-01-01T00:00:00
   }
 }

 whereas the expected result is to have each of those fields containing
 data.
 My code now looks like

 ?php
 $strTerminalname = CIS;
 $version = 1.2;
 $client = new SoapClient(
 http://192.168.0.10/CISWebService/Mediamanager.asmx?WSDL;http://192.168.0.10/CISWebService/Mediamanager.asmx?WSDL
 );
 $result = $client-GetSequenceNo($strTerminalname);
 print_r($result);
 var_dump($result);
 ?


 On 25/09/13 17:23, Shawn McKenzie wrote:

 $result = $client-GetSequenceNo( CIS ); shouldn't be throwing that
 error.  Maybe you are trying to do something with $result afterwards?  Try
 var_dump($result);


 On Wed, Sep 25, 2013 at 10:12 AM, Alf Stockton a...@stockton.co.za wrote:


 On 25/09/13 16:52, Shawn McKenzie wrote:

 $client-GetSequenceNo( $parameters );

 That unfortunately returns

 alf@alf-ThinkPad-T500:~/Development/PHP/DevIt$ php
 php-soap-web-service.php  test.txt
 PHP Catchable fatal error:  Object of class stdClass could not be
 converted to string in
 /home/alf/Development/PHP/DevIt/php-soap-web-service.php on line 7

 No matter if I use
 $result = $client-GetSequenceNo( CIS );
 or
 $result = $client-GetSequenceNo($strTerminalname);




 --

 Regards,
 Alf Stockton  www.stockton.co.za




  --
  --
 Thanks!
 -Shawn
 --


 --

 Regards,
 Alf Stockton  www.stockton.co.za




-- 
Thanks!
-Shawn


Re: [PHP] PHP and curl

2013-09-25 Thread Shawn McKenzie
SOAP functions can be called as methods of the SoapClient object.  Maybe:

$client-GetSequenceNo( $parameters );

-Shawn


On Wed, Sep 25, 2013 at 9:17 AM, Alf Stockton a...@stockton.co.za wrote:

 In an attempt to interface with a webservice on a Windows 7 server I have
 started writing the following:-
 [code]
 ?php
 $strTerminalname = CIS;
 $version = 1.2;
 $client = new SoapClient(http://192.168.0.**
 10/CISWebService/Mediamanager.**asmx?WSDLhttp://192.168.0.10/CISWebService/Mediamanager.asmx?WSDL
 );
 var_dump($client-__**getFunctions());
 $result = 
 $client-__doRequest(**GetSequenceNo,$**strTerminalname,$version,
 $one_way = 0);
 ?
 [/code]
 and I execute it via
 php php-soap-web-service.php  test.txt
 on my Ubuntu 13.04 laptop using php version Zend Engine v2.4.0
 in return I get
 array(20) {
   [0]=
   string(59) GetMediaListResponse GetMediaList(GetMediaList $parameters)
   [1]=
   string(68) GetMediaListAllResponse GetMediaListAll(**GetMediaListAll
 $parameters)
   [2]=
   string(59) GetSoundListResponse GetSoundList(GetSoundList $parameters)
   [3]=
   string(77) GetTerminalDataXMLResponse 
 GetTerminalDataXML(**GetTerminalDataXML
 $parameters)
   [4]=
   string(59) GetRouterXmlResponse GetRouterXml(GetRouterXml $parameters)
   [5]=
   string(80) GetTerminalSoundXMLResponse 
 GetTerminalSoundXML(**GetTerminalSoundXML
 $parameters)
   [6]=
   string(62) SetSequenceNoResponse SetSequenceNo(SetSequenceNo
 $parameters)
   [7]=
   string(50) GetConfigResponse GetConfig(GetConfig $parameters)
   [8]=
   string(62) GetSequenceNoResponse GetSequenceNo(GetSequenceNo
 $parameters)
   [9]=
   string(95) **UpdateClientMediaLogTimeRespon**se
 UpdateClientMediaLogTime(**UpdateClientMediaLogTime $parameters)
   [10]=
   string(59) GetMediaListResponse GetMediaList(GetMediaList $parameters)
   [11]=
   string(68) GetMediaListAllResponse GetMediaListAll(**GetMediaListAll
 $parameters)
   [12]=
   string(59) GetSoundListResponse GetSoundList(GetSoundList $parameters)
   [13]=
   string(77) GetTerminalDataXMLResponse 
 GetTerminalDataXML(**GetTerminalDataXML
 $parameters)
   [14]=
   string(59) GetRouterXmlResponse GetRouterXml(GetRouterXml $parameters)
   [15]=
   string(80) GetTerminalSoundXMLResponse 
 GetTerminalSoundXML(**GetTerminalSoundXML
 $parameters)
   [16]=
   string(62) SetSequenceNoResponse SetSequenceNo(SetSequenceNo
 $parameters)
   [17]=
   string(50) GetConfigResponse GetConfig(GetConfig $parameters)
   [18]=
   string(62) GetSequenceNoResponse GetSequenceNo(GetSequenceNo
 $parameters)
   [19]=
   string(95) **UpdateClientMediaLogTimeRespon**se
 UpdateClientMediaLogTime(**UpdateClientMediaLogTime $parameters)
 }

 now this is all great but my question is how do I call each of these
 functions with parameters.
 The call I immediately need to make is to GetSequenceNo() which requires a
 parameter of CIS in my current configuration.
 How do I do this ? Obviously $client-__doRequest is not the way to go.

 --

 Regards,
 Alf Stockton  www.stockton.co.za


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




Re: [PHP] PHP and curl

2013-09-25 Thread Shawn McKenzie
Keep on list.

$result = $client-GetSequenceNo( CIS ); shouldn't be throwing that
error.  Maybe you are trying to do something with $result afterwards?  Try
var_dump($result);


On Wed, Sep 25, 2013 at 10:12 AM, Alf Stockton a...@stockton.co.za wrote:


 On 25/09/13 16:52, Shawn McKenzie wrote:

 $client-GetSequenceNo( $parameters );

 That unfortunately returns

 alf@alf-ThinkPad-T500:~/Development/PHP/DevIt$ php
 php-soap-web-service.php  test.txt
 PHP Catchable fatal error:  Object of class stdClass could not be
 converted to string in
 /home/alf/Development/PHP/DevIt/php-soap-web-service.php on line 7

 No matter if I use
 $result = $client-GetSequenceNo( CIS );
 or
 $result = $client-GetSequenceNo($strTerminalname);




 --

 Regards,
 Alf Stockton  www.stockton.co.za




-- 
--
Thanks!
-Shawn
--


Re: [PHP] PHP (CLI) + CURL + SSL Problem...

2002-06-07 Thread Mark Heintz PHP Mailing Lists

Are you sure curl was included with the CLI installation?  Try running
this through the CLI to check...

if(extension_loaded('curl')){
  echo 'curl support present';
} else {
  echo 'curl not found';
}

mh.


On 7 Jun 2002, Matthew Walker wrote:

 I have PHP installed both as a module, and as a CLI. When I use CURL
 from inside the module, it works fine for all connections, including
 SSL. When I use the CLI, I can't make SSL connections with CURL. It just
 returns 'false'. Anyone know why?


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




Re: [PHP] PHP (CLI) + CURL + SSL Problem...

2002-06-07 Thread Matthew Walker

It was definately included. I know this two ways.

1. Non-SSL curl sessions work.
2. I used the exact configure string I used for the module version,
minus the --with-apxs option.

On Fri, 2002-06-07 at 14:30, Mark Heintz PHP Mailing Lists wrote:
 Are you sure curl was included with the CLI installation?  Try running
 this through the CLI to check...
 
 if(extension_loaded('curl')){
   echo 'curl support present';
 } else {
   echo 'curl not found';
 }
 
 mh.
 
 
 On 7 Jun 2002, Matthew Walker wrote:
 
  I have PHP installed both as a module, and as a CLI. When I use CURL
  from inside the module, it works fine for all connections, including
  SSL. When I use the CLI, I can't make SSL connections with CURL. It just
  returns 'false'. Anyone know why?
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 



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