473,416 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Noob php error question

Hey folks.
I am trying to get a soap wsdl service working and have a bit of a
noob php programming question for it. I'm using PHP 5.x btw.

I have written a soap server that contains a single method in the
form:

SayHelloWorld( $name ) { return "Hello " .$name; };

If I call the server directly from a soap client, it works fine, and
if I pass in bob as the parameter, I get Hello Bob back as the
response.

The code for that uses the $client= new SoapClient( location of
server ); technique.
Next, I wrote another client that uses a wsdl file that I created
(I've validated this using wsdl.exe and checked it for
wellformedness).

I create a new SOAP_WSDL object and calll generateProxy on it, then I
call the method using the getProxy() technique as in:

$test = $wsdl->getProxy();
$testResult = $test->SayHelloWorld( "bob" );

and this also works fine giving me Hello bob back as the return
param (so I am assuming my wsdl is correct).
Now the third client is where I am getting the problem. I am trying
to use the __soapCall method. However, when I call it, the return
param is:

Hello Object #4

The hello part is coming from the method call (as I have changed it in
the server to check just in case it was cached or something. But no
matter how hard I try I can't get the parameters to work - hence the
Object #4 bit. It should be 'bob'.

My code is as follows:

$client = new SoapClient( "http://a url here/wsdlfile.wsdl");
$client -SayHelloWorld( "bob" )

Since the wsdl seems to work using the wsdl proxy method above, I
figure I am doing something noobish like incorrectly setting up the
params or reading them back again ?

Any ideas ?

Andy

Sep 3 '06 #1
0 1466

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

Similar topics

10
by: Matt Hollingsworth | last post by:
Hello, Very new to python, so a noob question. When I've written stuff in JavaScript or MEL in the past, I've always adopted the variable naming convention of using a $ as the first character...
3
by: We need more power captain | last post by:
Hi, I know less than a noob, I've been asked to do some compiles in VC++ 6 without knowing too much at all. (I'm a COBOL program normally so this is all too much for me) I open VC++6, open...
8
by: Ivan Shevanski | last post by:
Alright heres another noob question for everyone. Alright, say I have a menu like this. print "1. . .Start" print "2. . .End" choice1 = raw_input("> ") and then I had this to determine what...
2
by: Chris Dunaway | last post by:
I was looking over some asp.net code and saw this asp:Image control: <asp:Image ImageUrl="~/images/logo.gif" runat="server" ID="Image1"/> What does the tilde (~) mean in the ImageUrl...
13
by: cgough | last post by:
My true programming language is C++. I am at best a VB6 hacker that is just getting into VB.NET. I have a quick question about when to new and when not to new. Consider the following 2 classes....
2
by: Dan McCollick | last post by:
Hi All, Noob question that I can not seem to figure out: I am trying to implement a screenscraper to pull data from two seperate websites, here is some test code so far: public static void...
8
by: sore eyes | last post by:
Hi I just downloaded the free Watcom compiler and am having a little trouble with File IO http://www.openwatcom.org/index.php/Download I downloaded the following example, commented out the...
2
by: tavspamnofwd | last post by:
I'm a total noob, and I'm trying to understand this code: var newsi = { name:"newsi", dom:false }; newsi.Client=function(){ //stuff }
3
cypherzero
by: cypherzero | last post by:
Using this header file (mstring.h) for a class defined in a seperate file (mstring.cpp) I recieve 8 'unresolved external symbol' errors when trying to use the class in my main source file (main.cpp)....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.