Solved

New to soap, installing question

Posted on 2009-05-14
5
279 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
[X]
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
  • 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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to implement server side field validation and display customized error messages to the client.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
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…

734 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