Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

New to soap, installing question

Posted on 2009-05-14
5
277 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

839 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