473,395 Members | 2,713 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,395 software developers and data experts.

Web Services : passing variables by reference ??

Hello :)

I'm trying to write a script that deals with a web service.
I'm using NuSoap class.

my question is : Can I pass some variables By Reference to the web
service and get the result back in my variables ??
note1: I'm not the one who wrote the web service.. so I can't modify
it.
note2: the web services is written using .NET if this could help

thank you

Best Regards,
Amr Mostafa
Jul 17 '05 #1
4 3563
First, do you know what by reference means? This can be done, depending on
the complexity of the service, but for the most part you are only passing a
*reference* to a variable, so how does the service know what the variable
data is? (since it is hosted on another machine)

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Amr Mostafa" <am***@hotmail.com> wrote in message
news:6d*************************@posting.google.co m...
Hello :)

I'm trying to write a script that deals with a web service.
I'm using NuSoap class.

my question is : Can I pass some variables By Reference to the web
service and get the result back in my variables ??
note1: I'm not the one who wrote the web service.. so I can't modify
it.
note2: the web services is written using .NET if this could help

thank you

Best Regards,
Amr Mostafa

Jul 17 '05 #2
Hello :)
thanks for reply,

ofcourse I know what by reference is.. that's why my question began
with "Can I" not "How...".
but what I thought.. that may be some -behind the scene- occurs. so
the web service returns the variables passed as references as a
regular return. then PHP takes the returned by reference and assign
them to the variables which been passed in the function/web service
call.

anyway, as I said I'm not the one who wrote the web service.. but
someone in another company did and he used vb.net.
In fact I sent him asking "and how could your web service use the
references of my variables ?!!!" and I'm waiting his reply

sorry If I asked a question that doesn't have an answer but I wasn't
sure that it couldn't be done.

please if you have any ideas about how to return multi results.. let
me know.
Until now.. a second solution in my head is using structs.. but I also
don't know if it will work with web services or not. ( didn't make any
test yet )
Thanks a lot

Best Regards,
Amr Mostafa

"CountScubula" <me@scantek.hotmail.com> wrote in message news:<9l******************@newssvr29.news.prodigy. com>...
First, do you know what by reference means? This can be done, depending on
the complexity of the service, but for the most part you are only passing a
*reference* to a variable, so how does the service know what the variable
data is? (since it is hosted on another machine)

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Amr Mostafa" <am***@hotmail.com> wrote in message
news:6d*************************@posting.google.co m...
Hello :)

I'm trying to write a script that deals with a web service.
I'm using NuSoap class.

my question is : Can I pass some variables By Reference to the web
service and get the result back in my variables ??
note1: I'm not the one who wrote the web service.. so I can't modify
it.
note2: the web services is written using .NET if this could help

thank you

Best Regards,
Amr Mostafa

Jul 17 '05 #3
Sorry if my question seem rude, this was not my intent, just wanted to know
if you had a clear understanding of it. (perhaps I should find a better
aproach)

Are you locked into needint to send the referece? maybe you could write a
wrapper function, that would take the reference, assign it a varaible, pass
the variable data, and when returned, rejoin to reference?

hmm, you mentioned structures, I take it you may also be trying to pass
multiple items? thus the need to pass reference to struct, in order to pass
all items in it?

if you just need to have it return a diff reference, as in an index pointer,
then the reference is the data, and that should not be a problem, but the
service (for the most part) will not see the data linked to the reference.

oh, last but not least, there the wrapper again, passing the sturc reference
to a function, having the function pass each item in it to the service,
rebuilding the structure on return.

Just a shot in the dark :)

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Amr Mostafa" <am***@hotmail.com> wrote in message
news:6d**************************@posting.google.c om...
Hello :)
thanks for reply,

ofcourse I know what by reference is.. that's why my question began
with "Can I" not "How...".
but what I thought.. that may be some -behind the scene- occurs. so
the web service returns the variables passed as references as a
regular return. then PHP takes the returned by reference and assign
them to the variables which been passed in the function/web service
call.

