php 中的 Perfect Soap (Wsdl) Web 服务
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12490298/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Perfect Soap (Wsdl) web service in php
提问by tv.ashvin
I am a PHP programmer, I want to create a SOAP web service using WSDL.
我是一名 PHP 程序员,我想使用 WSDL 创建一个 SOAP Web 服务。
Please could someone suggest any simple tutorials or code that enable me to make object on Device (iPhone, Blackberry, Android) End.
请有人建议任何简单的教程或代码,使我能够在设备(iPhone、黑莓、Android)端创建对象。
回答by Tony Stark
Here are some tutorials & examples of SOAP (WSDL) web service in PHP:
以下是 PHP 中 SOAP (WSDL) Web 服务的一些教程和示例:
- Creating Web Services with PHP and SOAP, Part 1(out of date - nusoap)
- Creating Web Services with PHP and SOAP, Part 2(out of date - nusoap)
- wsdl2php Manual(PHP SOAP extension)
- Web Services - WSDL: Creating SOAP Server(PHP SOAP extension)
- WSDL Document Example(SOAP explanation, no PHP)
- 使用 PHP 和 SOAP 创建 Web 服务,第 1 部分(过时 - nusoap)
- 使用 PHP 和 SOAP 创建 Web 服务,第 2 部分(过时 - nusoap)
- wsdl2php 手册(PHP SOAP 扩展)
- Web 服务 - WSDL:创建 SOAP 服务器(PHP SOAP 扩展)
- WSDL 文档示例(SOAP 解释,无 PHP)
Edit: For Latest Version of PHP above 5.3
编辑:对于 5.3 以上的最新版本的 PHP
The SoapClient classis used in latest version of PHP (5.3 & up).
该SoapClient的类在PHP的最新版本(5.3及以上)使用。
It may help you.
它可能会帮助你。
回答by Massimiliano Arione
Please avoid following some the suggested links from Tony Stark's answer, they are really out of date.
请避免遵循Tony Stark 回答中的一些建议链接,它们确实过时了。
For example, using nusoap is really a pain in the ass with a currently supported version of PHP (e.g. 5.3/5.4).
例如,对于当前支持的 PHP 版本(例如 5.3/5.4),使用 nusoap 真的很麻烦。
A better alternative is the SoapClientfrom the native PHP SOAP extension.
更好的选择是来自本机 PHP SOAP 扩展的SoapClient。

