Generating PHP Code from WSDL
You can use the wsdl2pst script to generate a service skeleton class from your existing WSDL. On Windows, use wsdl2pst.bat with the same parameters.
Script Parameters
The wsdl2pst script wraps usage of the underlying WSDL parsing, object model, XML generation and XLST execution, so you can just worry about generating code. Here are the command-line parameters:
Usage: ./wsdl2php [options] -w <wsdl-file>, where:
-n [ServiceName] (optional) The service within the WSDL that will be used.
Defaults to the first service in the document.
-o [OutputFolder] (optional) Path where files should be written.
Default is the current folder.
-s [ServiceFolder] (optional) Path where service files should be written.
Default is the output-folder.
-v [TRUE/FALSE] (optional) If TRUE, then write verbose output to stdout.
Default is FALSE (moderate output).
-q [TRUE/FALSE] (optional) If TRUE, then write no output to stdout.
Default is FALSE (moderate output).
-x [TRUE/FALSE] (optional) If TRUE, then write XML files but do not transform.
Default is FALSE (write only transformed content)
-t [ServiceTransformFile] (optional) Path and name of XSL file to use for generating code
from the parsed service object.
Default is ./xslt/ServiceClass.xsl.
-d [DataTransformFile] (optional) Path and name of XSL file to use for generating code
from the parsed service object.
Default is ./xslt/DataClass.xsl.
-w<wsdl-file> (required) Path and filename of the wsdl to parse
Examples
# Create a service skeleton class and any required data classes in the folder output, located under the current folder, using the WSDL file called 'sample.wsdl', located in the current folder. Write normal amounts of output to the screen:
./wsdl2pst -w sample.wsdl -o ./output