anyway, as I said I'm not the one who wrote the web service.. but
someone in another company did and he used vb.net.
In fact I sent him asking "and how could your web service use the
references of my variables ?!!!" and I'm waiting his reply

sorry If I asked a question that doesn't have an answer but I wasn't
sure that it couldn't be done.

please if you have any ideas about how to return multi results.. let
me know.
Until now.. a second solution in my head is using structs.. but I also
don't know if it will work with web services or not. ( didn't make any
test yet )
Thanks a lot

Best Regards,
Amr Mostafa

"CountScubula" <me@scantek.hotmail.com> wrote in message

news:<9l******************@newssvr29.news.prodigy. com>...
First, do you know what by reference means? This can be done, depending on the complexity of the service, but for the most part you are only passing a *reference* to a variable, so how does the service know what the variable data is? (since it is hosted on another machine)

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Amr Mostafa" <am***@hotmail.com> wrote in message
news:6d*************************@posting.google.co m...
Hello :)

I'm trying to write a script that deals with a web service.
I'm using NuSoap class.

my question is : Can I pass some variables By Reference to the web
service and get the result back in my variables ??
note1: I'm not the one who wrote the web service.. so I can't modify
it.
note2: the web services is written using .NET if this could help

thank you

Best Regards,
Amr Mostafa

Jul 17 '05 #4
"CountScubula" <me@scantek.hotmail.com> wrote in message news:<6M***************@newssvr25.news.prodigy.com >...
Sorry if my question seem rude, this was not my intent, just wanted to know
if you had a clear understanding of it. (perhaps I should find a better
aproach)

Are you locked into needint to send the referece? maybe you could write a
wrapper function, that would take the reference, assign it a varaible, pass
the variable data, and when returned, rejoin to reference?

hmm, you mentioned structures, I take it you may also be trying to pass
multiple items? thus the need to pass reference to struct, in order to pass
all items in it?

if you just need to have it return a diff reference, as in an index pointer,
then the reference is the data, and that should not be a problem, but the
service (for the most part) will not see the data linked to the reference.

oh, last but not least, there the wrapper again, passing the sturc reference
to a function, having the function pass each item in it to the service,
rebuilding the structure on return.

Just a shot in the dark :)

--
Mike Bradley
http://www.gzentools.com -- free online php tools


thank you a lot :)
in fact, you inspired me with some great ideas to solve this!

and yes as you said..
I try to pass multiple items.. and also try to recieve mulpile returns
:)
passing mulpile items as not the problem.. the problem with recieving
multiple items.
I will try all your ideas

thanks so much

Best Regards,
Amr Mostafa
Jul 17 '05 #5

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

Similar topics

0
by: lawrence | last post by:
Those of you with backgrounds with the C language will laugh at my mistake, but those of you, like myself, who deal mostly with PHP should be warned about passing variables as references -...
3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
5
by: Andy | last post by:
Hi Could someone clarify for me the method parameter passing concept? As I understand it, if you pass a variable without the "ref" syntax then it gets passed as a copy. If you pass a...
26
by: Dave Hammond | last post by:
In document "A.html" I have defined a function and within the document body have included an IFRAME element who's source is document "B.html". In document "B.html" I am trying to call the function...
7
by: Douglas Robson | last post by:
Ok, I've removed the MyItem class which is found in References.cs and replaced it with a reference to the namespace that has MyItem in it. I've also got rid of the tag at the top of the MyItem...
3
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not...
9
by: Phil B | last post by:
I am having a problem with a datetime from a web services provider The provider is sending the following SOAP response <?xml version="1.0" encoding="utf-8"?> <soap:Envelope...
12
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
7
by: andy | last post by:
A question about about passing a class by reference: Say you have a class called car, and within that you have two objects called car01 and car02. Within the class I have an int variable...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.