Obtaining the WSDL for an SCA component offering a Service as a Web service
SCA components that expose a Web service interface (i.e. have an @binding.soap annotation) will return their WSDL definition in response to an HTTP request with a get parameter of "wsdl". The usual way to obtain this is with "?wsdl" on the end of a URL. The example below uses file_get_contents() to obtain WSDL from a service and writes it to a temporary file before then obtaining a proxy for the service in the usual way. You could of course also obtain the WSDL in a browser, or by some other means, and save the file yourself.
Пример #1 Generated WSDL
<?php $wsdl = file_get_contents('http://www.example.com/Services/Example.php?wsdl'); file_put_contents("service.wsdl",$wsdl); //write the wsdl to a file $service = SCA::getService('service.wsdl'); ?>
NOTE: If the wsdl requires imported xsds, these will need to be fetched separately.
- The structure of a Service Component
- Obtaining a proxy for another Service Component
- Calling another Service Component
- Locating and calling services from a script which is not an SCA Component
- Exposing a Service Component as a Web service
- Deploying an SCA component
- Obtaining the WSDL for an SCA component offering a Service as a Web service
- Understanding how the WSDL is generated
- Working with Data Structures
- Error handling