[英]java Axis clint side Error unable to engage modules rampart
I'm trying to run my client-application I run a java application there is no tomcat or jboss.我正在尝试运行我的客户端应用程序我运行了一个没有 tomcat 或 jboss 的 java 应用程序。 I'am pure client-side.我是纯客户端。 I run it on eclipse.我在日食上运行它。
the system start logging this messages系统开始记录此消息
INFO (org.apache.axis2.deployment.DeploymentEngine:1098) - No services directory was found under C:\\JavaDev\\wsDemograficiPlugIn\\ClientWsAnpr\\axis-client\\modules.信息 (org.apache.axis2.deployment.DeploymentEngine:1098) - 在 C:\\JavaDev\\wsDemograficiPlugIn\\ClientWsAnpr\\axis-client\\modules 下找不到服务目录。 INFO (org.apache.axis2.deployment.DeploymentEngine:1109) - No modules directory was found under C:\\JavaDev\\wsDemograficiPlugIn\\ClientWsAnpr\\axis-client\\modules.信息 (org.apache.axis2.deployment.DeploymentEngine:1109) - 在 C:\\JavaDev\\wsDemograficiPlugIn\\ClientWsAnpr\\axis-client\\modules 下找不到模块目录。
and when i try to engage module rampart exit with当我尝试使用模块城墙退出时
org.apache.axis2.AxisFault: Unable to engage module : rampart org.apache.axis2.AxisFault:无法参与模块:城墙
my code is我的代码是
Policy policy = loadPolicy("C:/JavaDev/wsDemograficiPlugIn/ClientWsAnpr/src_axis/sign-policy-client.xml");
//TestConnStub stub = new TestConnStub();
String modulesPath="C:/JavaDev/wsDemograficiPlugIn/ClientWsAnpr/axis-client/modules";
//String axisXmlPath="C:/JavaDev/wsDemograficiPlugIn/ClientWsAnpr/axis-client/conf/axis2.xml";
//ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(modulesPath,axisXmlPath);
ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(modulesPath,null);
TestConnStub stub = new TestConnStub(configContext);
// configure and engage Rampart
ServiceClient client = stub._getServiceClient();
HashMap<String, AxisModule> modules = client.getAxisConfiguration().getModules();
Set <String> keys = modules.keySet();
Iterator itr = keys.iterator();
while(itr.hasNext()) {
Object element = itr.next();
System.out.print(element + " ");
}
//client.engageModule("addressing");
client.engageModule("rampart");
Options options = client.getOptions();
options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,policy);
The “repository” is a directory in the file system which has two sub directories called “services” and “modules” for example “repository”是文件系统中的一个目录,它有两个子目录,例如“services”和“modules”
in my cfg modulesPath to be set to "C:/JavaDev/wsDemograficiPlugIn/ClientWsAnpr/axis-client/"在我的 cfg modulesPath 中设置为“C:/JavaDev/wsDemograficiPlugIn/ClientWsAnpr/axis-client/”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.