doulubashang6936 2013-03-26 11:32
浏览 56
已采纳

使用固定WSDL文件和PHP SOAP

I' developing a Soap Server using php nusoap library, however , I don't need to use dynamic generated WSDL file feature that's generated by nusoap, I just want to tell nuSoap to use the Fixed WSDL file that's written manully by an another team.

What do you suggest ?

  • 写回答

1条回答 默认 最新

  • douxian5076 2013-03-26 13:43
    关注

    My suggestion - give up. I'm not entirely sure that you can do what you want.

    As you know, NuSOAP creates the WSDL on the fly only from the functions that you specify and then returns the resultant WSDL when requested.

    If you could use an external fixed WSDL, what would happen if it is changed later on without your knowledge? A call to a SOAP method which is not handled by one of your functions could provide unknown results and would need to be handled by the calling machine in a nice, non-customer impacting way. Conversely, if you provide a new functionality but the other team won't adjust the WSDL for you, what do you do? Try and shoe-horn it into some other function?

    Trying to match your functions to a pre-defined WSDL without errors would far out-strip any benefit you could get.

    Stick with the "on-the-fly" generation for consistency and lack of headaches. Use the pre-generated WSDL as a reference but don't bother investigating whether you can use it

    Also, I agree with @chrfin. If they are available on your server, consider using the native PHP SOAP functions - they are noticeably faster than NuSOAP as they are compiled rather than interpreted. The only reason I used NuSOAP in the first place was that (about 5 years ago) the native SOAP had problems communicating with a provider I needed (incorrect variable types etc). Now though, I will be re-factoring all of my code to native PHP SOAP

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

报告相同问题?

悬赏问题

  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题