1

I'm trying to consume a Web Service from within my XPage. I already found Stephan Wissels blog entry Webservices in XPages - AXIS vs. CXF

It works fine, if in the java.policy file in the {domino}/jvm/lib/security directory the following lines are added

grant {
 permission java.lang.RuntimePermission "setContextClassLoader";
 permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};

My Problem is that my customer has some very strict admins. There is no way that they modify the java.policy file.

I searched a little and found that in 8.5.2 the org.apache.axis files has been moved to an OSGi bundle. My approach to get around the modification of the java.policy was to use this bundle. But if I try to access it, I always get an error: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org.apache.axis.client.Service

Trying to add the bundle to the plugin.xml didn't helped.

<plugin>
<requires>
    <import plugin="org.apache.axis"/>
    <!--AUTOGEN-START-BUILDER: Automatically generated by null. Do not modify.-->
    <import plugin="org.eclipse.ui"/>
    <import plugin="org.eclipse.core.runtime"/>
    <import optional="true" plugin="com.ibm.commons"/>
    <import optional="true" plugin="com.ibm.commons.xml"/>
    <import optional="true" plugin="com.ibm.commons.vfs"/>
    <import optional="true" plugin="com.ibm.jscript"/>
    <import optional="true" plugin="com.ibm.designer.runtime.directory"/>
    <import optional="true" plugin="com.ibm.designer.runtime"/>
    <import optional="true" plugin="com.ibm.xsp.core"/>
    <import optional="true" plugin="com.ibm.xsp.extsn"/>
    <import optional="true" plugin="com.ibm.xsp.designer"/>
    <import optional="true" plugin="com.ibm.xsp.domino"/>
    <import optional="true" plugin="com.ibm.notes.java.api"/>
    <import optional="true" plugin="com.ibm.xsp.rcp"/>
    <import optional="true" plugin="com.ibm.xsp.extlib"/>
    <!--AUTOGEN-END-BUILDER: End of automatically generated section-->
  </requires>
</plugin>

Any idea how to use the org.apache.axis file within a XPage?

4

2 回答 2

1

您是否尝试使用 CXF 而不是 Axis?如果其他任何事情都失败了……隐藏的一点 LotusScript 会走得更远。

或者,您可以将 Web 服务打包到插件中。它们以比 NSF 中的代码更好的权限运行。

于 2012-08-02T07:55:43.460 回答
0

也许您可以说服客户的管理员通过使用精确的授权您不会损害服务器的安全性。例如:

grant codeBase "xspnsf://server:0/somedb.nsf/script/-"{
   permission java.lang.RuntimePermission "setContextClassLoader";
   permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
}

我敢打赌,他们甚至不明白这两个指令的变化。

于 2012-08-02T12:23:44.567 回答