Personal tools
Integration between Webservices and XPages: a true story!

Xpages & Webservices

Dec 04, 2013

Integration between Webservices and XPages: a true story!

In this article I'm going to tell you about an experience I had having to make a webservice consumer based on SOAP 1.2, and some issues (still unresolved) I encountered

The goal

I have to create a webservice consumer in Lotus Domino using the WSDL provided.

What's the problem? I can use the native wizard provided by Lotus.

First problem

It looks like my WSDL is SOAP1.2. Domino is SOAP1.1. (aaarrrrggggghhhhh)

error

First solution

I could generate the classes for example in Eclipse and embed in Notes. Then I could call it using an agent. Ok, let's try it!

Second problem

It sounds good, everything seems to work fine but... out of memory error... when I stress the agent.

Maybe an agent isn't a good choice...

Second solution

Let's try to embed generated classes inside WEBContent/WEB-INF/src, deploy all jars needed in jvm/lib/ext on server and call classes through an Xpages:

Goal achieved!!!!!!!!!!!!!!!!!!?

This time seems to be the right solution, "out of memory" is avoided.

It's also very fast.. I can deploy on production!

Are you sure??

Yes, I am! And I'm very happy too!

I only need to make a little change in java class under WebContent (hide a debug line left there), directly on production server. Done!

Save it, rebuild project and... BOOOOOOOM!

java.lang.NullPointerException
at com.ibm.domino.xsp.module.nsf.ModuleClassLoader.getResource(ModuleClassLoader.java:168)
at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:149)
at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
at org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
at org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.(Service.java:113)

WTF!!!

Solution found?

Not yet, unfortunately! :-(

I've tried a lot of solutions suggested over the web, without success.

The only workaround is that, every time I make a change on these class, I need to restart HTTP Task.

It seems to be a problem related to Lotus Domino Version.

In fact, on my staging server this problem doesn't exists (Release 8.5.1FP5 on Linux distribution), but exists under 8.5.3 on Windows, and also on Linux for 8.5.3FP1.

I've post this problem in several places:

At the end...

Feel free to tell me what you think about it!

Please, let me know if someone have experienced the same problem, or if there is another solution to cover this scenario.

Stay tuned!

comments powered by Disqus