473,802 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple Nusoap Problem

Hello. I am having what is probably the simplest problem there is with
Nusoap. I have to admit I'm new to this stuff, but I have some
programming experience and what I'm doing *shouldn't* be hard. First
thing I tested the Hello (sample server and client) that are in the
Readme file. No problem. Then I tried to accepting the data from the
URL string (GET). That worked. Then I tried two parameters and the
only output I get is the word "Array". I've tried it with two
completely different scripts. I've tried all kinds of ways of loading
the arrays, and I tried echoing the array values in the client script
just to be sure they are there and they are. I'm sure I have the
latest version of nusoap.php. I searched the newsgroups for anyone
with a similar problem and couldn't find it. Any clues you could
provide would be greatly appreciated. Here's the script I'm using.

<?php

require_once('n usoap.php');
$parameters = array('name1'=> $_GET['name1'], 'name2'=>$_GET['name2]);
$soapclient = new soapclient('htt p://www.myserver.ne t/soapserverhello .php');
echo $soapclient->call('hello' , $parameters);

?>

Thank you.
-Larry.
Jul 17 '05 #1
2 5296
hi larry,

the soap client is looking fine.

please make sure that the method of the soap server is taking more then one parameter.

require_once "nusoap.php ";

function hello($arg1, $arg2)

{

$res = $arg1 . $arg2;

return $res;

}

$soap = new soap_server;

$soap->register("args ");

$soap->service($HTTP_ RAW_POST_DATA);
cheers,
moe.

<?php

require_once(' nusoap.php');
$parameters = array('name1'=> $_GET['name1'], 'name2'=>$_GET['name2]);
$soapclient = new soapclient('htt p://www.myserver.ne t/soapserverhello .php');
echo $soapclient->call('hello' , $parameters);

?>

Jul 17 '05 #2
Thanks. I did include two arguments to the function. I even commented
out the faults. Here's what I have. I swear this is the toughest time
I've had with a simple program.

<?php

require_once('n usoap.php');
function hello($name1, $name2){
// optionally catch an error and return a fault
/*if($name1 == ''){
return new soap_fault('Cli ent','','Must supply a valid name.');
}
if($name2 == ''){
return new soap_fault('Cli ent','','Must supply a valid name.');
}*/
$res_str = "hello " . $name1 . " " . $name2;
return $res_str;
}

$s = new soap_server;
$s->register('hell o');
$s->service($HTTP_ RAW_POST_DATA);

?>
Timo Schäfer <ti***********@ media-art.net> wrote in message news:<c1******* ******@news.t-online.com>...
hi larry,

the soap client is looking fine.

please make sure that the method of the soap server is taking more then one parameter.

require_once "nusoap.php ";

function hello($arg1, $arg2)

{

$res = $arg1 . $arg2;

return $res;

}

$soap = new soap_server;

$soap->register("args ");

$soap->service($HTTP_ RAW_POST_DATA);
cheers,
moe.

<?php

require_once(' nusoap.php');
$parameters = array('name1'=> $_GET['name1'], 'name2'=>$_GET['name2]);
$soapclient = new soapclient('htt p://www.myserver.ne t/soapserverhello .php');
echo $soapclient->call('hello' , $parameters);

?>

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2381
by: Unbreakable | last post by:
I am using the nusoap client and nusoap server without any problem. However, once I change the client to the excel, I am not sure how to call the nusoap server. Especially the nusoap server only generate the a SOAP message as follow instead of a WSDL file. So, my question is 1.) Can I use excel or .Net as a client to call the nusoap server?
0
2969
by: Ward G | last post by:
Hi, Below is a basic webservice using the NuSOAP class. When I run the code to register the service, I get the nice html page generated by nusoap, offering a link to view the WSDL for my service. When I click it, php barfs this : Cannot modify header information - headers already sent by \nusoap.php on line 2421.
5
5389
by: Mark C | last post by:
I have a memory allocation problem in PHP using NuSOAP and the built in XML parser. The code below is called in a loop and executed about 1900 times before it failed. I am using nusoap.php,v 1.76 2004/06/25 13:17:56 snichol Exp $. I am running PHP version 4.2.2 on RedHat 9.0 I presume I need to unallocated something other than the soapclient, but I'm nor sure what. This is the code that is called in the loop and the error message...
0
1561
by: Afnan Zari | last post by:
Hi, i've facing a problem in nusoap server ... scenario is my server is in NUSoap ... and have used complex types in my WS. My client is Pear Soap and GSoap. NuSoap ws accepts an argument with array of complex types, so when i call it from any client (pear/G) it passes last argument as [\[\[\[ ...
3
6363
by: James Kennedy | last post by:
Hi, I've downloaded the NuSoap class files. I've put them onto my localhost/ where I run my php scripts, just put the nusoap.php file in there. I've got loads of different scripts to try out (including the ones that come with soap) and I'm getting the same error for each of them: Fatal error: Cannot redeclare class soapclient in /opt/lampp/htdocs/Jims/Database/nusoap.php on line 6500
2
4721
by: Johnny | last post by:
Searched on google for any info relating to this before posting here but found none. I set up a web service using nusoap on apache php 4.3.8 on windows with error_reporting = E_ALL and had that service set a cookie in the client browser as the first output. Works fine in IE6 and the service returns the state of the cookie in the client browser but in firefox 1.0 the exact same service gives a notice error about an undefined variable...
2
5567
by: Gary Townsend | last post by:
I am writing an app in vb .net that will use an XML webservice written in PHP NuSoap. I want to have the NuSoap server send a dataset to my VB .NET application i am trying to find any documentation of anyone pullling data from a database in PHP then using NuSoap to send it to a .NET application and have the .NET proxy class recognize the return datatype as a dataset so that i can cache the dataset on the desktop application. Gary...
0
4194
by: devthx | last post by:
Hi! I code php with nusoap for my web services and would like to consume it with c# soap client. Everything seem to be fine until I try to send data in Thai characters and recieved a garbage. Does anyone had experience about synchronize the charset between .net and nusoap. Thanks for help. devthx
6
21010
amine
by: amine | last post by:
Hello People, I created a WebService in .NET on my machine with following methode: <WebMethod(Description:="test")> _ Public Function sayHello(ByVal myName As String, ByVal myID As Integer) As String Return "Hello " & myName & " (" & myID & ")" End Function Web service works fine, I can access my function in .NET without problem.
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10304
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9114
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.