📄 sca.examples.obtaining-wsdl.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Obtaining the WSDL for an SCA component offering a Service as a Web service</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="SCA.examples.deploy.html">Deploying an SCA component</a></div> <div class="next" style="text-align: right; float: right;"><a href="SCA.examples.understanding-wsdl.html">Understanding how the WSDL is generated</a></div> <div class="up"><a href="sca.examples.html">Examples</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="SCA.examples.obtaining-wsdl" class="section"> <h2 class="title">Obtaining the WSDL for an SCA component offering a Service as a Web service </h2> <p class="para"> 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 <a href="function.file-get-contents.html" class="function">file_get_contents()</a> 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. </p> <p class="para"> <div class="example"> <p><b>Example #1 Generated WSDL </b></p> <div class="example-contents"><div class="cdata"><pre><?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'); ?></pre></div> </div> </div> </p> <p class="para"> NOTE: If the wsdl requires imported xsds, these will need to be fetched separately. </p> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="SCA.examples.deploy.html">Deploying an SCA component</a></div> <div class="next" style="text-align: right; float: right;"><a href="SCA.examples.understanding-wsdl.html">Understanding how the WSDL is generated</a></div> <div class="up"><a href="sca.examples.html">Examples</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -