Do you have any good suggestions for developing WebService with PHP? you have never made a Web & nbsp; Service, let alone PHP. What are your suggestions. I searched for an article about using NuSOAP for Web & nbsp; Services and downloaded it. The example program runs successfully. However, I have some more questions. are you recommended to use PHP to develop Web services?
I have never been a Web Service, let alone PHP. What are your suggestions. I searched for an article about using NuSOAP for Web Services and downloaded it. The example program runs successfully. However, there are also some more questions to answer:
1. When will the Web Service be used? Why is it used at this time?
2. is there more NuSOAP? If you don't need this, what are recommended?
Thank you. Service php
------ Solution --------------------
Answer: 1. web services can be used when necessary. for example, webservice can be called for some website sso logins and weather forecasts. Because it is a set of good programs, we only need to input the corresponding parameters to return our corresponding results.
2. php still uses many web service nusoap calls. If you do not want to call the web service, you can develop new methods and implement the same functions as the new class. However, this is too costly and is not recommended, it is better to use webservice when webservice is available.
------ Solution --------------------
The web service is divided into the client and the server. for our call, we only need to instantiate it on the client and then directly input the parameter.
------ Solution --------------------
Php provides soap Extensions. why not use them?
Can REST be considered as a substitute for SOAP?
------ Solution --------------------
Soap should be easy to use. although I have never used it in real time, it may take some time.
------ Solution --------------------
1. When will the Web Service be used? Why is it used at this time?
You can call webservice in other languages or platforms, such as c #, java, python, and ruby on the client.
For example, if you want to build a system (php) and other systems are c #, you need to call your php program. The best way is to directly call the database, but the security is not good, therefore, you write a web service through php, and c # directly writes a client to directly call the webservice you write in php, so that the function can be completed.
2. is there more NuSOAP? If you don't need this, what are recommended?
If you do not need nusoap, you can use soap, which is an extension of php.
------ Solution --------------------
Php provides SOAP extensions, but does not provide WSDL for writing. It can be seen that php developers are not optimistic about SOAP originating from Microsoft.
However, php developers have made great effort on RPC, the predecessor of SOAP.
UnSOAP is only a class of php code. in terms of operation efficiency and standardization, it must be extended by php_soap.
REST (Representational State Transfer declarative State Transfer) is a design and development method for network applications, which can reduce development complexity and improve system scalability.
------ Solution --------------------
Convenient REST protocol
------ Solution --------------------
Reference:
Reference: 1. When will the Web Service be used? Why is it used at this time?
You can call webservice in other languages or platforms, such as c #, java, python, and ruby on the client.
For example, if you want to build a system (php) and other systems are c #, you need to call your php program. The best way is to directly call the database, but the security is not good, so you write a web file through php ......
If you use NuSOAP, you can directly call the class. if you use php soap, you need to generate other file encodings by yourself through tools.