فهرست منبع

[DOCUMENTATION] Japanese: new Zend_Soap_AutoDiscovery

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@15738 44c647ce-9c0f-0410-b52a-842ac1e357ba
yoshida@zend.co.jp 16 سال پیش
والد
کامیت
d586f1878b
1فایلهای تغییر یافته به همراه134 افزوده شده و 114 حذف شده
  1. 134 114
      documentation/manual/ja/module_specs/Zend_Soap_AutoDiscovery.xml

+ 134 - 114
documentation/manual/ja/module_specs/Zend_Soap_AutoDiscovery.xml

@@ -1,81 +1,87 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Reviewed: no -->
-<!-- EN-Revision: 15602 -->
+<!-- EN-Revision: 15617 -->
 <sect1 id="zend.soap.autodiscovery">
-    <title>AutoDiscovery</title>
+    <title>自動検出</title>
 
     <sect2 id="zend.soap.autodiscovery.introduction">
-        <title>AutoDiscovery導入</title>
+        <title>自動検出導入</title>
         <para>
-            SOAP functionality implemented within Zend Framework is intended to make all steps
-            required for SOAP communications more simple.
+            Zend Frameworkの中で実装されるSOAP機能は、
+            すべてのステップをより単純なSOAP通信のために必要とされるようにすることを目的とします。
         </para>
 
         <para>
-            SOAP is language independent protocol. So it may be used not only for PHP-to-PHP communications.
+            SOAPは言語に依存しないプロトコルです。
+            そのため、PHPからPHPへの通信だけのために使われないかもしれません。
         </para>
 
         <para>
-            There are three configurations for SOAP applications where Zend Framework may be utilized:
+            Zend Frameworkが利用されるかもしれないSOAPアプリケーションのために、
+            3種類の構成があります:
             <orderedlist>
                 <listitem>
-                    <simpara>SOAP server PHP application &lt;---&gt; SOAP client PHP application</simpara>
+                    <simpara>SOAPサーバー PHPのアプリケーション &lt;---&gt; SOAPクライアント PHPのアプリケーション</simpara>
                 </listitem>
                 <listitem>
-                    <simpara>SOAP server non-PHP application &lt;---&gt; SOAP client PHP application</simpara>
+                    <simpara>SOAPサーバー PHPではないアプリケーション &lt;---&gt; SOAPクライアント PHPのアプリケーション</simpara>
                 </listitem>
                 <listitem>
-                    <simpara>SOAP server PHP application &lt;---&gt; SOAP client non-PHP application</simpara>
+                    <simpara>SOAPサーバー PHPのアプリケーション &lt;---&gt; SOAPクライアント PHPではないアプリケーション</simpara>
                 </listitem>
             </orderedlist>
         </para>
 
         <para>
-            We always have to know, which functionality is provided by SOAP server to operate with it.
-            <ulink url="http://www.w3.org/TR/wsdl">WSDL</ulink> is used to describe network service API
-            in details.
+            SOAPサーバーで提供される機能を常に知っていなければなりません。
+            <ulink url="http://www.w3.org/TR/wsdl">WSDL</ulink>
+            ネットワーク・サービスAPIを詳細に記述するために使われます。
         </para>
 
         <para>
