【问题标题】:NUSOAP: How to create document style wsdl using nusoap?NUSOAP:如何使用 nusoap 创建文档样式 wsdl?
【发布时间】:2015-12-08 07:22:21
【问题描述】:

我正在使用 nusoap 创建 wsdl 文件。默认情况下,它创建 rpc 样式的 wsdl。有没有办法使用 nusoap 创建文档样式 wsdl?

【问题讨论】:

    标签: php soap wsdl nusoap


    【解决方案1】:

    在 $server->register() 中你必须添加以下参数:

    $server->register(
        'MethodPublished',
        array('Req' => 'xsd:string'), // In Params
        array('Return' => 'xsd:string'), // Out Params
        'urn:WsWsdl', //  workspace name
        'urn:ErrorReportWsdl#ReportError', // soap actin
        'document', // style
        'literal', // use
        'Documentation' // Documentation
    );
    

    第 6 和第 7 参数表示您需要什么

    在这种情况下,您返回的方法“MethodPublished”必须类似于:

     return [
             "Return" => "Something"
            ]; 
    

    【讨论】:

      【解决方案2】:

      你应该这样配置

      $server->configureWSDL('servicename', 'namespace', 'endpoint', 'document');
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多