I need to implement a SOAP Web Service on Jboss Seam 2.1.0. The idea is to export an Stateless bean method as a Web Service.
我需要在Jboss Seam 2.1.0上实现SOAP Web服务。我们的想法是将无状态bean方法导出为Web服务。
However, I have found two approaches.
但是,我找到了两种方法。
-
First one, is to use the Seam's own web services annotations. The problem of this is the lack of documentation.
第一个是使用Seam自己的Web服务注释。问题是缺乏文件。
-
Second one, is to use Enunciate. It's a lot better documented, but I feel that this is not the standard manner.
第二,是使用Enunciate。记录得更好,但我觉得这不是标准方式。
So, which one is the best approach? Have I missed something? Is there more documentation around about the JBoss Seam "standard" SOAP web services implementation?
那么,哪一个是最好的方法呢?我错过了什么吗?是否有更多关于JBoss Seam“标准”SOAP Web服务实现的文档?
Thanks in advance, regards, (Sorry, as I'm new here, I cannot post hyperlinks)
在此先感谢,问候,(对不起,因为我是新来的,我无法发布超链接)
1 个解决方案
#1
I've always used JAX-WS which works very well with EJB3. Annotate your stateless bean with @WebService
, your methods with @WebMethod
and your parameters with @WebParam
.
我一直使用JAX-WS,它与EJB3非常兼容。使用@WebService注释无状态bean,使用@WebMethod注释方法,使用@WebParam注释参数。
The only trick to getting it to work with Seam is if you need authentication. In that case I've defined a SOAPHandler
in standard-jaxws-endpoint-config.xml
. You'll need to pull the username and password information out of the SOAP header and manually authenticate with Seam.
让它与Seam一起工作的唯一技巧是你需要身份验证。在那种情况下,我在standard-jaxws-endpoint-config.xml中定义了一个SOAPHandler。您需要从SOAP标头中提取用户名和密码信息,并使用Seam手动进行身份验证。
#1
I've always used JAX-WS which works very well with EJB3. Annotate your stateless bean with @WebService
, your methods with @WebMethod
and your parameters with @WebParam
.
我一直使用JAX-WS,它与EJB3非常兼容。使用@WebService注释无状态bean,使用@WebMethod注释方法,使用@WebParam注释参数。
The only trick to getting it to work with Seam is if you need authentication. In that case I've defined a SOAPHandler
in standard-jaxws-endpoint-config.xml
. You'll need to pull the username and password information out of the SOAP header and manually authenticate with Seam.
让它与Seam一起工作的唯一技巧是你需要身份验证。在那种情况下,我在standard-jaxws-endpoint-config.xml中定义了一个SOAPHandler。您需要从SOAP标头中提取用户名和密码信息,并使用Seam手动进行身份验证。