| Attribute | Optional | Use |
| name | N | Name of the endpoint |
| wsdl | Y | Primary wsdl file location in the WAR file. For e.g. WEB-INF/wsdl/HelloService.wsdl. If this isn't specified, JAX-WS will create and publish a new WSDL. When the service is developed from Java, it is recommended to omit this attribute. |
| service | Y | QName of WSDL service. For e.g. {http://example.org/}HelloService. When the service is developed from java, it is recommended to omit this attribute. |
| port | Y | QName of WSDL port. For e.g. {http://example.org/}HelloPort. When the service is developed from Java, it is recommended to omit this attribute. |
| implementation | N | Endpoint implementation class name. For e.g: hello.HelloImpl. The class should have @WebService annotation. Provider based implementation class doesn't have to have this annotation. |
| url-pattern | N | Should match <url-pattern> in web.xml |
| binding | Y | Binding id defined in the JAX-WS API. The possible values are: "http://schemas.xmlsoap.org/wsdl/soap/http", If omitted, it is considered SOAP1.1 binding. |
| enable-mtom | Y | Enables MTOM optimization. true or false. Default is false. |
本文详细介绍了 JAX-WS 在部署 Web 服务时所涉及的关键属性及其用途,包括名称、WSDL 文件位置、服务及端口 QNames、实现类名等,并解释了这些属性在 Java 开发模式下的推荐使用方式。
1865

被折叠的 条评论
为什么被折叠?



