4

How to access org.apache.axis from the OSGI package in an XPage to consume a web...

 3 years ago
source link: https://www.codesd.com/item/how-to-access-org-apache-axis-from-the-osgi-package-in-an-xpage-to-consume-a-web-service.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to access org.apache.axis from the OSGI package in an XPage to consume a web service?

advertisements

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?


Did you try to use CXF instead of Axis? And if anything else fails... a little hidden LotusScript goes a looooong way.

Alternatively you could pack your web service into a plug-in. They run with better rights than code in NSFs.

Tags xpages

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK