@WebService,必选的标注。用于导出的服务接口及其实现类
name | 定义导出的服务接口的名字,对应于WSDL文档中wsdl:portType。默认是服务接口的Java类名加PortType |
targetNamespace | 定义导出的服务接口的名域(namespace),默认是倒置的服务接口Java包名。如demo.cxf.UserService的名域将会是http://cxf.demo/ |
serviceName | 定义服务名,与名域一起唯一标识一个服务。默认是其Java类名 |
wsdlLocation | 其WSDL文档URL。可由服务器容器自动产生
|
portName | 对应WSDL文档中的wsdl:port元素。默认是Java类名加Port |
endpointInterface | 指定服务接口的Java类。通常用于服务实现类的标注。应当指定类的全名,如demo.cxf.UserService |
portName | 对应WSDL文档中的wsdl:port元素。默认是Java类名加Port |
@WebMethod,可选的标注,用于服务接口的方法
operationName | 指定方法在WSDL文档中的名字,客房端用此名字调用方法 |
action | TODO 翻译此说明Specifies the value of the soapAction attribute of the soap:operation element generated for the method. The default value is an empty string. |
exclude | 生成WSDL文档时将该方法排除在外 |
@SOAPBinding,可选的标注,用于指定生成的SOAP定义文档风格。关于此标注再详细的
style | style Style.DOCUMENT (默认) Style.RPC
| SOAP消息风格
|
use | Use.LITERAL (默认) Use.ENCODED | SOAP数据编码方式
|
parameterStyle
| ParameterStyle.BARE ParameterStyle.WRAPPED
| Specifies how the method parameters, which correspond to message parts in a WSDL contract, are placed into the SOAP message body. A parameter style of BARE means that each parameter is placed into the message body as a child element of the message root. A parameter style of WRAPPED means that all of the input parameters are wrapped into a single element on a request message and that all of the output parameters are wrapped into a single element in the response message. If you set the style to RPC you must use the WRAPPED parameter style |
@RequestWrapper,可选的标注,用于指定如何包装客户端调用服务方法使用的参数
@ResponseWrapper,可选的标注,用于指定如何包装客户端调用服务方法的返回值
@WebFault,可选的标注,用于注解服务接口方法抛出的异常
name | 异常的名字
|
targetNamespace | 对应的名域,默认是服务接口的名域 |
faultName | 实现该异类的类名 |
@WebParam,可选的标注,用于指定方法参数的使用方式
name | 在WSDL文档中的名字,默认是arg0,arg1…
|
targetNamespace | 对应的名域。默认是服务接口的名域 |
mode | Mode.IN (默认)、Mode.OUT、Mode.INOUT |
header | true或者false(默认),指定该参数是否在SOAP消息头部发送 |
partName | TODO 翻译此说明 |
@WebResult,可选的标注,用于指定返回值的使用方式
name | 返回值在WSDL文件中的名字。默认是return |
targetNamespace | 对应的名域。默认是服务接口的名域 |
header | true或者false(默认),指定该参数是否在SOAP消息头部发送
|
partName | TODO 翻译此说明 Specifies the value of the name attribute of the wsdl:part element for the parameter when the binding is document
|