[jboss-cvs] JBossAS SVN: r89419 - projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 26 01:07:51 EDT 2009
Author: xhuang at jboss.com
Date: 2009-05-26 01:07:49 -0400 (Tue, 26 May 2009)
New Revision: 89419
Modified:
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Security_On_JBOSS.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Web_Services.po
Log:
update
Modified: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Security_On_JBOSS.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Security_On_JBOSS.po 2009-05-26 04:17:26 UTC (rev 89418)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Security_On_JBOSS.po 2009-05-26 05:07:49 UTC (rev 89419)
@@ -9,8 +9,8 @@
"Project-Id-Version: J2EE_Security_On_JBOSS\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-20 02:37+0000\n"
-"PO-Revision-Date: 2009-05-15 12:53+1000\n"
-"Last-Translator: Xi HUANG\n"
+"PO-Revision-Date: 2009-05-26 14:31+1000\n"
+"Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
"Language-Team: <en at li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -677,7 +677,7 @@
msgid ""
"The third style is used to refer to a specified method within a set of "
"methods with an overloaded name:"
-msgstr ""
+msgstr "第三种风格用于引用一系列重载方法里的某个特殊方法:"
#. Tag: programlisting
#: J2EE_Security_On_JBOSS.xml:149
@@ -693,6 +693,15 @@
" </method-params>\n"
"</method>"
msgstr ""
+"<method>\n"
+" <ejb-name>EJBNAME</ejb-name>\n"
+" <method-name>METHOD</method-name>\n"
+" <method-params>\n"
+" <method-param>PARAMETER_1</method-param>\n"
+" <!-- ... -->\n"
+" <method-param>PARAMETER_N</method-param>\n"
+" </method-params>\n"
+"</method>"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:150
@@ -703,7 +712,7 @@
"name of the corresponding method parameter type. If there are multiple "
"methods with the same overloaded signature, the permission applies to all of "
"the matching overloaded methods."
-msgstr ""
+msgstr "这个方法必须订阅在特殊的 EJB 的 home 或 remote 接口里。method-param 元素的值是对应的方法参数类型的全限定名。如果有多个具有相同重载签名的方法,权限将应用于所有匹配的重载方法上。"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:153
@@ -712,7 +721,7 @@
"The optional <literal>method-intf</literal> element can be used to "
"differentiate methods with the same name and signature that are defined in "
"both the home and remote interfaces of an enterprise bean."
-msgstr ""
+msgstr "可选的 <literal>method-intf</literal> 元素可以用于区分 EJB 的 home 和 remote 接口都定义了的具有相同名称和签名的方法。"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:156
@@ -720,7 +729,7 @@
msgid ""
"provides complete examples of the <literal>method-permission</literal> "
"element usage."
-msgstr ""
+msgstr "提供关于 <literal>method-permission</literal> 元素的用法的完整示例。"
#. Tag: title
#: J2EE_Security_On_JBOSS.xml:159
@@ -728,7 +737,7 @@
msgid ""
"An ejb-jar.xml descriptor fragment that illustrates the method-permission "
"element usage."
-msgstr ""
+msgstr "解释 method-permission 的用法的 ejb-jar.xml 描述符片段。"
#. Tag: programlisting
#: J2EE_Security_On_JBOSS.xml:160
@@ -802,12 +811,79 @@
" </assembly-descriptor>\n"
"</ejb-jar>"
msgstr ""
+"<ejb-jar>\n"
+" <assembly-descriptor>\n"
+" <method-permission>\n"
+" <description>The employee and temp-employee roles may "
+"access any\n"
+" method of the EmployeeService bean </description>\n"
+" <role-name>employee</role-name>\n"
+" <role-name>temp-employee</role-name>\n"
+" <method>\n"
+" <ejb-name>EmployeeService</ejb-name>\n"
+" <method-name>*</method-name>\n"
+" </method>\n"
+" </method-permission>\n"
+" <method-permission>\n"
+" <description>The employee role may access the "
+"findByPrimaryKey,\n"
+" getEmployeeInfo, and the updateEmployeeInfo(String) method "
+"of\n"
+" the AardvarkPayroll bean </description>\n"
+" <role-name>employee</role-name>\n"
+" <method>\n"
+" <ejb-name>AardvarkPayroll</ejb-name>\n"
+" <method-name>findByPrimaryKey</method-name>\n"
+" </method>\n"
+" <method>\n"
+" <ejb-name>AardvarkPayroll</ejb-name>\n"
+" <method-name>getEmployeeInfo</method-name>\n"
+" </method>\n"
+" <method>\n"
+" <ejb-name>AardvarkPayroll</ejb-name>\n"
+" <method-name>updateEmployeeInfo</method-name>\n"
+" <method-params>\n"
+" <method-param>java.lang.String</method-"
+"param>\n"
+" </method-params>\n"
+" </method>\n"
+" </method-permission>\n"
+" <method-permission>\n"
+" <description>The admin role may access any method of the\n"
+" EmployeeServiceAdmin bean </description>\n"
+" <role-name>admin</role-name>\n"
+" <method>\n"
+" <ejb-name>EmployeeServiceAdmin</ejb-name>\n"
+" <method-name>*</method-name>\n"
+" </method>\n"
+" </method-permission>\n"
+" <method-permission>\n"
+" <description>Any authenticated user may access any method "
+"of the\n"
+" EmployeeServiceHelp bean</description>\n"
+" <unchecked/>\n"
+" <method>\n"
+" <ejb-name>EmployeeServiceHelp</ejb-name>\n"
+" <method-name>*</method-name>\n"
+" </method>\n"
+" </method-permission>\n"
+" <exclude-list>\n"
+" <description>No fireTheCTO methods of the EmployeeFiring "
+"bean may be\n"
+" used in this deployment</description>\n"
+" <method>\n"
+" <ejb-name>EmployeeFiring</ejb-name>\n"
+" <method-name>fireTheCTO</method-name>\n"
+" </method>\n"
+" </exclude-list>\n"
+" </assembly-descriptor>\n"
+"</ejb-jar>"
#. Tag: title
#: J2EE_Security_On_JBOSS.xml:165
#, no-c-format
msgid "Web Content Security Constraints"
-msgstr ""
+msgstr "Web 内容的安全性约束"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:166
@@ -818,12 +894,14 @@
"This set of information is declared by using the <literal>web.xml</"
"literal><literal>security-constraint</literal> element."
msgstr ""
+"在 web 应用程序里,角色定义安全性,它通过 URL 模式定义被保护内容的访问权限。这一系列信息是由 <literal>web.xml</"
+"literal><literal>security-constraint</literal> 元素来声明的。"
#. Tag: title
#: J2EE_Security_On_JBOSS.xml:170
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The security-constraint element"
-msgstr "Connector 元素"
+msgstr "security-constraint 元素"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:177
@@ -839,6 +917,11 @@
"<literal>http-method</literal> element value specifies a type of HTTP "
"request to allow."
msgstr ""
+"通过一个或多个 <literal>web-"
+"resource-collection</literal> 元素可设置内容的安全性。每个 <literal>web-resource-"
+"collection</literal> 元素都包括一系列可选的 <literal>url-"
+"pattern</literal> 元素,后面跟着一系列可选的 <literal>http-"
+"method</literal> 元素。<literal>url-pattern</literal> 元素的值指定 URL 模式,对受保护内容的访问的请求 URL 必须匹配它。<literal>http-method</literal> 元素的值指定所允许的 HTTP 请求类型。"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:180
@@ -861,7 +944,7 @@
"most cases, the presence of the <literal>INTEGRAL</literal> or "
"<literal>CONFIDENTIAL</literal> flag indicates that the use of SSL is "
"required."
-msgstr ""
+msgstr "可选的 <literal>user-data-constraint</literal> 元素指定对客户和服务器连接的传输层的要求。这些要求可能是内容的完整性(阻止数据在通信过程中被擅自改动)或者机密性(阻止在传输时被读取)。transport-guarantee 元素指定客户和服务器间的通信应该受保护的程度。它的值是 <literal>NONE</literal>、<literal>INTEGRAL</literal> 和 <literal>CONFIDENTIAL</literal>。<literal>NONE</literal> 表示应用程序不要求任何传输的保证。<literal>INTEGRAL</literal> 表示应用程序要求客户和服务器间的数据以不能在传输时更改的方式发送。<literal>CONFIDENTIAL</literal> 表示应用程序要求数据以阻止其他实体观测传输内容的方式进行传输。在大多数情况下,<literal>INTEGRAL</literal> 或 <literal>CONFIDENTIAL</literal> 标记要求使用 SSL。"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:183
@@ -871,13 +954,13 @@
"the authentication method that should be used, the realm name that should be "
"used for rhw application, and the attributes that are needed by the form "
"login mechanism."
-msgstr ""
+msgstr "可选的 <literal>login-config</literal> 元素用于配置应该使用的 authentication 方法,realm 名称应该用于 rhw 应用程序以及表单登录机制所要求的属性。"
#. Tag: title
#: J2EE_Security_On_JBOSS.xml:187
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The login-config element"
-msgstr "Engine 元素"
+msgstr "login-config 元素"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:194
@@ -896,6 +979,9 @@
"<literal>auth-method</literal> value is not <literal>FORM</literal>, then "
"<literal>form-login-config</literal> and its child elements are ignored."
msgstr ""
+"<literal>auth-method</literal> 子元素指定 web 应用程序的验证机制。作为获取对任何由授权约束保护的 web 资源的访问的预备条件,用户必须用相关机制进行验证。合法的 <literal>auth-method</literal> 值为 <literal>BASIC</literal>、"
+"<literal>DIGEST</literal>、<literal>FORM</literal> 和 <literal>CLIENT-"
+"CERT</literal>。<literal>realm-name</literal> 子元素指定使用 HTTP BASIC 和 DIGEST 授权时使用的 realm 名称。<literal>form-login-config</literal> 子元素指定基于表单的登录应该使用登录和错误页面。如果 <literal>auth-method</literal> 的值不是 <literal>FORM</literal>,<literal>form-login-config</literal> 及其子元素将被忽略。"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:197
@@ -909,6 +995,10 @@
"role. There is no required transport guarantee and the authentication method "
"used for obtaining the user identity is BASIC HTTP authentication."
msgstr ""
+"<xref linkend=\"Web_Content_Security_Constraints-_A_web."
+"xml_descriptor_fragment_which_illustrates_the_use_of_the_security_constraint_and_related_elements."
+"\"/> 里给出的 <literal>web.xml</literal> 片段指出任何依附于应用程序的 <literal>/"
+"restricted</literal> 路径下的 URL 需要具有 <literal>AuthorizedUser</literal> 角色。它不要求传输保证且用于获取用户标识符的验证方式是 BASIC HTTP 验证。"
#. Tag: title
#: J2EE_Security_On_JBOSS.xml:200
@@ -917,6 +1007,8 @@
"A web.xml descriptor fragment which illustrates the use of the security-"
"constraint and related elements."
msgstr ""
+"解释 security-"
+"constraint 和相关元素的用法的 web.xml 片段。"
#. Tag: programlisting
#: J2EE_Security_On_JBOSS.xml:201
@@ -950,12 +1042,39 @@
" </security-role>\n"
"</web-app>"
msgstr ""
+"<web-app>\n"
+" <!-- ... -->\n"
+" <security-constraint>\n"
+" <web-resource-collection>\n"
+" <web-resource-name>Secure Content</web-resource-"
+"name>\n"
+" <url-pattern>/restricted/*</url-pattern>\n"
+" </web-resource-collection>\n"
+" <auth-constraint>\n"
+" <role-name>AuthorizedUser</role-name>\n"
+" </auth-constraint>\n"
+" <user-data-constraint>\n"
+" <transport-guarantee>NONE</transport-guarantee>\n"
+" </user-data-constraint>\n"
+" </security-constraint>\n"
+" <!-- ... -->\n"
+" <login-config>\n"
+" <auth-method>BASIC</auth-method>\n"
+" <realm-name>The Restricted Zone</realm-name>\n"
+" </login-config>\n"
+" <!-- ... -->\n"
+" <security-role>\n"
+" <description>The role required to access restricted content "
+"</description>\n"
+" <role-name>AuthorizedUser</role-name>\n"
+" </security-role>\n"
+"</web-app>"
#. Tag: title
#: J2EE_Security_On_JBOSS.xml:206
#, no-c-format
msgid "Enabling Declarative Security in JBoss"
-msgstr ""
+msgstr "在 JBoss 里启用声明式安全性"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:207
@@ -975,9 +1094,9 @@
#. Tag: title
#: J2EE_Security_On_JBOSS.xml:215
-#, fuzzy, no-c-format
+#, no-c-format
msgid "An Introduction to JAAS"
-msgstr "JMX的简介"
+msgstr "JAAS 的简介"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:216
@@ -1055,7 +1174,7 @@
#: J2EE_Security_On_JBOSS.xml:242
#, no-c-format
msgid "<literal>Principal</literal> (<literal>java.security.Principal</literal>)"
-msgstr ""
+msgstr "<literal>Principal</literal> (<literal>java.security.Principal</literal>)"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:247
@@ -1070,6 +1189,8 @@
"<literal>Callback</literal> (<literal>javax.security.auth.callback.Callback</"
"literal>)"
msgstr ""
+"<literal>Callback</literal> (<literal>javax.security.auth.callback.Callback</"
+"literal>)"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:257
@@ -1078,6 +1199,8 @@
"<literal>CallbackHandler</literal> (<literal>javax.security.auth.callback."
"CallbackHandler</literal>)"
msgstr ""
+"<literal>CallbackHandler</literal> (<literal>javax.security.auth.callback."
+"CallbackHandler</literal>)"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:262
@@ -1086,6 +1209,8 @@
"<literal>Configuration</literal> (<literal>javax.security.auth.login."
"Configuration</literal>)"
msgstr ""
+"<literal>Configuration</literal> (<literal>javax.security.auth.login."
+"Configuration</literal>)"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:267
@@ -1302,6 +1427,50 @@
" }\n"
"}"
msgstr ""
+"CallbackHandler handler = new MyHandler();\n"
+"LoginContext lc = new LoginContext(\"some-config\", handler);\n"
+"\n"
+"try {\n"
+" lc.login();\n"
+" Subject subject = lc.getSubject();\n"
+"} catch(LoginException e) {\n"
+" System.out.println(\"authentication failed\");\n"
+" e.printStackTrace();\n"
+"}\n"
+" \n"
+"// Perform work as authenticated Subject\n"
+"// ...\n"
+"\n"
+"// Scope of work complete, logout to remove authentication info\n"
+"try {\n"
+" lc.logout();\n"
+"} catch(LoginException e) {\n"
+" System.out.println(\"logout failed\");\n"
+" e.printStackTrace();\n"
+"}\n"
+" \n"
+"// A sample MyHandler class\n"
+"class MyHandler \n"
+" implements CallbackHandler\n"
+"{\n"
+" public void handle(Callback[] callbacks) throws\n"
+" IOException, UnsupportedCallbackException\n"
+" {\n"
+" for (int i = 0; i < callbacks.length; i++) {\n"
+" if (callbacks[i] instanceof NameCallback) {\n"
+" NameCallback nc = (NameCallback)callbacks[i];\n"
+" nc.setName(username);\n"
+" } else if (callbacks[i] instanceof PasswordCallback) {\n"
+" PasswordCallback pc = (PasswordCallback)callbacks[i];\n"
+" pc.setPassword(password);\n"
+" } else {\n"
+" throw new UnsupportedCallbackException(callbacks[i],\n"
+" \"Unrecognized "
+"Callback\");\n"
+" }\n"
+" }\n"
+" }\n"
+"}"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:337
@@ -1469,9 +1638,9 @@
#. Tag: title
#: J2EE_Security_On_JBOSS.xml:391
-#, fuzzy, no-c-format
+#, no-c-format
msgid "The JBoss Security Model"
-msgstr "JBossNS 架构"
+msgstr "JBoss 的安全模型"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:392
@@ -1784,6 +1953,68 @@
" }\n"
"}"
msgstr ""
+"package org.jboss.book.security.ex1;\n"
+" \n"
+"import java.lang.reflect.Method;\n"
+"import javax.ejb.EJBContext;\n"
+" \n"
+"import org.apache.log4j.Category;\n"
+" \n"
+"import org.jboss.security.SecurityProxy;\n"
+" \n"
+"/** A simple example of a custom SecurityProxy implementation\n"
+" * that demonstrates method argument based security checks.\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.4 $\n"
+" */\n"
+"public class EchoSecurityProxy implements SecurityProxy\n"
+"{\n"
+" Category log = Category.getInstance(EchoSecurityProxy.class);\n"
+" Method echo;\n"
+" \n"
+" public void init(Class beanHome, Class beanRemote,\n"
+" Object securityMgr)\n"
+" throws InstantiationException\n"
+" {\n"
+" log.debug(\"init, beanHome=\"+beanHome\n"
+" + \", beanRemote=\"+beanRemote\n"
+" + \", securityMgr=\"+securityMgr);\n"
+" // Get the echo method for equality testing in invoke\n"
+" try {\n"
+" Class[] params = {String.class};\n"
+" echo = beanRemote.getDeclaredMethod(\"echo\", params);\n"
+" } catch(Exception e) {\n"
+" String msg = \"Failed to finde an echo(String) method\";\n"
+" log.error(msg, e);\n"
+" throw new InstantiationException(msg);\n"
+" }\n"
+" }\n"
+" \n"
+" public void setEJBContext(EJBContext ctx)\n"
+" {\n"
+" log.debug(\"setEJBContext, ctx=\"+ctx);\n"
+" }\n"
+" \n"
+" public void invokeHome(Method m, Object[] args)\n"
+" throws SecurityException\n"
+" {\n"
+" // We don't validate access to home methods\n"
+" }\n"
+"\n"
+" public void invoke(Method m, Object[] args, Object bean)\n"
+" throws SecurityException\n"
+" {\n"
+" log.debug(\"invoke, m=\"+m);\n"
+" // Check for the echo method\n"
+" if (m.equals(echo)) {\n"
+" // Validate that the msg arg is not 4 letter word\n"
+" String arg = (String) args[0];\n"
+" if (arg == null || arg.length() == 4)\n"
+" throw new SecurityException(\"No 4 letter words\");\n"
+" }\n"
+" // We are not responsible for doing the invoke\n"
+" }\n"
+"}"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:474
@@ -1841,6 +2072,17 @@
" </enterprise-beans>\n"
"</jboss>"
msgstr ""
+"<jboss>\n"
+" <security-domain>java:/jaas/other</security-domain>\n"
+" \n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>EchoBean</ejb-name>\n"
+" <security-proxy>org.jboss.book.security.ex1."
+"EchoSecurityProxy</security-proxy>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:482
@@ -1874,6 +2116,24 @@
" }\n"
"}"
msgstr ""
+"public class ExClient\n"
+"{\n"
+" public static void main(String args[])\n"
+" throws Exception\n"
+" {\n"
+" Logger log = Logger.getLogger(\"ExClient\");\n"
+" log.info(\"Looking up EchoBean\");\n"
+"\n"
+" InitialContext iniCtx = new InitialContext();\n"
+" Object ref = iniCtx.lookup(\"EchoBean\");\n"
+" EchoHome home = (EchoHome) ref;\n"
+" Echo echo = home.create();\n"
+"\n"
+" log.info(\"Created Echo\");\n"
+" log.info(\"Echo.echo('Hello') = \"+echo.echo(\"Hello\"));\n"
+" log.info(\"Echo.echo('Four') = \"+echo.echo(\"Four\"));\n"
+" }\n"
+"}"
#. Tag: para
#: J2EE_Security_On_JBOSS.xml:486
Modified: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Web_Services.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Web_Services.po 2009-05-26 04:17:26 UTC (rev 89418)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Web_Services.po 2009-05-26 05:07:49 UTC (rev 89419)
@@ -9,8 +9,8 @@
"Project-Id-Version: Web_Services\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-20 02:37+0000\n"
-"PO-Revision-Date: 2009-05-25 19:34+1000\n"
-"Last-Translator: Xi HUANG\n"
+"PO-Revision-Date: 2009-05-26 12:14+1000\n"
+"Last-Translator: Xi HUANG <xhuang at redhat.com>\n"
"Language-Team: <en at li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -168,6 +168,16 @@
" }\n"
" }"
msgstr ""
+"@WebService\n"
+" @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\n"
+" public class DocBareServiceImpl\n"
+" {\n"
+" @WebMethod\n"
+" public SubmitBareResponse submitPO(SubmitBareRequest poRequest)\n"
+" {\n"
+" ...\n"
+" }\n"
+" }"
#. Tag: para
#: Web_Services.xml:29
@@ -194,6 +204,18 @@
" ...\n"
" }"
msgstr ""
+"@XmlAccessorType(XmlAccessType.FIELD)\n"
+" @XmlType(name = \"SubmitBareRequest\", namespace=\"http://soapbinding."
+"samples.jaxws.ws.test.jboss.org/\", propOrder = { \"product\" })\n"
+" @XmlRootElement(namespace=\"http://soapbinding.samples.jaxws.ws.test.jboss."
+"org/\", name = \"SubmitPO\")\n"
+" public class SubmitBareRequest\n"
+" {\n"
+" @XmlElement(namespace=\"http://soapbinding.samples.jaxws.ws.test.jboss.org/"
+"\", required = true)\n"
+" private String product;\n"
+" ...\n"
+" }"
#. Tag: title
#: Web_Services.xml:36
@@ -267,6 +289,22 @@
" </operation>\n"
" </binding>"
msgstr ""
+"<binding name='EndpointInterfaceBinding' type='tns:"
+"EndpointInterface'>\n"
+" <soap:binding style='rpc' transport='http://schemas."
+"xmlsoap.org/soap/http'/>\n"
+" <operation name='echo'>\n"
+" <soap:operation soapAction=''/>\n"
+" <input>\n"
+" <soap:body namespace='http://org.jboss.ws/"
+"samples/jsr181pojo' use='literal'/>\n"
+" </input>\n"
+" <output>\n"
+" <soap:body namespace='http://org.jboss.ws/"
+"samples/jsr181pojo' use='literal'/>\n"
+" </output>\n"
+" </operation>\n"
+" </binding>"
#. Tag: para
#: Web_Services.xml:62
@@ -309,6 +347,42 @@
"defined using the JAX-WS Annotations#javax.jws.WebParam and JAX-WS "
"Annotations#javax.jws.WebResult respectively."
msgstr ""
+"With rpc style web services the portType names the operation (i.e. the java "
+"method on the endpoint) <programlisting>\n"
+" <portType name='EndpointInterface'>\n"
+" <operation name='echo' parameterOrder='"
+"String_1'>\n"
+" <input message='tns:EndpointInterface_echo'/"
+">\n"
+" <output message='tns:"
+"EndpointInterface_echoResponse'/>\n"
+" </operation>\n"
+" </portType> \n"
+"</programlisting> Operation parameters are defined by individual message "
+"parts. <programlisting>\n"
+" <message name='EndpointInterface_echo'>\n"
+" <part name='String_1' type='xsd:string'/>\n"
+" </message>\n"
+" <message name='EndpointInterface_echoResponse'>\n"
+" <part name='result' type='xsd:string'/>\n"
+" </message>\n"
+"</programlisting> Note, there is no complex type in XML schema that could "
+"validate the entire SOAP message payload. <programlisting>\n"
+"\n"
+" @WebService\n"
+" @SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+" public class JSEBean01\n"
+" {\n"
+" @WebMethod\n"
+" @WebResult(name=\"result\")\n"
+" public String echo(@WebParam(name=\"String_1\") String input)\n"
+" {\n"
+" ...\n"
+" }\n"
+"} \n"
+"</programlisting> The element names of RPC parameters/return values may be "
+"defined using the JAX-WS Annotations#javax.jws.WebParam and JAX-WS "
+"Annotations#javax.jws.WebResult respectively."
#. Tag: title
#: Web_Services.xml:72
@@ -391,6 +465,16 @@
" }\n"
" }"
msgstr ""
+"@WebService\n"
+"@SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+"public class JSEBean01\n"
+" {\n"
+" @WebMethod\n"
+" public String echo(String input)\n"
+" {\n"
+" ...\n"
+" }\n"
+" }"
#. Tag: title
#: Web_Services.xml:105
@@ -406,7 +490,7 @@
#. Tag: programlisting
#: Web_Services.xml:108
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"<web-app ...>\n"
" <servlet>\n"
@@ -420,17 +504,17 @@
" </servlet-mapping>\n"
"</web-app>"
msgstr ""
-"<servlet>\n"
-" <servlet-name>Faces Servlet</servlet-name>\n"
-" <servlet-class>javax.faces.webapp.FacesServlet</servlet-"
-"class>\n"
-" <load-on-startup>1</load-on-startup>\n"
-"</servlet>\n"
-"\n"
-"<servlet-mapping>\n"
-" <servlet-name>Faces Servlet</servlet-name>\n"
-" <url-pattern>*.jsf</url-pattern>\n"
-"</servlet-mapping>"
+"<web-app ...>\n"
+" <servlet>\n"
+" <servlet-name>TestService</servlet-name>\n"
+" <servlet-class>org.jboss.test.ws.jaxws.samples.jsr181pojo."
+"JSEBean01</servlet-class>\n"
+" </servlet>\n"
+" <servlet-mapping>\n"
+" <servlet-name>TestService</servlet-name>\n"
+" <url-pattern>/*</url-pattern>\n"
+" </servlet-mapping>\n"
+"</web-app>"
#. Tag: title
#: Web_Services.xml:113
@@ -456,6 +540,19 @@
"</programlisting> Note, only the endpoint implementation bean and web.xml "
"are required."
msgstr ""
+"A JSR-181 java service endpoint (JSE) is packaged as a web application in a "
+"*.war file. <programlisting>\n"
+"\n"
+" <war warfile=\"${build.dir}/libs/jbossws-samples-jsr181pojo.war\" \n"
+" webxml=\"${build.resources.dir}/samples/jsr181pojo/WEB-"
+"INF/web.xml\">\n"
+" <classes dir=\"${build.dir}/classes\">\n"
+" <include name=\"org/jboss/test/ws/samples/jsr181pojo/JSEBean01.class\"/"
+">\n"
+" </classes>\n"
+"</war> \n"
+"</programlisting> Note, only the endpoint implementation bean and web.xml "
+"are required."
#. Tag: title
#: Web_Services.xml:122
@@ -476,7 +573,7 @@
#: Web_Services.xml:127 Web_Services.xml:154
#, no-c-format
msgid "http://yourhost:8080/jbossws/services"
-msgstr ""
+msgstr "http://yourhost:8080/jbossws/services"
#. Tag: para
#: Web_Services.xml:127 Web_Services.xml:155
@@ -577,6 +674,15 @@
"</fileset>\n"
"</jar>"
msgstr ""
+"<jar jarfile="${build.dir}/libs/jbossws-samples-jsr181ejb.jar""
+">\n"
+"<fileset dir="${build.dir}/classes">\n"
+"<include name="org/jboss/test/ws/samples/jsr181ejb/EJB3Bean01."
+"class"/>\n"
+"<include name="org/jboss/test/ws/samples/jsr181ejb/"
+"EJB3RemoteInterface.class"/>\n"
+"</fileset>\n"
+"</jar>"
#. Tag: emphasis
#: Web_Services.xml:149
@@ -633,6 +739,15 @@
" }\n"
"}"
msgstr ""
+"@WebServiceProvider\n"
+"@ServiceMode(value = Service.Mode.PAYLOAD)\n"
+"public class ProviderBeanPayload implements Provider<Source>\n"
+"{\n"
+"public Source invoke(Source req)\n"
+"{\n"
+"// Access the entire request PAYLOAD and return the response PAYLOAD\n"
+" }\n"
+"}"
#. Tag: para
#: Web_Services.xml:172
@@ -692,6 +807,33 @@
"}\n"
"}"
msgstr ""
+"@WebService\n"
+"public class EndpointJSE\n"
+"{\n"
+"@Resource\n"
+"WebServiceContext wsCtx;\n"
+" \n"
+"@WebMethod\n"
+"public String testGetMessageContext()\n"
+"{\n"
+"SOAPMessageContext jaxwsContext = (SOAPMessageContext)wsCtx.getMessageContext"
+"();\n"
+"return jaxwsContext != null ? "pass" : "fail";\n"
+"}\n"
+"..\n"
+"@WebMethod\n"
+"public String testGetUserPrincipal()\n"
+"{\n"
+"Principal principal = wsCtx.getUserPrincipal();\n"
+"return principal.getName();\n"
+"}\n"
+" \n"
+"@WebMethod\n"
+"public boolean testIsUserInRole(String role)\n"
+"{\n"
+"return wsCtx.isUserInRole(role);\n"
+"}\n"
+"}"
#. Tag: title
#: Web_Services.xml:186
@@ -967,6 +1109,33 @@
" ...\n"
" }"
msgstr ""
+"/** \n"
+" * The getPort method returns a proxy. A service client\n"
+" * uses this proxy to invoke operations on the target\n"
+" * service endpoint. The <code>serviceEndpointInterface</code>\n"
+" * specifies the service endpoint interface that is supported by\n"
+" * the created dynamic proxy instance.\n"
+" **/\n"
+" public <T> T getPort(QName portName, Class<T> "
+"serviceEndpointInterface)\n"
+" {\n"
+" ...\n"
+" }\n"
+" \n"
+" /** \n"
+" * The getPort method returns a proxy. The parameter\n"
+" * <code>serviceEndpointInterface</code> specifies the service\n"
+" * endpoint interface that is supported by the returned proxy.\n"
+" * In the implementation of this method, the JAX-WS\n"
+" * runtime system takes the responsibility of selecting a protocol\n"
+" * binding (and a port) and configuring the proxy accordingly.\n"
+" * The returned proxy should not be reconfigured by the client.\n"
+" *\n"
+" **/\n"
+" public <T> T getPort(Class<T> serviceEndpointInterface)\n"
+" {\n"
+" ...\n"
+" }"
#. Tag: para
#: Web_Services.xml:253
@@ -1013,6 +1182,26 @@
" }\n"
" }"
msgstr ""
+"@WebServiceClient(name = "TestEndpointService", targetNamespace = "
+""http://org.jboss.ws/wsref", \n"
+" wsdlLocation = "http://localhost.localdomain:8080/jaxws-samples-"
+"webserviceref?wsdl")\n"
+" \n"
+" public class TestEndpointService extends Service\n"
+" {\n"
+" ...\n"
+" \n"
+" public TestEndpointService(URL wsdlLocation, QName serviceName) {\n"
+" super(wsdlLocation, serviceName);\n"
+" }\n"
+" \n"
+" @WebEndpoint(name = "TestEndpointPort")\n"
+" public TestEndpoint getTestEndpointPort() \n"
+" {\n"
+" return (TestEndpoint)super.getPort(TESTENDPOINTPORT, TestEndpoint."
+"class);\n"
+" }\n"
+" }"
#. Tag: title
#: Web_Services.xml:263
@@ -1152,6 +1341,41 @@
"</port-info>\n"
"</service-ref>"
msgstr ""
+"<service-ref>\n"
+"<service-ref-name>OrganizationService</service-ref-name>\n"
+"<wsdl-override>file:/wsdlRepository/organization-service.wsdl</wsdl-"
+"override>\n"
+"</service-ref>\n"
+".. \n"
+"<service-ref>\n"
+"<service-ref-name>OrganizationService</service-ref-name>\n"
+"<config-name>Secure Client Config</config-name>\n"
+"<config-file>META-INF/jbossws-client-config.xml</config-file>\n"
+"<handler-chain>META-INF/jbossws-client-handlers.xml</handler-"
+"chain>\n"
+"</service-ref>\n"
+" \n"
+"<service-ref>\n"
+"<service-ref-name>SecureService</service-ref-name>\n"
+"<service-class-name>org.jboss.tests.ws.jaxws.webserviceref."
+"SecureEndpointService</service-class-name>\n"
+"<service-qname>{http://org.jboss.ws/wsref}SecureEndpointService</"
+"service-qname>\n"
+"<port-info>\n"
+"<service-endpoint-interface>org.jboss.tests.ws.jaxws.webserviceref."
+"SecureEndpoint</service-endpoint-interface>\n"
+"<port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-"
+"qname>\n"
+"<stub-property>\n"
+"<name>javax.xml.ws.security.auth.username</name>\n"
+"<value>kermit</value>\n"
+"</stub-property>\n"
+"<stub-property>\n"
+"<name>javax.xml.ws.security.auth.password</name>\n"
+"<value>thefrog</value>\n"
+"</stub-property>\n"
+"</port-info>\n"
+"</service-ref>"
#. Tag: para
#: Web_Services.xml:310
@@ -1235,6 +1459,18 @@
"Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader"
"(payload)));"
msgstr ""
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"Dispatch dispatch = service.createDispatch(portName, StreamSource.class, "
+"Mode.PAYLOAD);\n"
+" \n"
+"String payload = "<ns1:ping xmlns:ns1='http://oneway.samples."
+"jaxws.ws.test.jboss.org/'/>";\n"
+"dispatch.invokeOneWay(new StreamSource(new StringReader(payload)));\n"
+" \n"
+"payload = "<ns1:feedback xmlns:ns1='http://oneway.samples.jaxws."
+"ws.test.jboss.org/'/>";\n"
+"Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader"
+"(payload)));"
#. Tag: title
#: Web_Services.xml:336
@@ -1281,6 +1517,20 @@
"assertEquals("Async", retStr);\n"
"}"
msgstr ""
+"public void testInvokeAsync() throws Exception\n"
+"{\n"
+"URL wsdlURL = new URL("http://" + getServerHost() + ":8080/"
+"jaxws-samples-asynchronous?wsdl");\n"
+"QName serviceName = new QName(targetNS, "TestEndpointService");\n"
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"TestEndpoint port = service.getPort(TestEndpoint.class);\n"
+" \n"
+"Response response = port.echoAsync("Async");\n"
+" \n"
+"// access future\n"
+"String retStr = (String) response.get();\n"
+"assertEquals("Async", retStr);\n"
+"}"
#. Tag: title
#: Web_Services.xml:347
@@ -1323,6 +1573,27 @@
"}\n"
"}"
msgstr ""
+"@WebService (name="PingEndpoint")\n"
+"@SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+"public class PingEndpointImpl\n"
+"{\n"
+" private static String feedback;\n"
+".. \n"
+"@WebMethod\n"
+"@Oneway\n"
+"public void ping()\n"
+"{\n"
+"log.info("ping");\n"
+"feedback = "ok";\n"
+"}\n"
+".. \n"
+"@WebMethod\n"
+"public String feedback()\n"
+"{\n"
+"log.info("feedback");\n"
+"return feedback;\n"
+"}\n"
+"}"
#. Tag: title
#: Web_Services.xml:357
@@ -1490,6 +1761,15 @@
"handlerChain.add(new RoutingHandler());\n"
"bindingProvider.getBinding().setHandlerChain(handlerChain); // important!"
msgstr ""
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"Endpoint port = (Endpoint)service.getPort(Endpoint.class);\n"
+" \n"
+"BindingProvider bindingProvider = (BindingProvider)port;\n"
+"List<Handler> handlerChain = new ArrayList<Handler>();\n"
+"handlerChain.add(new LogHandler());\n"
+"handlerChain.add(new AuthorizationHandler());\n"
+"handlerChain.add(new RoutingHandler());\n"
+"bindingProvider.getBinding().setHandlerChain(handlerChain); // important!"
#. Tag: title
#: Web_Services.xml:414
@@ -1585,6 +1865,15 @@
"throw new SOAPFaultException(fault);\n"
"}"
msgstr ""
+"public void throwSoapFaultException()\n"
+"{\n"
+"SOAPFactory factory = SOAPFactory.newInstance();\n"
+"SOAPFault fault = factory.createFault("this is a fault string!", "
+"new QName("http://foo", "FooCode"));\n"
+"fault.setFaultActor("mr.actor");\n"
+"fault.addDetail().addChildElement("test");\n"
+"throw new SOAPFaultException(fault);\n"
+"}"
#. Tag: para
#: Web_Services.xml:443
@@ -1732,13 +2021,13 @@
#: Web_Services.xml:523
#, no-c-format
msgid "image/jpeg"
-msgstr ""
+msgstr "image/jpeg"
#. Tag: para
#: Web_Services.xml:528
#, no-c-format
msgid "java.awt.Image"
-msgstr ""
+msgstr "java.awt.Image"
#. Tag: para
#: Web_Services.xml:535
@@ -1750,13 +2039,13 @@
#: Web_Services.xml:540 Web_Services.xml:552
#, no-c-format
msgid "javax.xml.transform.Source"
-msgstr ""
+msgstr "javax.xml.transform.Source"
#. Tag: para
#: Web_Services.xml:547
-#, fuzzy, no-c-format
+#, no-c-format
msgid "application/xml"
-msgstr "Web 应用程序"
+msgstr "application/xml"
#. Tag: para
#: Web_Services.xml:559
@@ -1832,6 +2121,23 @@
"[...]\n"
"}"
msgstr ""
+"package org.jboss.test.ws.jaxws.samples.xop.doclit;\n"
+" \n"
+"import javax.ejb.Remote;\n"
+"import javax.jws.WebService;\n"
+"import javax.jws.soap.SOAPBinding;\n"
+"import javax.xml.ws.BindingType;\n"
+" \n"
+"@Remote\n"
+"@WebService(targetNamespace = "http://org.jboss.ws/xop/doclit")\n"
+"@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = "
+"SOAPBinding.ParameterStyle.BARE)\n"
+"@BindingType(value="http://schemas.xmlsoap.org/wsdl/soap/http?"
+"mtom=true") (1)\n"
+"public interface MTOMEndpoint {\n"
+" \n"
+"[...]\n"
+"}"
#. Tag: para
#: Web_Services.xml:595
@@ -1866,6 +2172,13 @@
"binding = (SOAPBinding)((BindingProvider)port).getBinding();\n"
"binding.setMTOMEnabled(true);"
msgstr ""
+"[...]\n"
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"port = service.getPort(MTOMEndpoint.class);\n"
+" \n"
+"// enable MTOM\n"
+"binding = (SOAPBinding)((BindingProvider)port).getBinding();\n"
+"binding.setMTOMEnabled(true);"
#. Tag: para
#: Web_Services.xml:610
@@ -1952,6 +2265,35 @@
"}\n"
"}"
msgstr ""
+"/**\n"
+"* Payload bean that will use SwaRef encoding\n"
+"*/\n"
+"@XmlRootElement\n"
+"public class DocumentPayload\n"
+"{\n"
+"private DataHandler data;\n"
+" \n"
+"public DocumentPayload()\n"
+"{\n"
+"}\n"
+" \n"
+"public DocumentPayload(DataHandler data)\n"
+"{\n"
+"this.data = data;\n"
+"}\n"
+" \n"
+"@XmlElement\n"
+"@XmlAttachmentRef\n"
+"public DataHandler getData()\n"
+"{\n"
+"return data;\n"
+"}\n"
+" \n"
+"public void setData(DataHandler data)\n"
+"{\n"
+"this.data = data;\n"
+"}\n"
+"}"
#. Tag: para
#: Web_Services.xml:633
@@ -1979,6 +2321,18 @@
" \n"
"}"
msgstr ""
+"@WebService\n"
+"public interface DocWrappedEndpoint\n"
+"{\n"
+"@WebMethod\n"
+"DocumentPayload beanAnnotation(DocumentPayload dhw, String test);\n"
+" \n"
+"@WebMethod\n"
+"@XmlAttachmentRef\n"
+"DataHandler parameterAnnotation(@XmlAttachmentRef DataHandler data, String "
+"test);\n"
+" \n"
+"}"
#. Tag: para
#: Web_Services.xml:637
@@ -2002,6 +2356,17 @@
"</env:Body>\n"
"</env:Envelope>"
msgstr ""
+"<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/"
+"'>\n"
+"<env:Header/>\n"
+"<env:Body>\n"
+"<ns2:parameterAnnotation xmlns:ns2='http://swaref.samples.jaxws.ws."
+"test.jboss.org/'>\n"
+"<arg0>cid:0-1180017772935-32455963 at ws.jboss.org</arg0>\n"
+"<arg1>Wrapped test</arg1>\n"
+"</ns2:parameterAnnotation>\n"
+"</env:Body>\n"
+"</env:Envelope>"
#. Tag: title
#: Web_Services.xml:644
@@ -2241,6 +2606,13 @@
"echo/jaxws/Echo.class\n"
"echo/jaxws/EchoResponse.class"
msgstr ""
+"$ javac -d . -classpath jboss-jaxws.jar Echo.java\n"
+"$ wsprovide -w echo.Echo\n"
+"Generating WSDL:\n"
+"EchoService.wsdl\n"
+"Writing Classes:\n"
+"echo/jaxws/Echo.class\n"
+"echo/jaxws/EchoResponse.class"
#. Tag: para
#: Web_Services.xml:771
@@ -2258,6 +2630,11 @@
"</port>\n"
"</service>"
msgstr ""
+"<service name='EchoService'>\n"
+"<port binding='tns:EchoBinding' name='EchoPort'>\n"
+"<soap:address location='REPLACE_WITH_ACTUAL_URL'/>\n"
+"</port>\n"
+"</service>"
#. Tag: para
#: Web_Services.xml:775
@@ -2315,6 +2692,22 @@
"</servlet-mapping>\n"
"</web-app>"
msgstr ""
+"<web-app xmlns="http://java.sun.com/xml/ns/j2ee"\n"
+"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n"
+"xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/"
+"xml/ns/j2ee/web-app_2_4.xsd"\n"
+"version="2.4">\n"
+" \n"
+"<servlet>\n"
+"<servlet-name>Echo</servlet-name>\n"
+"<servlet-class>echo.Echo</servlet-class>\n"
+"</servlet>\n"
+" \n"
+"<servlet-mapping>\n"
+"<servlet-name>Echo</servlet-name>\n"
+"<url-pattern>/Echo</url-pattern>\n"
+"</servlet-mapping>\n"
+"</web-app>"
#. Tag: para
#: Web_Services.xml:791
@@ -2337,6 +2730,16 @@
"adding: WEB-INF/classes/echo/Echo.class(in = 340) (out= 247)(deflated 27%)\n"
"adding: WEB-INF/web.xml(in = 576) (out= 271)(deflated 52%)"
msgstr ""
+"$ mkdir -p WEB-INF/classes\n"
+"$ cp -rp echo WEB-INF/classes/\n"
+"$ cp web.xml WEB-INF\n"
+"$ jar cvf echo.war WEB-INF\n"
+"added manifest\n"
+"adding: WEB-INF/(in = 0) (out= 0)(stored 0%)\n"
+"adding: WEB-INF/classes/(in = 0) (out= 0)(stored 0%)\n"
+"adding: WEB-INF/classes/echo/(in = 0) (out= 0)(stored 0%)\n"
+"adding: WEB-INF/classes/echo/Echo.class(in = 340) (out= 247)(deflated 27%)\n"
+"adding: WEB-INF/web.xml(in = 576) (out= 271)(deflated 52%)"
#. Tag: para
#: Web_Services.xml:795
@@ -2456,70 +2859,71 @@
#: Web_Services.xml:857
#, no-c-format
msgid "Echo_Type.java"
-msgstr ""
+msgstr "Echo_Type.java"
#. Tag: para
#: Web_Services.xml:862
#, no-c-format
msgid "Wrapper bean for request message"
-msgstr ""
+msgstr "用于请求消息的 Wrapper bean "
#. Tag: para
#: Web_Services.xml:869
#, no-c-format
msgid "EchoResponse.java"
-msgstr ""
+msgstr "EchoResponse.java"
#. Tag: para
#: Web_Services.xml:874
#, no-c-format
msgid "Wrapper bean for response message"
-msgstr ""
+msgstr "用于响应消息的 Wrapper bean"
#. Tag: para
#: Web_Services.xml:881
#, no-c-format
msgid "ObjectFactory.java"
-msgstr ""
+msgstr "ObjectFactory.java"
#. Tag: para
#: Web_Services.xml:886
#, no-c-format
msgid "JAXB XML Registry"
-msgstr ""
+msgstr "JAXB XML 注册表"
#. Tag: para
#: Web_Services.xml:893
#, no-c-format
msgid "package-info.java"
-msgstr ""
+msgstr "package-info.java"
#. Tag: para
#: Web_Services.xml:898
#, no-c-format
msgid "Holder for JAXB package annotations"
-msgstr ""
+msgstr "用于 JAXB 包注解的 Holder"
#. Tag: para
#: Web_Services.xml:905
#, no-c-format
msgid "EchoService.java"
-msgstr ""
+msgstr "EchoService.java"
#. Tag: para
#: Web_Services.xml:910
#, no-c-format
msgid "Used only by JAX-WS clients"
-msgstr ""
+msgstr "仅被 JAX-WS 客户使用"
#. Tag: para
#: Web_Services.xml:917
#, no-c-format
+#, fuzzy
msgid ""
"Examining the Service Endpoint Interface reveals annotations that are more "
"explicit than in the class written by hand in the bottom-up example, "
"however, these evaluate to the same contract:"
-msgstr ""
+msgstr "检查 Service Endpoint 接口可以显示注解, "
#. Tag: programlisting
#: Web_Services.xml:920
@@ -2540,6 +2944,20 @@
" \n"
"}"
msgstr ""
+"@WebService(name = "Echo", targetNamespace = "http://echo/"
+"")\n"
+"public interface Echo {\n"
+"@WebMethod\n"
+"@WebResult(targetNamespace = "")\n"
+"@RequestWrapper(localName = "echo", targetNamespace = "http://"
+"echo/", className = "echo.Echo_Type")\n"
+"@ResponseWrapper(localName = "echoResponse", targetNamespace = "
+""http://echo/", className = "echo.EchoResponse")\n"
+"public String echo(\n"
+"@WebParam(name = "arg0", targetNamespace = "")\n"
+"String arg0);\n"
+" \n"
+"}"
#. Tag: para
#: Web_Services.xml:921
@@ -2547,7 +2965,7 @@
msgid ""
"The only missing piece (besides the packaging) is the implementation class, "
"which can now be written, using the above interface."
-msgstr ""
+msgstr "这里未出现的(除了 packaging)是实现类,它可用上面的接口进行编写。"
#. Tag: programlisting
#: Web_Services.xml:924
@@ -2564,12 +2982,22 @@
"}\n"
"}"
msgstr ""
+"package echo;\n"
+" \n"
+"@javax.jws.WebService(endpointInterface="echo.Echo")\n"
+"public class EchoImpl implements Echo\n"
+"{\n"
+"public String echo(String arg0)\n"
+"{\n"
+"return arg0;\n"
+"}\n"
+"}"
#. Tag: title
#: Web_Services.xml:928
#, no-c-format
msgid "Client Side"
-msgstr ""
+msgstr "客户端"
#. Tag: para
#: Web_Services.xml:929
@@ -2616,7 +3044,7 @@
#: Web_Services.xml:939
#, no-c-format
msgid "Online version:"
-msgstr ""
+msgstr "脱机版本:"
#. Tag: programlisting
#: Web_Services.xml:942
@@ -2629,6 +3057,12 @@
"</port>\n"
"</service>"
msgstr ""
+"<service name="EchoService">\n"
+"<port binding="tns:EchoBinding" name="EchoPort">\n"
+"<soap:address location="http://localhost.localdomain:8080/echo/"
+"Echo"/>\n"
+"</port>\n"
+"</service>"
#. Tag: para
#: Web_Services.xml:943
@@ -2637,6 +3071,8 @@
"Using the online deployed version with <ulink url=\"http://jbws.dyndns.org/"
"mediawiki/index.php?title=Wsconsume\">wsconsume</ulink>:"
msgstr ""
+"和在线部署的版本一起使用 <ulink url=\"http://jbws.dyndns.org/"
+"mediawiki/index.php?title=Wsconsume\">wsconsume</ulink>:"
#. Tag: programlisting
#: Web_Services.xml:946
@@ -2656,6 +3092,19 @@
"echo/ObjectFactory.java\n"
"echo/package-info.java"
msgstr ""
+"$ wsconsume -k http://localhost:8080/echo/Echo?wsdl\n"
+"echo/Echo.java\n"
+"echo/EchoResponse.java\n"
+"echo/EchoService.java\n"
+"echo/Echo_Type.java\n"
+"echo/ObjectFactory.java\n"
+"echo/package-info.java\n"
+"echo/Echo.java\n"
+"echo/EchoResponse.java\n"
+"echo/EchoService.java\n"
+"echo/Echo_Type.java\n"
+"echo/ObjectFactory.java\n"
+"echo/package-info.java"
#. Tag: para
#: Web_Services.xml:947
@@ -2702,6 +3151,38 @@
"}\n"
"}"
msgstr ""
+"@WebServiceClient(name = "EchoService", targetNamespace = ""
+"http://echo/", wsdlLocation = "http://localhost:8080/echo/Echo?"
+"wsdl")\n"
+"public class EchoService extends Service\n"
+"{\n"
+"private final static URL ECHOSERVICE_WSDL_LOCATION;\n"
+" \n"
+"static {\n"
+"URL url = null;\n"
+"try {\n"
+"url = new URL("http://localhost:8080/echo/Echo?wsdl");\n"
+"} catch (MalformedURLException e) {\n"
+"e.printStackTrace();\n"
+"}\n"
+"ECHOSERVICE_WSDL_LOCATION = url;\n"
+"}\n"
+" \n"
+"public EchoService(URL wsdlLocation, QName serviceName) {\n"
+"super(wsdlLocation, serviceName);\n"
+"}\n"
+" \n"
+"public EchoService() {\n"
+"super(ECHOSERVICE_WSDL_LOCATION, new QName("http://echo/", ""
+"EchoService"));\n"
+"}\n"
+" \n"
+"@WebEndpoint(name = "EchoPort")\n"
+"public Echo getEchoPort() {\n"
+"return (Echo)super.getPort(new QName("http://echo/", ""
+"EchoPort"), Echo.class);\n"
+"}\n"
+"}"
#. Tag: para
#: Web_Services.xml:951
@@ -2753,6 +3234,23 @@
"} \n"
"}"
msgstr ""
+"import echo.*;\n"
+"..\n"
+"public class EchoClient\n"
+"{\n"
+"public static void main(String args[])\n"
+"{\n"
+"if (args.length != 1)\n"
+"{\n"
+"System.err.println("usage: EchoClient <message>");\n"
+"System.exit(1);\n"
+"}\n"
+" \n"
+"EchoService service = new EchoService();\n"
+"Echo echo = service.getEchoPort();\n"
+"System.out.println("Server said: " + echo.echo(args[0]));\n"
+"} \n"
+"}"
#. Tag: para
#: Web_Services.xml:966
@@ -2770,6 +3268,8 @@
"$ wsrunclient EchoClient 'Hello World!'\n"
"Server said: Hello World!"
msgstr ""
+"$ wsrunclient EchoClient 'Hello World!'\n"
+"Server said: Hello World!"
#. Tag: para
#: Web_Services.xml:970
@@ -2796,6 +3296,18 @@
"System.out.println("Server said: " + echo.echo(args[0]));\n"
"..."
msgstr ""
+"...\n"
+"EchoService service = new EchoService();\n"
+"Echo echo = service.getEchoPort();\n"
+" \n"
+"/* Set NEW Endpoint Location */\n"
+"String endpointURL = "http://NEW_ENDPOINT_URL";\n"
+"BindingProvider bp = (BindingProvider)echo;\n"
+"bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "
+"endpointURL);\n"
+" \n"
+"System.out.println("Server said: " + echo.echo(args[0]));\n"
+"..."
#. Tag: title
#: Web_Services.xml:977
@@ -2837,7 +3349,7 @@
#: Web_Services.xml:1005
#, no-c-format
msgid "http://java.sun.com/webservices/docs/2.0/jaxws/customizations.html"
-msgstr ""
+msgstr "http://java.sun.com/webservices/docs/2.0/jaxws/customizations.html"
#. Tag: para
#: Web_Services.xml:1009
@@ -2940,6 +3452,28 @@
"{ ... }\n"
"}"
msgstr ""
+"@WebService(name = "StatefulEndpoint", targetNamespace = ""
+"http://org.jboss.ws/samples/wsaddressing\n"
+" ", serviceName = ""
+"TestService")\n"
+"@EndpointConfig(configName = "Standard WSAddressing Endpoint")\n"
+"@HandlerChain(file = "WEB-INF/jaxws-handlers.xml")\n"
+"@SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+"public class StatefulEndpointImpl implements StatefulEndpoint, "
+"ServiceLifecycle\n"
+"{\n"
+"@WebMethod\n"
+"public void addItem(String item)\n"
+"{ ... }\n"
+" \n"
+"@WebMethod\n"
+"public void checkout()\n"
+"{ ... }\n"
+" \n"
+"@WebMethod\n"
+"public String getItems()\n"
+"{ ... }\n"
+"}"
#. Tag: para
#: Web_Services.xml:1055
@@ -2979,6 +3513,22 @@
" \n"
"</handler-chains>"
msgstr ""
+"<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" \n"
+" xmlns:xsi="http://www.w3.org/2001/"
+"XMLSchema-instance"\n"
+"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee "
+"javaee_web_services_1_2.xsd">\n"
+" \n"
+"<handler-chain>\n"
+"<protocol-bindings>##SOAP11_HTTP</protocol-bindings>\n"
+"<handler>\n"
+"<handler-name>Application Server Handler</handler-name>\n"
+"<handler-class>org.jboss.test.ws.jaxws.samples.wsaddressing."
+"ServerHandler</handler-class>\n"
+"</handler>\n"
+"</handler-chain>\n"
+" \n"
+"</handler-chains>"
#. Tag: para
#: Web_Services.xml:1062
@@ -3022,6 +3572,14 @@
"customHandlerChain.add(new WSAddressingClientHandler());\n"
"bindingProvider.getBinding().setHandlerChain(customHandlerChain);"
msgstr ""
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"port1 = (StatefulEndpoint)service.getPort(StatefulEndpoint.class);\n"
+"BindingProvider bindingProvider = (BindingProvider)port1;\n"
+" \n"
+"List<Handler> customHandlerChain = new ArrayList<Handler>();\n"
+"customHandlerChain.add(new ClientHandler());\n"
+"customHandlerChain.add(new WSAddressingClientHandler());\n"
+"bindingProvider.getBinding().setHandlerChain(customHandlerChain);"
#. Tag: para
#: Web_Services.xml:1076
@@ -3093,7 +3651,7 @@
#: Web_Services.xml:1086
#, no-c-format
msgid "Below you see the SOAP messages that are beeing exchanged."
-msgstr ""
+msgstr "下面你将看到被交换的 SOAP 消息。"
#. Tag: programlisting
#: Web_Services.xml:1089
@@ -3251,7 +3809,7 @@
#: Web_Services.xml:1095
#, no-c-format
msgid "WS-BPEL"
-msgstr ""
+msgstr "WS-BPEL"
#. Tag: para
#: Web_Services.xml:1096
@@ -3261,6 +3819,9 @@
"jbws.dyndns.org/mediawiki/index.php?title=JAX-RPC_User_Guide#WS-BPEL\">JAX-"
"RPC User Guide#WS-BPEL</ulink>."
msgstr ""
+"JAX-WS 不支持 WS-BPEL,相关信息请参考 <ulink url=\"http://"
+"jbws.dyndns.org/mediawiki/index.php?title=JAX-RPC_User_Guide#WS-BPEL\">JAX-"
+"RPC User Guide#WS-BPEL</ulink>。"
#. Tag: title
#: Web_Services.xml:1102
@@ -3275,33 +3836,33 @@
"WS-Eventing specifies a set of operations that allow an event consumer to "
"register (subscribe) with an event producer (source) to receive events "
"(notifications) in an asynchronous fashion."
-msgstr ""
+msgstr "WS-Eventing 指定了一系列操作,允许事件消费者向事件生产者(源)注册(订阅)来以异步的方式接收事件(通知)。"
#. Tag: para
#: Web_Services.xml:1108
#, no-c-format
msgid "WS-Eventing is defined by the combination of the following specifications:"
-msgstr ""
+msgstr "WS-Eventing 是通过下列规格的组合来定义的:"
#. Tag: ulink
#: Web_Services.xml:1114
#, no-c-format
msgid "WS-Eventing specification"
-msgstr ""
+msgstr "WS-Eventing 规格"
#. Tag: ulink
#: Web_Services.xml:1119
#, no-c-format
msgid "WS-Addressing Specifications"
-msgstr ""
+msgstr "WS-Addressing 规格"
#. Tag: para
#: Web_Services.xml:1123
-#, fuzzy, no-c-format
+#, no-c-format
msgid ""
"The following section will introduce the main eventing actors and their "
"responsiblities."
-msgstr "下面是关于 deploy 目录下的一些文件以及它们的功能。"
+msgstr "下面将介绍主要的事件参与者及其相关责任。"
#. Tag: para
#: Web_Services.xml:1129
@@ -3310,13 +3871,13 @@
"The original eventing specification builds upon WS-Addressing 2004/08. "
"JBossWS however decided to stick to the latest version, which is the W3C "
"candidate release."
-msgstr ""
+msgstr "原来的 Eventing 规格构建于 WS-Addressing 2004/08 之上。然而,JBossWS 决定遵循最新的版本,也就是 W3C 的候选版本。"
#. Tag: title
#: Web_Services.xml:1137
#, no-c-format
msgid "Collaboration"
-msgstr ""
+msgstr "Collaboration"
#. Tag: para
#: Web_Services.xml:1141
@@ -3327,7 +3888,7 @@
"notifications should delivered. Upon successful subscription the sink "
"receives a leased subscription ID that can be used to identify the client in "
"subsequent requests."
-msgstr ""
+msgstr "Event Sink(Web service 客户)发送一个订阅请求给事件源终端。这包括应该递送到的 event sink 终端的地址。在成功订阅后,Event Sink 会接收到一个已租用的订阅 ID,它可用来在随后的请求里识别客户。"
#. Tag: para
#: Web_Services.xml:1146
@@ -3337,7 +3898,7 @@
"GetStatus, Unsubscribe) to the subscription manager endpoint using the "
"previously received subscription ID. The subscription manager endpoint "
"address was returned as part of the subscription response in the first place."
-msgstr ""
+msgstr "在成功注册后,Event sink 用之前接收到的订阅 ID 把管理性请求(Renew、GetStatus、Unsubscribe)转发给订阅管理者终端。然后,订阅管理者终端地址作为订阅响应的一部分被返回。"
#. Tag: para
#: Web_Services.xml:1151
@@ -3346,7 +3907,7 @@
"The actual event sink (application) emits notification messages through the "
"JBossWS-Eventing module. JBossWS-Eventing dispatches the notification to any "
"subscriber endpoint that is registered with a particular event source.s"
-msgstr ""
+msgstr "实际的 event sink(应用程序)通过 JBossWS-Eventing 模块发送通知消息。JBossWS-Eventing 把通知分发给注册到特定数据源的任何订阅者终端。"
#. Tag: para
#: Web_Services.xml:1156
@@ -3356,7 +3917,7 @@
"time, i.e. to inform an event sink that a subscription was canceled. This "
"can be the case when the subscription expired or the event source was "
"undeployed."
-msgstr ""
+msgstr "除此之外,JBossWS-Eventing 在任何时间都可能发送生命周期事件,例如,通知 event sink 某个订阅已经取消了。当订阅过期或者事件源被卸载时,就会出现这样的情况。"
#. Tag: para
#: Web_Services.xml:1162
@@ -3369,7 +3930,7 @@
"is packaging of standard JSR-109 deployment archive that includes the event "
"source specific WSDL and points to the JBossWS-Eventing endpoint "
"implementations."
-msgstr ""
+msgstr "用户的责任是提供完整的事件源部署所要求的 web service 终端(EventSourceEndpoint、SubscriptionManagerEndpoint)。幸运的是,JBossWS-Eventing 已经附带了一个可立马使用的实现。剩下的事情是将包括事件源专有的 WSDL 的标准 JSR-109 部署文档打包并使其指向 JBossWS-Eventing 终端实现。"
#. Tag: para
#: Web_Services.xml:1165
@@ -3384,7 +3945,7 @@
"Create a custom WSDL that describes your event source, in respect to the "
"notification schema (1) and the fact that is actually contains an event "
"source port (2)"
-msgstr ""
+msgstr "创建自定义的描述事件源的 WSDL,按照通知模式 (1) 以及实际包含事件源端口的事实 (2)"
#. Tag: para
#: Web_Services.xml:1175
@@ -3392,13 +3953,13 @@
msgid ""
"Use the JBossWS SEI (3) and endpoint (4) implementations (webservices.xml, "
"web.xml)."
-msgstr ""
+msgstr "使用 JBossWS SEI (3) 和终端 (4) 实现(webservices.xml、web.xml)。"
#. Tag: title
#: Web_Services.xml:1183
#, no-c-format
msgid "Setup an event source endpoint"
-msgstr ""
+msgstr "设立事件源终端"
#. Tag: para
#: Web_Services.xml:1184
@@ -3412,6 +3973,9 @@
"index.php?title=JAX-WS_User_Guide#The_WSDL_that_describes_an_event_source"
"\">event source specific WSDL</ulink>."
msgstr ""
+"使用 JAX-WS,事件源的设立就变得很容易了。你所要做的只是创建 <literal>AbstractEventSourceEndpoint</literal> 的终端实现以及订阅管理者 <literal>AbstractSubscriptionManagerEndpoint</literal> 的子类并使这个实现指向 <ulink url=\"http://jbws.dyndns.org/mediawiki/"
+"index.php?title=JAX-WS_User_Guide#The_WSDL_that_describes_an_event_source"
+"\">事件源专有的 WSDL</ulink>。"
#. Tag: programlisting
#: Web_Services.xml:1187
More information about the jboss-cvs-commits
mailing list