我正在尝试运行我的客户端应用程序 我运行java应用程序没有tomcat或jboss。我纯粹是客户端。 我在日食上运行它。
系统开始记录此消息
INFO(org.apache.axis2.deployment.DeploymentEngine:1098) - 否 服务目录被发现 C:\ JavaDev \ wsDemograficiPlugIn \ ClientWsAnpr \轴客户\模块。信息 (org.apache.axis2.deployment.DeploymentEngine:1109) - 没有模块 找到目录下 C:\ JavaDev \ wsDemograficiPlugIn \ ClientWsAnpr \轴客户\模块
当我尝试使用
启用模块垒垒退出时org.apache.axis2.AxisFault:无法参与模块:rampart
我的代码是
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);
有人能帮助我吗? 提前致谢 拉斐尔
答案 0 :(得分:0)
“repository”是文件系统中的一个目录,它有两个名为“services”和“modules”的子目录 例如
在我的cfg modulesPath中设置为&#34; C:/ JavaDev / wsDemograficiPlugIn / ClientWsAnpr / axis-client /&#34;