WebServices:裸vs包裹? [英] WebServices : bare vs wrapped?

查看:123
本文介绍了WebServices:裸vs包裹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从一些现有的wsdl生成了一些Web服务

I generate some WebServices out of some existing wsdl

我使用Maven来做这个但是一些web服务是用

I use Maven to do this but some webservices are generated with

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)  

和其他人

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) 

Jaxb或xjc会自动执行此操作吗?因为我在wsdls中没有任何差异...

Jaxb or xjc does this automatically ? because i do not have any differences in the wsdls...

推荐答案

当'操作'名称生成BARE webservices时, 'message'名称和'element'名称在某种形状或形式上有所不同。要自动生成客户端或服务存根为WRAPPED,所有这三个元素必须相同。

BARE webservices are generated when the 'operation' name, the 'message' name and the 'element' name are different in some shape or form. To auto generate your client or service stubs as WRAPPED, all of those three elements must be the same.

解决方法是编写自己的存根并使用@ RequestWrapper / @ ResponseWrapper注释。

The workaround to that is to write your own stubs and use the @RequestWrapper/@ResponseWrapper annotations.

PS:所有portType操作都必须具有包装样式请求/响应。即使是最微小的偏差也会默认为BARE。

PS: All of the portType operations must have a 'wrapped' style request/response. Even the slightest deviation and it will default to BARE.

这篇关于WebServices:裸vs包裹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