Which is the best way to implement SOAP Web Servic

2019-04-01 19:02发布

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.

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.

  • Second one, is to use Enunciate. It's a lot better documented, but I feel that this is not the standard manner.

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?

Thanks in advance, regards, (Sorry, as I'm new here, I cannot post hyperlinks)

1条回答
Emotional °昔
2楼-- · 2019-04-01 20:00

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.

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.

登录 后发表回答