|
|
@@ -1,6 +1,6 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!-- Reviewed: no -->
|
|
|
-<!-- EN-Revision: 20810 -->
|
|
|
+<!-- EN-Revision: 22743 -->
|
|
|
<sect1 id="zend.soap.autodiscovery">
|
|
|
<title>自動検出</title>
|
|
|
|
|
|
@@ -80,8 +80,9 @@
|
|
|
<para>
|
|
|
これは自動検出機能の一般的な用法の例です。
|
|
|
<methodname>handle()</methodname>関数はWSDLファイルを生成してブラウザーにポストします。
|
|
|
+ </para>
|
|
|
|
|
|
- <programlisting language="php"><![CDATA[
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
class My_SoapServer_Class {
|
|
|
...
|
|
|
}
|
|
|
@@ -90,7 +91,6 @@ $autodiscover = new Zend_Soap_AutoDiscover();
|
|
|
$autodiscover->setClass('My_SoapServer_Class');
|
|
|
$autodiscover->handle();
|
|
|
]]></programlisting>
|
|
|
- </para>
|
|
|
|
|
|
<para>
|
|
|
ファイルまたは<acronym>XML</acronym>ストリングとして保存するために生成されたWSDLファイルへのアクセスも必要ならば、
|
|
|
@@ -116,8 +116,7 @@ $autodiscover->handle();
|
|
|
<classname>Zend_Soap_Server</classname>クラスを準備しなくてはいけません。
|
|
|
</para>
|
|
|
|
|
|
- <para>
|
|
|
- <programlisting language="php"><![CDATA[
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
if(isset($_GET['wsdl'])) {
|
|
|
$autodiscover = new Zend_Soap_AutoDiscover();
|
|
|
$autodiscover->setClass('HelloWorldService');
|
|
|
@@ -129,7 +128,6 @@ if(isset($_GET['wsdl'])) {
|
|
|
$soap->handle();
|
|
|
}
|
|
|
]]></programlisting>
|
|
|
- </para>
|
|
|
</note>
|
|
|
</sect2>
|
|
|
|
|
|
@@ -139,12 +137,13 @@ if(isset($_GET['wsdl'])) {
|
|
|
<para>
|
|
|
クラスが<acronym>SOAP</acronym>サーバー機能を提供することに使われるならば、
|
|
|
同じクラスはWSDL生成のために<classname>Zend_Soap_AutoDiscover</classname>に提供されなければなりません:
|
|
|
- <programlisting language="php"><![CDATA[
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
$autodiscover = new Zend_Soap_AutoDiscover();
|
|
|
$autodiscover->setClass('My_SoapServer_Class');
|
|
|
$autodiscover->handle();
|
|
|
]]></programlisting>
|
|
|
- </para>
|
|
|
|
|
|
<para>
|
|
|
WSDL生成の間、以下の規則が使われます:
|
|
|
@@ -207,7 +206,9 @@ $autodiscover->handle();
|
|
|
<para>
|
|
|
関数のセットが<acronym>SOAP</acronym>サーバー機能を提供することに使われるならば、
|
|
|
同じセットはWSDL生成のために<classname>Zend_Soap_AutoDiscovery</classname>に提供されなければなりません:
|
|
|
- <programlisting language="php"><![CDATA[
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
$autodiscover = new Zend_Soap_AutoDiscover();
|
|
|
$autodiscover->addFunction('function1');
|
|
|
$autodiscover->addFunction('function2');
|
|
|
@@ -215,7 +216,6 @@ $autodiscover->addFunction('function3');
|
|
|
...
|
|
|
$autodiscover->handle();
|
|
|
]]></programlisting>
|
|
|
- </para>
|
|
|
|
|
|
<para>
|
|
|
WSDL生成の間、以下の規則が使われます:
|
|
|
@@ -298,7 +298,7 @@ $autodiscover->handle();
|
|
|
</listitem>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- <acronym>PHP</acronym>クラス <-> 複雑な型のストラテジーに基づいた (<xref linkend="zend.soap.wsdl.types.add_complex" />参照)
|
|
|
+ <acronym>PHP</acronym>クラス <-> 複雑な型のストラテジーに基づいた (<link linkend="zend.soap.wsdl.types.add_complex">このセクション</link>参照)
|
|
|
<footnote>
|
|
|
<para>
|
|
|
<classname>Zend_Soap_AutoDiscover</classname>は複雑な型のための検出アルゴリズムとして
|
|
|
@@ -343,8 +343,7 @@ $autodiscover->handle();
|
|
|
スタイルを設定できます。
|
|
|
</para>
|
|
|
|
|
|
- <para>
|
|
|
- <programlisting language="php"><![CDATA[
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
$autodiscover = new Zend_Soap_AutoDiscover();
|
|
|
// デフォルトは 'use' => 'encoded' 及び
|
|
|
// 'encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/' です。
|
|
|
@@ -363,6 +362,5 @@ $autodiscover->setBindingStyle(
|
|
|
$autodiscover->addFunction('myfunc1');
|
|
|
$autodiscover->handle();
|
|
|
]]></programlisting>
|
|
|
- </para>
|
|
|
</sect2>
|
|
|
</sect1>
|