I'm trying to create a webservice using php
and soap
.
Assume that I want to redirect user to post office webservice after some stuff.
How should I do this using php
and soap
?
I tried :
function test()
{
return //something like php header() function
}
OR
function test()
{
global $server;
$server->addSoapHeader("location: http://google.com");
}
but both of them are wrong ways.
Would you let me know how should I do this if this is possible?
And if it is possible, can I send some information to another web service, like GET
method or another soap call?
Thanks in Advance
I'm not sure what's your situation but one way to redirect user to another page using soap result is that to send a very simple html
code in String
to user, and then the page that give the soap result, will redirect to your goal page.
Look at this example :
function test() {
return '<!doctype html><html><head><title>Test<title></head><body> <script>window.location = "http://example.com?q=WHERE"</script></body></html>';
}
This will redirect user to another page...
Hope this help you.