I’ve started to use document-style web-services recently. I’ve learned
that in this way we can have only one part(“parameter”) for
input/output message, which can contain all data.
你必须区分文件/文字裸(或解包)和文件/文字包裹.虽然对于后者你的说法是正确的,但对于引物而言却是错误的.相对于an IBM guide for the specific type encodings,您将看到document / literal bare可以指定多个零件元素:
这导致SOAP消息:
5
5.0
然而,主要缺点之一是您丢失了有关所调用方法的信息 – 除了不符合WS-I之外.因此,使用document / literal wrapped(这是推荐的绑定样式)来绕过裸绑定样式的限制.
请注意,document / literal wrapped本身不是实际WSDL规范的一部分:
In document/literal style of messaging, there exists a pattern which
is known as wrapped-document/literal. This is just a pattern, and is
not a part of WSDL specification. This pattern has a mention in JSR
224 (JAX-WS: Java API for XML based web services).
(07001)
@Edit:由于您的原始问题以及您对使用处理程序的原因的评论:
WSDL指定IN,OUT和INOUT参数.虽然前两个参数很容易理解,但后者有点棘手,因为发送到服务的参数应该以修改后的状态返回.
但是,Java是按值传递而不是通过引用传递并启用相同参数的更新,类似于通过引用传递的方式,处理程序可用于“伪造”对OUT或INOUT参数的WSDL一致性处理.