English 中文(简体)
Axis2 Rampart的客户“安全名称空间无效”例外
原标题:Axis2 Rampart client "Security Namespace null" exception

这是我在努力消耗网络服务时看到的例外情况。

java.lang.RuntimeException: Undefined  Security policy namespace cannot be null.  resource property
at org.apache.rampart.RampartException.getMessage(RampartException.java:81)
at org.apache.rampart.RampartException.(RampartException.java:41)
at org.apache.rampart.RampartException.(RampartException.java:57)
at org.apache.rampart.RampartMessageData.setWSSecurityVersions(RampartMessageData.java:373)
at org.apache.rampart.RampartMessageData.(RampartMessageData.java:261)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at com.eloqua.secure.api.service.EloquaStub.retrieve(EloquaStub.java:2220)

这就是我如何参与。

ConfigurationContext serviceContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem("/usr/axis2-1.6.0/repository", "/usr/axis2-1.6.0/conf/axis2.xml");
EloquaStub serviceStub = new EloquaStub(serviceContext, "<Link to the WSDL>");


ServiceClient client = serviceStub._getServiceClient();
client.engageModule("rampart");
Options options = client.getOptions();              
options.setUserName("<USERNAME>");
options.setPassword("**<PASSWORD>**");

RetrieveResponse retrieveResp = serviceStub.retrieve(retrieveData); //this where I am trying to consume to webservice.

I verified the path to axis2.xml and the repository. The following have been installed.

rahas-1.6.0.mar
rampart-1.6.0.mar

守则可找到上述两个档案和其他模块。 这些许可是正确的。 我知道这一点,因为我看不到“FileNotFound”例外。

我在环境中建立了AXIS2-HOME道路。

www.un.org/Depts/DGACM/index_spanish.htm 我的问题如下:。

  • What does the exception message mean?
  • How to resolve this issue?
最佳回答

This error was because of classpath not being set correctly. I had two folders with similar axis jars. For some reason tomcat was in a weird state when this happen. I removed the the second folder from the classpath and it resolved itself.

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签