java JAX-WS Web 服务中 BindingProvider 的用途
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32805144/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Purpose of BindingProvider in JAX-WS web service
提问by Tariq Khan
I have searched a lot to find the concrete explanation of BindingProvider used in web services but I could get the complete information.
我搜索了很多以找到Web服务中使用的BindingProvider的具体解释,但我可以获得完整的信息。
I have also read official documentation but I am still confused about the concept behind the BindingProvider. The official doc says
我也阅读了官方文档,但我仍然对 BindingProvider 背后的概念感到困惑。官方文档说
4.2 javax.xml.ws.BindingProvider
The BindingProvider interface represents a component that provides a protocol binding for use by clients, it is implemented by proxies and is extended by the Dispatch interface.
4.2 javax.xml.ws.BindingProvider
BindingProvider 接口代表一个组件,它提供一个协议绑定供客户端使用,它由代理实现并由 Dispatch 接口扩展。
In docs, what is mean by Protocol Binding??
在文档中,协议绑定是什么意思?
Can you guys please help me in understanding What is BindingProvider and its purpose with the help of simple code.
你们能否通过简单的代码帮助我理解什么是 BindingProvider 及其目的。
- Thanks
- 谢谢
回答by
The BindingProvider
interface defines accessor methods for the request and response context maps. The Dispatch<T>
interface extends the javax.xml.ws.BindingProvider
interface. Standard BindingProvider
properties are defined by the JAX-WS specification and the client program may set and get these properties. The application may also define application-specific properties, but the specification discourages this for portability reasons.
该BindingProvider
接口定义了请求和响应上下文映射的访问器方法。该Dispatch<T>
接口扩展javax.xml.ws.BindingProvider
接口。标准BindingProvider
属性由 JAX-WS 规范定义,客户端程序可以设置和获取这些属性。应用程序还可以定义特定于应用程序的属性,但出于可移植性的原因,规范不鼓励这样做。
See Also:
也可以看看:
Example:
例子: