Welcome, Guest. Please login or register.
Did you miss your activation email?
05/23/12, 02:16
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  Web Services: XML, Soap, WSDL, UDDI, and Flash Integration (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Jorge Solis)
| | |-+  ''Wether'' php nusoap client (help)
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: ''Wether'' php nusoap client (help)  (Read 5594 times)
Arek
Server what's that
*
Posts: 3



View Profile Email
« on: 04/19/04, 10:25 »

hi there :)

I `m  very sorry for my bad english(it`s not my primary language..)

I`m trying to get the weather php client done (to use this webservice http://www.flash-db.com/services/?ID=34&sType=Weather )... :P

but i dont now exaclty how  :-[

this is what i have done:

<?php


include("nusoap.php");


$param = array ('stationcode' => 'LCJ');


$clientSOAP = new soapclient('http://live.capescience.com/wsdl/GlobalWeather.wsdl');


$result = $clientSOAP->call('getWeatherReport', $param);


echo $result


?>





what is rong in this code(probably everything..)???

I now that this forum is a flash forum but this is the only place i can ask about this webserices(nusoap)
Logged
Musicman
Administrator
Systems Administrator
*****
Posts: 2685



View Profile WWW Email
« Reply #1 on: 04/19/04, 13:43 »

Hi,

replace the final echo line by
var_dump $result;
You should get some php array .if all goes well )it did mot work for me, but maybe it is the station code)

Musicman
Logged
Arek
Server what's that
*
Posts: 3



View Profile Email
« Reply #2 on: 04/19/04, 14:12 »

like this:


<?php


include("nusoap.php");


$param = array ('stationcode' => 'JFK');


$clientSOAP = new soapclient('http://live.capescience.com/wsdl/GlobalWeather.wsdl');


$result = $clientSOAP->call('getWeatherReport', $param);


var_dump $result;


?>



this wont work....i can`t use var_dumb in this script..

Parse error: parse error, unexpected T_VARIABLE in D:\Test\a.php on line 16

That script :


#include "NetServices.as"
#include "NetDebug.as"

// create result handler for results and error messages.
serviceResult = new Object();
serviceResult.onResult = function(result){
   trace(result)
}
serviceResult.onStatus = function(status){
   trace(status);
}

// sets up the gateway connection.
var serverConn     = NetServices.createGatewayConnection("<PathToYourGateway>");

// sets up the service.
var service = serverConn.getService("http://live.capescience.com/wsdl/GlobalWeather.wsdl", serviceResult);

// Set the params and call the service
// returns weather for an airport code.
params = {
   stationcode:'KLAX'
}

// calls the getWeatherReport method.
service.getWeatherReport(params);


hear are var`s but this is action script right?

I have got a qustion -on nusoap serwer are those dates in aray or what?
mayby this is rong:
$param = array ('stationcode' => 'JFK'); ???
Logged
Arek
Server what's that
*
Posts: 3



View Profile Email
« Reply #3 on: 04/19/04, 18:50 »

okey i`ve got it:

<?
include('nusoap.php');

$parameters = array ( "stationcode"=>"JFK" );

$soapclient  = new soapclient('http://live.capescience.com/wsdl/GlobalWeather.wsdl','wsdl');

// Call the service - the method to call is shown in red.
$result = $soapclient->call('getWeatherReport',$parameters);


print "$result";
?>


but the nusoap server is not responding now i will try later

ok thanks Smiley
Logged
Brian D
Server what's that
*
Posts: 6



View Profile WWW
« Reply #4 on: 06/21/04, 23:52 »

I am new to this  too and I am trying to get current weather conditions for 4 cities and scroll them in a ticker.  And I am a pretty primitive programmer any help would be greatly appreicated.

where do I find the files to include ?

#include "NetServices.as"
#include "NetDebug.as"


I searched all through my flash folder and app support files?

I was looking at the airport weather  info from this site.

TIA
palnudb
Logged
vesa kortelainen
Administrator
Systems Administrator
*****
Posts: 3450


View Profile
« Reply #5 on: 06/22/04, 00:57 »

those .as files are part of remoting components, are you sure u downloaded em?
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!