JAR/WAR/EAR中的MessageHandler [英] MessageHandler in JAR/WAR/EAR

查看:77
本文介绍了JAR/WAR/EAR中的MessageHandler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个PEP服务器,该服务器可拦截SOAP消息,并对照在单独的数据库中定义的WS-Policies对其进行检查.它分为3个部分:

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(策略执行点)使用消息处理程序拦截消息

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

2)将其发送到-> PDP(策略决策点),决定哪个消息通过

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

3)通过使用具有策略数据库的PIP(策略信息点)来实现.

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

如果策略正确,则消息将进一步发送到Web服务.现在,我想知道如何将这个PEP打包到一个JAR文件中(或WAR/EAR?我是新手,所以我不确定它应该以哪种打包方式打包). PEP是消息处理程序,因此Web服务将必须指定@HandlerChain(file ="handler.xml")

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")

现在可以将这个PEP包含在xml文件中(如果它包含在jar文件中)吗?

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

推荐答案

我建议使用JAX-WS创建和调用Java Web Services.

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

有一个很好的教程,关于创建服务和客户端以调用服务.对于您的情况,您希望在一个简单的JAX-WS Client"部分中置零.他们概述了如何使用NetBeans做到这一点,但是您可以了解一般想法,然后针对您的特定情况进行改进.

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.

以下是该教程的链接:创建简单的Web服务和客户端使用JAX-WS

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

在您的情况下,我认为您可以创建一个打包为JAR的Java客户端.

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

这篇关于JAR/WAR/EAR中的MessageHandler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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