202 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
a small list for the environment
Tue, Dec 5th 2017 33
Making your Domino environment work for you
Mon, Dec 4th 2017 35
Getting data from an HTTPS site in backend using XPages
Wed, Oct 11th 2017 6
java.io.File doesn’t work as expected in Domino FP7 and newer versions
Tue, Sep 26th 2017 8
Verse 1.0.2 with Live text and send extensions
Mon, Sep 4th 2017 5
Why you should install Verse on premise NOW!!
Tue, May 9th 2017 6
Why companies should train the employees in IT-Security today
Sat, Feb 11th 2017 7
Top 10
Making your Domino environment work for you
Mon, Dec 4th 2017 35
a small list for the environment
Tue, Dec 5th 2017 33
Setting up a sFTP server to be used with an existing Domino SSL certificate
Mon, Dec 8th 2014 15
HTTP Server is waiting for threads to finish: the wait is over
Wed, May 14th 2014 12
IBM Connect and what I would like to be announced
Mon, Nov 30th 2015 12
IBM Domino to be or not to be
Mon, Aug 29th 2016 12
iNotes, IBM Traveler, IBM Verse, Win 10 Mail
Tue, Jan 5th 2016 11
Xpage – Exception Notes error: You are not authorized to perform that operation
Thu, May 12th 2016 11
Adding OpenNTF extensions the simple way into your IBM Notes client
Sun, Jun 5th 2016 11
Calling web services from XPages the missing part
Tue, Mar 4th 2014 10


Calling web services from XPages the missing part
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
Fredrik Norling    

I had an XPage project where I needed to call some web services to get some information and after reading on different blogs my hopes of getting this to work was almost null. But sometimes knowing your history helps and I remembered how I started to create subforms using dxl for several years ago and that almost everything is stored with in the design note.

So I started to think, does the built in web service consumer create the code inside the design element and yes it did. Great!

Check out my Notes in 9 video here

or continue to read the post

Is there any common things between between this and XPages, Yes. Java! But there is a problem they work in different jvm:s. But when I looked closer to a web services consumer with generated java code, there where 3 jar files attached to the design note. One with the source, one with the precompiled java code and one with the configuration settings.

Let’s export the java code and try, but there isn’t any way to export it. So I created a Lotusscript agent that will export the consumer code, it can be found at xsnippet.openntf.org or here

Import that code into an agent and place the agent inside your database with the created java web service consumer. Run the agent, enter a valid path for the export.

There is only one thing that you need to check when the consumer is created. The consumer java code must be in a package, if not the XPage code will not work or at least I haven’t found a way.

Now Import the two jar files created, in the XPage jar section, or if you are using 8.5.x add the jar files using the package explorer.

Next step: Create a java file that will use the web service code.

And call the code from the XPage.

No modifying java.policy, No special java command line things the only thing is that you must be able to create the java web service consumer and some web services doesn’t work but that I can live with.

This is of course nothing supported by IBM but I will try to convince IBM to build in the export/import action so my agent is unnecessary.

The sample database can be found here



---------------------
http://www.xpagedeveloper.com/2014/calling-web-services-from-xpages
Mar 04, 2014
11 hits



Recent Blog Posts
33
a small list for the environment
Tue, Dec 5th 2017 8:45a   Fredrik Norling
Domino 2025 Jam is coming up tomorrow in Sweden and I will attend and see how this event will affect the future of the IBM Domino environment. I’ve created a list of things that I think would be good to have for the future. So here is the list in no specific order for now I will probably come back and update this post more. Support for Cloud based Connections in onpremise Verse Addon Store for Verse More Actions based handling of emails that needs Actions Save searches in Verse as as dyna
35
Making your Domino environment work for you
Mon, Dec 4th 2017 1:59p   Fredrik Norling
If you haven’t started using Rest api calls with your Domino environment, it’s time now. This will help you extennd and connect your domino environment to external services or connect external services to your Domino environment. There is several ways to expose Rest api from the server Domino Data Services SmartNSF on OpenNTF XPage with Json output Domino View displayed as json Lotusscript or Java agent Here is some ideas what you could do Sending / getting data from ERP system Re
6
Getting data from an HTTPS site in backend using XPages
Wed, Oct 11th 2017 7:56a   Fredrik Norling
If you want to connect to an SSL protected site and get information it could be an webpage or a webservice if you are using xpages and the certifier isn’t already in Domino you need to import the certificates. Open up the Domino Name and adress book navigate to Security -> Certificates When you are in this view the action menu will have a new option Select these and import each of the certificates that you have. When they are imported you need to create a Cross certificate. Go in to ea
8
java.io.File doesn’t work as expected in Domino FP7 and newer versions
Tue, Sep 26th 2017 6:54p   Fredrik Norling
I found this error in a java agent first. If you detach a file from a Notes document using Domino Classes and try to get a handle on the file using java.io.File the file isn’t found until you do a new call against the server. I don’t know if this has to do with the change of Java version server side or not but the same code works in FP6. Code Example Body.extractFile(strFileName); File objInFile = new File(strFileName); if(objInFile.exists()){ But if you go and use java.io.File
5
Verse 1.0.2 with Live text and send extensions
Mon, Sep 4th 2017 2:18p   Fredrik Norling
Yes you heard right, onpremise Verse gets extensionpoints that gives you the possibility to find text and populate this. And also gives you the possibility to do intercept the user before a email is sent. This is great for compliance reasons. There is more good stuff in there but this is really exciting a developer end point in to web email.
6
Why you should install Verse on premise NOW!!
Tue, May 9th 2017 10:30a   Fredrik Norling
If you are using Domino and mail on premise you should install Verse now. My list on why you should Modern fast interface for your users Supersmart filtering of emails Filter by folder, time and even containing attachments, Group emails by thread. Last two added with Verse 1.01 Need Action and wait for functions for better email workflows Offline emails Installing Verse is a simple operation, make sure that your server has the right Domino and FP version installed. Also add the 2 new views
7
Why companies should train the employees in IT-Security today
Sat, Feb 11th 2017 9:28a   Fredrik Norling
Demands what and what not the employees do on their computers becomes more and more important. Some examples, a person comes in to the reception desk with a presentation with coffee stains on it. Asks to get a new copy, please it’s on my USB drive. And the hacker is in your network! If this was after the 25:th of may 2018 your company could get fines because the employee didn’t get enough training. This is only one example, what about passwords do they use the same password to your i
6
Bluemix the extension your need to expand your universe
Mon, Jan 9th 2017 1:52p   Fredrik Norling
We have everything on our own servers you might say and have no use for IBM Bluemix Cloud services you might say. Well, I think you are wrong, Bluemix will help you expand the reach of your applications beyond borders that you might have today. Lets say you have an internal audit application and you want some external users to answer on some audits. Bluemix will help you here without opening up or adding a new server Perhaps you want to get some users in another part of the world to get web acc




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition