MessageHandler in JAR/WAR/EAR

China☆狼群 提交于 2020-01-06 08:36:09

问题


I am making a PEP Server which intercepts the SOAP messages, and checks them against WS-Policies defined in a separate database. It is divided in 3 compontents:

1) PEP (Policy enforcemenet point) intercepts the messages with a message handler

2) sends it to the -> PDP (Policy decision point) decides which message gets through

3) this by using the PIP (Policy information point) which has a database with the policies.

If the policies are correct, the message gets send further to the web service. Now I was wondering how it would be possible to package this PEP in a JAR file (or WAR/EAR? I am new to this so I am not sure in which kind of package it should come). The PEP is a messagehandler, so the Web service will have to specify a @HandlerChain(file = "handler.xml")

Would it now be possible to include this PEP in the xml file, if its in contained in a jar file?


回答1:


I recommend using JAX-WS for creating and invoking Java Web Services.

There's a nice tutorial about creating both a service and a client to invoke the service. In your case, you'd want to zero in on the "A Simple JAX-WS Client" section. They outline how to do this with NetBeans but you can get the general idea and then revamp for your particular situation.

Here's the link for the tutorial: Creating a Simple Web Service and Client with JAX-WS

I'm thinking in your situation that you can just create a Java client that gets packaged as a JAR.



来源:https://stackoverflow.com/questions/9420320/messagehandler-in-jar-war-ear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!