Solved

New to soap, installing question

Posted on 2009-05-14
5
278 Views
Last Modified: 2013-12-13
Hi all,

I want to start using soap and I have certain problems with the installation.
My PHP version is 5.2.5 and I'm working on Windows. I've read that with this version number I don't need to install anything but the script below shows nothing, a blank page.

What do I have to do to get soap running?

Thanks a ton in advance!  
<?php 
 
   $client = new SoapClient
      ("http://www.xmethods.net/sd/2001/DemoTemperatureService.wsdl");
   echo("\nReturning value of getTemp() call: ".
      $client->getTemp("12345"));
?>

Open in new window

0
Comment
Question by:Dada44
  • 3
  • 2
5 Comments
 
LVL 39

Expert Comment

by:Roger Baklund
ID: 24386613
Are you sure that wsdl exists? I get this when I request it in the browser:

The requested URL /sd/2001/DemoTemperatureService.wsdl was not found on this server.
0
 
LVL 39

Expert Comment

by:Roger Baklund
ID: 24386864
When doing the call, fetch the result and use var_dump() to see the properties:

$res = $client->getTemp("12345");
var_dump($res);
0
 

Author Comment

by:Dada44
ID: 24387015
if I do:
$res = $client->getTemp("12345");
var_dump($res);
nothing shows, blank page again :(
Can you give me please a wsdl  that you know for sure it works? it's hard to tell when you're this newbie :)
Thanks!
0
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
ID: 24387195
Here is one:
$wsdl = 'http://www.ecubicle.net/iptocountry.asmx?wsdl';
$client = new soapclient($wsdl);
$param = array('V4IPAddress'=>'64.156.132.140');
$res = $client->FindCountryAsString($param);
var_dump($res);
echo "<br />Country:".$res->FindCountryAsStringResult;

Open in new window

0
 

Author Closing Comment

by:Dada44
ID: 31581539
Thanks!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Mail error 3 42
pass foreach data in php into jquery ajax 10 44
MediaWiki - Move a site 4 30
How to remove a section of the main menu from Magento 1.9.3 3 22
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question