-            WSDL language is complex enough (see <ulink url="http://www.w3.org/TR/wsdl">http://www.w3.org/TR/wsdl</ulink>
-            for the details). So it's difficult to prepare correct WSDL description.
+            WSDL言語は、十分に複雑です。
+            (詳しくは<ulink url="http://www.w3.org/TR/wsdl">http://www.w3.org/TR/wsdl</ulink>をご覧下さい)
+            そのため、WSDLの正しい説明を用意することは困難です。
         </para>
 
         <para>
-            Another problem is synchronizing changes in network service API with already existing WSDL.
+            もう一つの問題は、すでに既存のWSDLの変化をネットワーク・サービスAPIで同期することです。
         </para>
 
         <para>
-            Both these problem may be solved by WSDL autogeneration. A prerequisite for this is a SOAP server autodiscovery.
-            It constructs object similar to object used in SOAP server application, extracts necessary information and generates
-            correct WSDL using this information.
+            両方の問題は、WSDL自動生成によって解決されるかもしれません。
+            この必要条件は、SOAPサーバー自動検出です。
+            それはSOAPサーバー・アプリケーションで使われる、
+            オブジェクトに類似したオブジェクトを組み立て、
+            必要な情報を引き出して、この情報を使う正しいWSDLを生成します。
         </para>
 
         <para>
-            There are two ways for using Zend Framework for SOAP server application:
+            SOAPサーバー・アプリケーションのためにZend Frameworkを使う2つの方法があります:
             <itemizedlist>
                 <listitem>
-                    <para>Use separated class.</para>
+                    <para>分離されたクラスを使用</para>
                 </listitem>
                 <listitem>
-                    <para>Use set of functions</para>
+                    <para>関数のセットを使用</para>
                 </listitem>
             </itemizedlist>
         </para>
 
         <para>
-            Both methods are supported by Zend Framework Autodiscovery functionality.
+            両方のメソッドは、Zend Framework 自動検出機能によってサポートされます。
         </para>
 
         <para>
-            The<classname>Zend_Soap_AutoDiscover</classname> class also supports datatypes mapping from PHP to <ulink url="http://www.w3.org/TR/xmlschema-2/">XSD types</ulink>.
+            <classname>Zend_Soap_AutoDiscover</classname>クラスも、
+            PHPから<ulink url="http://www.w3.org/TR/xmlschema-2/">XSD型</ulink>までデータ型マッピングをサポートします。
         </para>
 
         <para>
-            Here is an example of common usage of the autodiscovery functionality. The <code>handle()</code>
-            function generates the WSDL file and posts it to the browser.
+            これは自動検出機能の一般的な用法の例です。
+            <code>handle()</code>関数はWSDLファイルを生成してブラウザーにポストします。
 
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 class My_SoapServer_Class {
 ...
 }
@@ -87,36 +93,37 @@ $autodiscover->handle();
         </para>
 
         <para>
-            If you need access to the generated WSDL file either to save it to a file or
-            as an XML string you can use the <code>dump($filename)</code> or <code>toXml()</code>
-            functions the AutoDiscover class provides.
+            ファイルまたはXMLストリングとして保存するために生成されたWSDLファイルへのアクセスも必要ならば、
+            AutoDiscoverクラスが提供する<code>dump($filename)</code>または<code>toXml()</code>関数を使えます。
         </para>
 
         <note id="zend.soap.autodiscovery.introduction.noserver">
-            <title>Zend_Soap_Autodiscover is not a Soap Server</title>
+            <title>Zend_Soap_AutodiscoverはSOAPサーバーではありません</title>
 
             <para>
-                It is very important to note, that the class <classname>Zend_Soap_AutoDiscover</classname> does not act
-                as a SOAP Server on its own. It only generates the WSDL and serves it to anyone accessing
-                the url it is listening on.
+                クラス<classname>Zend_Soap_AutoDiscover</classname>が
+                単独でSOAPサーバーの働きをしない点に注意することは、非常に重要です。
+                それはWSDLを生成して、それがリスンしているurlにアクセスした誰にでも届けるだけです。
             </para>
 
             <para>
-                As the SOAP Endpoint Uri is uses the default
-                <code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code>,
-                but this can be changed with the <code>setUri()</code> function or the Constructor
-                parameter of <classname>Zend_Soap_AutoDiscover</classname> class. The endpoint has to provide
-                a <classname>Zend_Soap_Server</classname> that listens to requests.
+                SOAPエンドポイントUriがデフォルト値、
+                <code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code>
+                を使いますが、
+                しかしこれは<code>setUri()</code>関数や
+                <classname>Zend_Soap_AutoDiscover</classname>クラスのコンストラクタのパラメータで変更できます。
+                このエンドポイントではリクエストをリスンする
+                <classname>Zend_Soap_Server</classname>クラスを準備しなくてはいけません。
             </para>
 
             <para>
-                <programlisting role="php"><![CDATA[
+                <programlisting language="php"><![CDATA[
 if(isset($_GET['wsdl'])) {
     $autodiscover = new Zend_Soap_AutoDiscover();
     $autodiscover->setClass('HelloWorldService');
     $autodiscover->handle();
 } else {
-    // pointing to the current file here
+    //ここで現行ファイルを指示します。
     $soap = new Zend_Soap_Server("http://example.com/soap.php?wsdl");
     $soap->setClass('HelloWorldService');
     $soap->handle();
@@ -127,12 +134,12 @@ if(isset($_GET['wsdl'])) {
     </sect2>
 
     <sect2 id="zend.soap.autodiscovery.class">
-        <title>Class autodiscovering</title>
+        <title>クラスの自動検出</title>
 
         <para>
-            If class is used to provide SOAP server functionality, then the same class should be provided to
-            <classname>Zend_Soap_AutoDiscover</classname> for WSDL generation:
-            <programlisting role="php"><![CDATA[
+            クラスがSOAPサーバー機能を提供することに使われるならば、
+            同じクラスはWSDL生成のために<classname>Zend_Soap_AutoDiscover</classname>に提供されなければなりません:
+            <programlisting language="php"><![CDATA[
 $autodiscover = new Zend_Soap_AutoDiscover();
 $autodiscover->setClass('My_SoapServer_Class');
 $autodiscover->handle();
@@ -140,38 +147,41 @@ $autodiscover->handle();
         </para>
 
         <para>
-            The following rules are used while WSDL generation:
+            WSDL生成の間、以下の規則が使われます:
             <itemizedlist>
                 <listitem>
-                    <para>Generated WSDL describes an RPC style Web Service.</para>
+                    <para>生成されたWSDLは、RPCスタイルのウェブサービスを記述します。</para>
                 </listitem>
                 <listitem>
-                    <para>Class name is used as a name of the Web Service being described.</para>
+                    <para>クラス名が、記述されているウェブサービスの名前として使われます。</para>
                 </listitem>
                 <listitem>
                     <para>
-                        <code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code> is used
-                        as an URI where the WSDL is available by default but can be overwritten via <code>setUri()</code> method.
+                        <code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code>が
+                        WSDLをデフォルトで利用できるURIとして使われます、
+                        しかし、それは<code>setUri()</code>メソッドによって上書きすることができます。
                     </para>
                     <para>
-                         It's also used as a target namespace for all service related names (including
-                         described complex types).
+                        それは、名前(記述された複雑な型を含む)に関連したすべてのサービスのための
+                        ターゲット名前空間としても使われます。
                     </para>
                 </listitem>
                 <listitem>
                     <para>
-                        Class methods are joined into one <ulink url="http://www.w3.org/TR/wsdl#_porttypes">Port Type</ulink>.
+                        クラス・メソッドは、1つの<ulink url="http://www.w3.org/TR/wsdl#_porttypes">ポートタイプ</ulink>に
+                        結び付けられます。
                     </para>
                     <para>
-                        <code>$className . 'Port'</code> is used as Port Type name.
+                        <code>$className . 'Port'</code>はポートタイプ名として使われます。
                     </para>
                 </listitem>
                 <listitem>
-                    <para>Each class method is registered as a corresponding port operation.</para>
+                    <para>各々のクラス・メソッドは、対応するポート操作として登録されます。</para>
                 </listitem>
                 <listitem>
-                    <para>Each method prototype generates corresponding Request/Response messages.</para>
-                    <para>Method may have several prototypes if some method parameters are optional.</para>
+                    <para>各々のメソッド・プロトタイプは、対応するリクエスト/レスポンスメッセージを生成します。</para>
+                    <para>いくつかのメソッド・パラメータがオプションならば、
+                    メソッドはいくつかのプロトタイプを持つかもしれません。</para>
                 </listitem>
             </itemizedlist>
         </para>
@@ -179,23 +189,25 @@ $autodiscover->handle();
         <note>
             <title>重要!</title>
             <para>
-                WSDL autodiscovery utilizes the PHP docblocks provided by the developer to determine the parameter and return types.
-                In fact, for scalar types, this is the only way to determine the parameter types, and for return types, this is the
-                only way to determine them.
+                WSDL自動検出では、パラメータを決定して型を返すために、
+                開発者により提供されるPHP docblockを利用します。
+                実際、スカラー型にとっては、パラメータ型を決定する唯一の方法です。
+                そして、戻り型にとっては、それらを決定する唯一の方法です。
             </para>
             <para>
-                That means, providing correct and fully detailed docblocks is not only best practice, but is required for discovered class.
+                つまり、正しくて詳細で完全なdocblockを提供することは習慣というだけではなく、
+                発見するクラスのために必要です。
             </para>
         </note>
     </sect2>
 
     <sect2 id="zend.soap.autodiscovery.functions">
-        <title>Functions autodiscovering</title>
+        <title>関数の自動検出</title>
 
         <para>
-            If set of functions are used to provide SOAP server functionality, then the same set should be provided to
-            <classname>Zend_Soap_AutoDiscovery</classname> for WSDL generation:
-            <programlisting role="php"><![CDATA[
+            関数のセットがSOAPサーバー機能を提供することに使われるならば、
+            同じセットはWSDL生成のために<classname>Zend_Soap_AutoDiscovery</classname>に提供されなければなりません:
+            <programlisting language="php"><![CDATA[
 $autodiscover = new Zend_Soap_AutoDiscover();
 $autodiscover->addFunction('function1');
 $autodiscover->addFunction('function2');
@@ -206,38 +218,40 @@ $autodiscover->handle();
         </para>
 
         <para>
-            The following rules are used while WSDL generation:
+            WSDL生成の間、以下の規則が使われます:
             <itemizedlist>
                 <listitem>
-                    <para>Generated WSDL describes an RPC style Web Service.</para>
+                    <para>生成されたWSDLは、RPCスタイルのウェブサービスを記述します。</para>
                 </listitem>
                 <listitem>
-                    <para>Current script name is used as a name of the Web Service being described.</para>
+                    <para>現在のスクリプト名が、記述されているウェブサービスの名前として使われます。</para>
                 </listitem>
                 <listitem>
                     <para>
-                        <code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code> is used
-                        as an URI where the WSDL is available.
+                        <code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code>
+                        WSDLを利用できるURIとして使われます。
                     </para>
                     <para>
-                         It's also used as a target namespace for all service related names (including
-                         described complex types).
+                        それは、名前(記述された複雑な型を含む)に関連したすべてのサービスのための
+                        ターゲット名前空間としても使われます。
                     </para>
                 </listitem>
                 <listitem>
                     <para>
-                        Functions are joined into one <ulink url="http://www.w3.org/TR/wsdl#_porttypes">Port Type</ulink>.
+                        関数は、1つの<ulink url="http://www.w3.org/TR/wsdl#_porttypes">ポートタイプ</ulink>に
+                        結び付けられます。
                     </para>
                     <para>
-                        <code>$functionName . 'Port'</code> is used as Port Type name.
+                        <code>$functionName . 'Port'</code>はポートタイプ名として使われます。
                     </para>
                 </listitem>
                 <listitem>
-                    <para>Each function is registered as a corresponding port operation.</para>
+                    <para>各々の関数は、対応するポート操作として登録されます。</para>
                 </listitem>
                 <listitem>
-                    <para>Each function prototype generates corresponding Request/Response messages.</para>
-                    <para>Function may have several prototypes if some method parameters are optional.</para>
+                    <para>各々の関数プロトタイプは、対応するリクエスト/レスポンスメッセージを生成します。</para>
+                    <para>いくつかのメソッド・パラメータがオプションなら、
+                    関数はいくつかのプロトタイプを持つかもしれません。</para>
                 </listitem>
             </itemizedlist>
         </para>
@@ -245,96 +259,102 @@ $autodiscover->handle();
         <note>
             <title>重要!</title>
             <para>
-                WSDL autodiscovery utilizes the PHP docblocks provided by the developer to determine the parameter and return types.
-                In fact, for scalar types, this is the only way to determine the parameter types, and for return types, this is the
-                only way to determine them.
+                WSDL自動検出では、パラメータを決定して、型を返すために、
+                開発者により提供されるPHP docblockを利用します。
+                実際、スカラー型にとっては、パラメータ型を決定する唯一の方法です。
+                そして、戻り型にとっては、それらを決定する唯一の方法です。
             </para>
             <para>
-                That means, providing correct and fully detailed docblocks is not only best practice, but is required for discovered class.
+                つまり、正しくて詳細で完全なdocblockを提供することは習慣というだけではなく、
+                発見するクラスのために必要です。
             </para>
         </note>
     </sect2>
 
     <sect2 id="zend.soap.autodiscovery.datatypes">
-        <title>Autodiscovering Datatypes</title>
+        <title>データ型の自動検出</title>
 
         <para>
-            Input/output datatypes are converted into network service types using the following mapping:
+            入出力データ型は、以下のマッピングを用いて、ネットワーク・サービス型に変換されます:
 
             <itemizedlist>
                 <listitem>
-                    <para>PHP strings &lt;-&gt; <code>xsd:string</code>.</para>
+                    <para>PHP文字列 &lt;-&gt; <code>xsd:string</code></para>
                 </listitem>
                 <listitem>
-                    <para>PHP integers &lt;-&gt; <code>xsd:int</code>.</para>
+                    <para>PHP integer &lt;-&gt; <code>xsd:int</code></para>
                 </listitem>
                 <listitem>
-                    <para>PHP floats and doubles &lt;-&gt; <code>xsd:float</code>.</para>
+                    <para>PHP floatおよびdouble値 &lt;-&gt; <code>xsd:float</code></para>
                 </listitem>
                 <listitem>
-                    <para>PHP booleans &lt;-&gt; <code>xsd:boolean</code>.</para>
+                    <para>PHPブール値 &lt;-&gt; <code>xsd:boolean</code></para>
                 </listitem>
                 <listitem>
-                    <para>PHP arrays &lt;-&gt; <code>soap-enc:Array</code>.</para>
+                    <para>PHP配列 &lt;-&gt; <code>soap-enc:Array</code></para>
                 </listitem>
                 <listitem>
-                    <para>PHP object &lt;-&gt; <code>xsd:struct</code>.</para>
+                    <para>PHPオブジェクト &lt;-&gt; <code>xsd:struct</code></para>
                 </listitem>
                 <listitem>
                     <para>
-                        PHP class &lt;-&gt; based on complex type strategy (See: <xref linkend="zend.soap.wsdl.types.add_complex" />)
+                        PHPクラス &lt;-&gt; 複雑な型のストラテジーに基づいた (<xref linkend="zend.soap.wsdl.types.add_complex" />参照)
                         <footnote>
                             <para>
-                                <classname>Zend_Soap_AutoDiscover</classname> will be created with the <classname>Zend_Soap_Wsdl_Strategy_DefaultComplexType</classname>
-                                class as detection algorithm for complex types. The first parameter of the AutoDiscover constructor takes
-                                any complex type strategy implementing <classname>Zend_Soap_Wsdl_Strategy_Interface</classname> or a string with the name
-                                of the class. For backwards compatibility with <code>$extractComplexType</code> boolean variables are parsed
-                                exactly like in <classname>Zend_Soap_Wsdl</classname>. See the <link linkend="zend.soap.wsdl.types.add_complex"><classname>Zend_Soap_Wsdl</classname> manual
-                                on adding complex</link> types for more information.
+                                <classname>Zend_Soap_AutoDiscover</classname>は複雑な型のための検出アルゴリズムとして
+                                <classname>Zend_Soap_Wsdl_Strategy_DefaultComplexType</classname>クラスで生成されます。
+                                AutoDiscoverコンストラクタの最初のパラメータは、
+                                <classname>Zend_Soap_Wsdl_Strategy_Interface</classname>を実装した、
+                                どんな複雑な型ストラテジーでも、クラスの名前を持つ文字列でもとります。
+                                <code>$extractComplexType</code>との後方互換性のために、
+                                ブール変数は<classname>Zend_Soap_Wsdl</classname>のように解析されます。
+                                詳しくは<link linkend="zend.soap.wsdl.types.add_complex">複雑な型を追加することについて
+                                <classname>Zend_Soap_Wsdl</classname>マニュアル</link>をご覧下さい。
                             </para>
-                        </footnote>.
+                        </footnote>
                     </para>
                 </listitem>
                 <listitem>
-                    <para>type[] or object[] (ie. int[]) &lt;-&gt; based on complex type strategy</para>
+                    <para>type[] または object[] (例えば int[]) &lt;-&gt; 複雑な型のストラテジーに基づいた</para>
                 </listitem>
                 <listitem>
-                    <para>PHP void &lt;-&gt; empty type.</para>
+                    <para>PHP void &lt;-&gt; 空の型</para>
                 </listitem>
                 <listitem>
-                    <para>If type is not matched to any of these types by some reason, then <code>xsd:anyType</code> is used.</para>
+                    <para>なんらかの理由でこれらの型のいずれとも型が一致しなければ、<code>xsd:anyType</code>が使われます。</para>
                 </listitem>
             </itemizedlist>
 
-            Where <code>xsd:</code> is "http://www.w3.org/2001/XMLSchema" namespace,
-            <code>soap-enc:</code> is a "http://schemas.xmlsoap.org/soap/encoding/" namespace,
-            <code>tns:</code> is a "target namespace" for a service.
+            <code>xsd:</code> が "http://www.w3.org/2001/XMLSchema" ネームスペースであるところでは、
+            <code>soap-enc:</code> は "http://schemas.xmlsoap.org/soap/encoding/" ネームスペースで、
+            <code>tns:</code> はサービスのための "target namespace" です。
         </para>
     </sect2>
 
     <sect2 id="zend.soap.autodiscovery.wsdlstyles">
-        <title>WSDL Binding Styles</title>
+        <title>WSDLバインディングスタイル</title>
 
         <para>
-            WSDL offers different transport mechanisms and styles. This affects the
-            <code>soap:binding</code> and <code>soap:body</code> tags within the Binding
-            section of WSDL. Different clients have different requirements as to what options
-            really work. Therefore you can set the styles before you call any <code>setClass</code>
-            or <code>addFunction</code> method on the AutoDiscover class.
+            WSDLは、異なるトランスポートのメカニズムとスタイルを提供します。
+            これは、WSDLのバインディング・セクションの範囲内で、
+            <code>soap:binding</code>および<code>soap:body</code>タグに影響を及ぼします。
+            クライアント毎に、本当に機能するオプションについて、それぞれの必要条件があります。
+            したがって、自動検出クラスでどんな<code>setClass</code>や<code>addFunction</code>メソッドでも呼び出す前に、
+            スタイルを設定することができます。
         </para>
 
         <para>
-            <programlisting role="php"><![CDATA[
+            <programlisting language="php"><![CDATA[
 $autodiscover = new Zend_Soap_AutoDiscover();
-// Default is 'use' => 'encoded' and
-// 'encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/'
+// デフォルトは 'use' => 'encoded' 及び
+// 'encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/' です。
 $autodiscover->setOperationBodyStyle(
                     array('use' => 'literal',
                           'namespace' => 'http://framework.zend.com')
                 );
 
-// Default is 'style' => 'rpc' and
-// 'transport' => 'http://schemas.xmlsoap.org/soap/http'
+// デフォルトは 'style' => 'rpc' 及び
+// 'transport' => 'http://schemas.xmlsoap.org/soap/http' です。
 $autodiscover->setBindingStyle(
                     array('style' => 'document',
                           'transport' => 'http://framework.zend.com')