PEAR:SOAP and PHP5

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PEAR:SOAP and PHP5

Postby hakaa » 14. October 2005 16:42

We are now exploring how we can use PHP in Web services development.
We have without problems installed XAMPP on Windows XP, Mac OS and Linux.

Starting up with examples from the books: "Professional PHP Web services" (WROX) and "PHP5 Power Programming"(Prentice Hall PTR) XAMPP seems to miss everything.

Do we have to install everything in PEAR from scratch ?
Is there no automated downloads in XAMPP handling Web services and SOAP?

BR Hans A. Kielland Aanesen
IT & Integration AS www.iti.as
co-founder EPR-forum www.eprforum.org
OASIS member www.oasis-open.org
User avatar
hakaa
 
Posts: 4
Joined: 14. October 2005 16:12
Location: Norway

Postby Wiedmann » 14. October 2005 16:58

XAMPP seems to miss everything.

example?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Wiedmann » 14. October 2005 21:03

The first fatal error on both Linux and Windows is that the SOAP-classes does not exsist. We have now downloaded SOAP from PEAR for Linux, but then a new pakage is missing (HTTP).

First, i don't know anything about XAMPP/Linux. So let us talk about Windows (but it's similar in Linux):
You want use PEAR::SOAP. So let me look. According to the PEAR-Manual:
Code: Select all
pear.bat list

OK. No package SOAP installed.

Code: Select all
pear.bat search soap

Oh, only a beta package is availible. No stable. --> XAMPP have no beta packages included.

Code: Select all
pear.bat  install -f soap

"-f" because it's a beta package.
--> now you can use PEAR::SOAP

Script example:
require('SOAP/Client.php');
[snip]
<b>C:\XAMPP\xampp\htdocs\ex\Google SOAP kall.php</b> on line
[snip]


I think PEAR::SOAP is not working with the Google API at the moment. But, i never used SOAP before.

So i make the next test with NuSOAP (and not with PEAR::SOAP).
Code: Select all
<?php

   require_once('nusoap.php');

   $parameters = array(
      'key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
      'q' => 'xampp',
      'start' => 0,
      'maxResults' => 5,
      'filter' => true,
      'restrict' => '',
      'safeSearch' => true,
      'lr' => '',
      'ie' => '',
      'oe' => ''
   );

   $soapclient = new soapclient('http://api.google.com/search/beta2');

   $results = $soapclient->call('doGoogleSearch', $parameters, 'urn:GoogleSearch');

   echo '<pre>';
   print_r($results);
   echo '</pre>';
?>


Hey, that's working fine :-)

BTW:
You can also enable the SOAP-Extension in "php.ini". This extension is included in XAMPP/Windows.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

PEAR::SOAP and PHP5

Postby hakaa » 15. October 2005 21:19

Thank you for response !
I got a litle further regarding missing PEAR packager and how to install them.

Your example helped me to see that the right packages was installed.

HTTP_Request stable ( was installed)
Mail_Mime stable ( was installed)
Net_Dime Beta ( needed to be installed )
Net_Url stable ( was installed)

Soap Beta ( needed to be installed )

I stll got the same fatal error regarding SOAP\Client.php .

The reason we are using PEAR::SOAP is that this is the defacto standard for SOAP development in PHP and is the most object oriented version.

Best regards
Hans
IT & Integration AS www.iti.as
co-founder EPR-forum www.eprforum.org
OASIS member www.oasis-open.org
User avatar
hakaa
 
Posts: 4
Joined: 14. October 2005 16:12
Location: Norway

Postby Wiedmann » 16. October 2005 08:22

I stll got the same fatal error regarding SOAP\Client.php.

On Windows or Linux? On Windows i have no "fatal error" while using PEAR::SOAP.

But you remeber? At the moment you can not use PEAR::SOAP with the Google API. (not with the latest PEAR::SOAP).

So i think it's a good idea to use another well known and stable soap class: NuSOAP.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 72 guests