By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,611 Members | 1,627 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,611 IT Pros & Developers. It's quick & easy.

Web Services : passing variables by reference ??

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.