douting0585 2014-03-18 18:19
浏览 99

设置SOAP-ENV Nusoap的值

How to change my Soapenv:Envelope parameter from this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ejb="http://ejb.gateway.ebpp.fawryis.com/" 
xmlns:ns3678="http://tempuri.org">

to this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ejb="http://ejb.gateway.ebpp.fawryis.com/">

How to set the nusoap client Soapenv so it can be the same as the second format?

Also in every element there is xmlns empty attribute:

<process xmlns="http://ejb.gateway.ebpp.fawryis.com/">
<arg0 xmlns=""><Request xmlns="">

How to remove those xmlns attributes?


Here is my code:


$client = new nusoap_client($wsdl_path,   TRUE);

        $client->namespaces = array(
        'SOAP-ENV'=>"http://schemas.xmlsoap.org/soap/envelope/",
        'ejb'=>"http://ejb.gateway.ebpp.fawryis.com/"
);
$parameters = array(//the parameters );
$result = $client->call("process", $parameters);

Thank you

  • 写回答

1条回答 默认 最新

  • dongshi1914 2015-11-17 12:14
    关注

    I understand you could fork Nusoap project and customize nusoap.php source code to return exactly what you whish. But notice that some people are telling us we don't need to bother with this prefix SOAP-ENV. If you do not care about which one is being serialized (SOAP-ENV or soap prefix), keep using the original nusoap project. Remember to enter the same namespace.

    Here some extra information:

    You can use any string you like as a namespace prefix, just as long as it maps to the appropriate namespace name. The reason why the spec bothers with telling us the notational conventions is that prefix names (e.g., SOAP-ENV) aren't normative.

    Source: SOAP-ENV vs. soapenv

    ...as long as soap and SOAP-ENV refer to the same namespace URI, then everything will be OK.

    Source: SOAP-ENV: vs. soap:Envelope

    ...can be any allowed string - it does not matter to the XML parser as long as the correct namespace URL has been given.

    Source: SOAP Envelope namespace

    评论

报告相同问题?

悬赏问题

  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥30 自适应 LMS 算法实现 FIR 最佳维纳滤波器matlab方案
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥15 Python3.5 相关代码写作
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动