dongyuan4790 2015-09-03 04:21
浏览 110
已采纳

使用soap服务重定向用户

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

  • 写回答

1条回答 默认 最新

  • douzhaobo6488 2015-09-25 02:31
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 如何将下列的“无限压缩存储器”设计出来
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口