SOAP Server in PHP - how to write a WSDL file - tips

I have a rather complicated (authentication, logs, ...) SOAP server (standard PHP extension). Everything works fine, but I want to know if there is any tool for creating / creating a WSDL file? All the changes that I do manually, and there are two problems:

  • local

I have to test the reasons for the same SOAP server on localhost - I need the same WSDL file, and only the difference in url addresses that point to localhost. I copy and paste lines from one (local) file to another (production) file, and this is a good way to make a mistake.

  • new function When I want to add a function to WSDL, it takes me a long time to understand wsdl again because it has more than 1000 lines.

I am new to SOAP as well as WSDL - I am looking for a good (and free) WSDL editor or tool to transfer a WSDL file.

+4
source share
3 answers

Try the WSO2 WSF / PHP Library . It can generate WSDL directly from your code.

0
source

If you use Eclipse, you can take a look at the WSDL Editor .

You can also create a build script that parses an existing WSDL (this is XML) and replaces certain target files (like hostname) with another.

0
source

Creating a WSDL file from scratch can be very complex and error prone. To facilitate this process, you can use the IDE to generate a WSDL file for your PHP functions and pass it as a parameter to your PHP SoapServer class. Check out this simple guide on how to generate wsdl for the native php soap class

0
source

Source: https://habr.com/ru/post/1380529/


All Articles