329 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Enterprise 2.0 and weight loss - siblings separated at birth?
Tue, May 14th 2013 94
Modernizing Notes applications - lessons from the trenches
Thu, May 9th 2013 370
CRM > Sales Tracking
Sun, May 5th 2013 188
Dear SingTel, please fix your routing performance!
Wed, Apr 24th 2013 122
I want one
Tue, Apr 23rd 2013 212
MAMIL*
Sun, Apr 21st 2013 184
A more actionable Connections UI
Fri, Apr 19th 2013 179
Top 10
What to do with Save & Replication conflicts
Wed, Jan 2nd 2013 649
Connect 2013 in one picture
Thu, Jan 31st 2013 636
Avoiding login prompts in mobile approvals
Mon, Dec 31st 2012 600
Now that you can have embedded experiences in Notes, you need to send them
Thu, Dec 13th 2012 595
How we successfully killed eMail (almost)
Wed, Jan 9th 2013 585
Fun with TCPMon and Lotus Traveler
Sun, May 13th 2012 529
Inbox vs. Stream interaction pattern
Thu, Dec 13th 2012 497
Managing @Today in view selection formulas
Fri, Nov 30th 2012 494
Graceful degradation
Wed, Dec 5th 2012 492
It ain't pretty, but this is what we do!
Thu, Feb 28th 2013 478


Webservices in XPages - AXIS vs. CXF
Stephan H Wissel    

I wrote about using Apache AXIS to connect to a web service before. It worked like a charm when you import the AXIS library into the NSF. In the past few days I tried to move this code into an extension library and I had initially very little success. Here is what I tried and what finally worked:
  1. The AXIS libraries are provided as a plug-in in the Domino server, so my first take was to declare a dependency in my plug-in to that plug-in. To successfully create a Extension Library I had to declare dependencies to com.ibm.commons and com.ibm.xsp.core to be able to extend com.ibm.commons.Extension. Unfortunately the plug-ins expose Java commons logging, so the classloader complaint and didn't load the AXIS classes
  2. Second attempt was to split the code into two plug-ins: one that depended on the AXIS plug-in and another one that depended on the former and com.ibm.commons and com.ibm.xsp.core. This didn't yield any better result
  3. 3rd test was to import the AXIS jars into a plug-in and only depend on com.ibm.commons and com.ibm.xsp.core but not the AXIS plug-in. Didn't work either
  4. Finally I tried to switch from AXIS to the newer and more flexible Apache CXF. CXF is able to provide transport over many protocols, not only SOAP and REST but JMS and others too. Initially I felt it was too complex for my little requirement, especially since the list of jar dependencies is quite long.
    Turns out CXF is the optimal solution. I used CXF 2.5.2 and the provided wsdl2java utility. The command line I used is [path-to-cxf-install]/bin/wsdl2java -frontend jaxws21 -client your.wsdl. The -client parameter is optional, but generates a nice sample client that shows the call parameters for all web service methods.
    I found I either need to include the WSDL file in the jar or point to the URL where the WSDL file is available online to get CXF to run. Now for the best part: All dependencies including CXF are available in Domino (I tested on 8.5.3), so other than the Java code generated I didn't had to import, depend etc. on anything (it actually might work even in a Java agent). So CXF is the way to go.
For testing I used a dictionary service that returns the definitions found for a given word. My class (the part I had to write myself) is rather short:
package demo;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.util.List;
import javax.xml.namespace.QName;
import com.aonaware.services.webservices.Definition;
import com.aonaware.services.webservices.DictService;
import com.aonaware.services.webservices.DictServiceSoap;
import com.aonaware.services.webservices.WordDefinition;

public class Dict2Test {
    public final static String WORD_TO_LOOK_FOR = "Trust";
    public final static String WSDL_URL = "http://services.aonaware.com/DictService/DictService.asmx?WSDL";
    public static final QName SERVICE_NAME = new QName("http://services.aonaware.com/webservices/", "DictService");

    public static void main(String[] args) throws IOException {
        Dict2Test dt = new Dict2Test();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        dt.getWordInfo(out, WORD_TO_LOOK_FOR);
        System.out.println(out.toString());
    }

    public void getWordInfo(OutputStream out, String theWord) {
        OutputStreamWriter w;
        DictService ds;
        DictServiceSoap dss;
        w = new OutputStreamWriter(out);
        try {
            ds = new DictService(new URL(WSDL_URL),SERVICE_NAME);
            dss = ds.getDictServiceSoap();
            WordDefinition wd = dss.define(theWord);
            List<Definition> allDef = wd.getDefinitions().getDefinition();
            if (allDef.isEmpty()) {
                w.append("<h1>No definition found for ");
                w.append(theWord);
                w.append("</h1>n");
            } else {
                w.append("<h1>You were looking for: ");
                w.append(theWord);
                w.append("</h1>n<ul>");
                for (Definition oneD : allDef) {
                    w.append("n<li>");
                    w.append(oneD.getWordDefinition());
                    w.append("</li>");
                }
                w.append("n</ul>");
            }
        } catch (Exception e) {
            try {
                w.append("<h1>" + e.getMessage() + "</h1>");
            } catch (IOException e1) {
                e1.printStackTrace();
            } finally {
                try {
                    w.close();
                } catch (IOException ex) {
                    ex.printStackTrace();
                }
            }
        }
    }
}
To test the class I defined it as a managed bean in faces-config.xml:
<managed-bean>
    <managed-bean-name>dictionary</managed-bean-name>
    <managed-bean-class>demo.Dict2Test</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
and created an XAgent with the following code

---------------------
http://feedproxy.google.com/~r/Wisselnet/~3/Ww5KOPRZ6AM/SHWL-8SUKV5
Mar 29, 2012
255 hits



Recent Blog Posts
94


Enterprise 2.0 and weight loss - siblings separated at birth?
Tue, May 14th 2013 12:18p   Stephan H Wissel
This blog entry is inspired and largely translated from this German article authored by enterprise consultant Andreas Schulze-Kopp. Having gone through some personal transformation (final results in November) myself I found Andreas' comparison of Enterprise 2.0 initiatives and weight loss programs intriguing. The tasks are comparable: alter habits, break through the mould of old behavioural pattern (a.k.a processes in business lingo) show enough determination and will power to see it through. [read] Keywords: connections ibm development enterprise linux profile wiki
370


Modernizing Notes applications - lessons from the trenches
Thu, May 9th 2013 6:18a   Stephan H Wissel
Not only since mobile first became fashionable corporations are trying to ditch the Lotus IBM Notes client - for various reasons. These efforts were branded "modernization", "web enablement", "mobile enablement" or if a competitor had a word "migration". Initially there was hope that this would be a short, painless and automated process (the upgrades, not the migrations that is). But reality taught a few facts that you need to consider: A Rich Client is based on RichText, a browser cli [read] Keywords: domino ibm lotus lotusscript notes notes client richtext xpages application applications bleedyellow bleedyellow.com css enterprise google mobile server twitter wiki
188


CRM > Sales Tracking
Sun, May 5th 2013 9:20a   Stephan H Wissel
IBM is ditching Siebel CRM in favour of SugarCRM. Cloud based CRM was made popular by SalesForce while Zoho wants a share of the pie too. All to often CRM offers or is used as sales force automation tool, which it is not (only). But what makes a good CRM? It needs to provide access to anything that relates to a customer. Doh - that's what the name claims. In larger organisations CRM typically is understood very narrowly as sales tracking tool, the broader definition as outlined above gets c [read] Keywords: ibm lotus notes applications wiki
122


Dear SingTel, please fix your routing performance!
Wed, Apr 24th 2013 9:18p   Stephan H Wissel
Slashdot asked for the latency to their site, so I ran a few tests with pretty consistent results in the 250ms range. Slashdot labels that as "still stuck on dialup or in space". Their expectations for overseas users was 80 to 150ms. Puzzled by the result (local websites typically respond in the sub 2ms range), I used traceroute to get to the bottom of this. Here are the results: td.Default {border-right : 1px dotted #CCCCCC; border-bottom : 1px dotted #EEEEEE; padding : 1px} Hop IP DNS [read] Keywords: admin css
212


I want one
Tue, Apr 23rd 2013 6:18a   Stephan H Wissel
[read] Keywords:
184


MAMIL*
Sun, Apr 21st 2013 6:17a   Stephan H Wissel
Cycling in Singapore can be fun once you: Find the right group Do it at night Are not afraid to cycle along an unlit Cemetery or ghosts * Middle Aged Man In Lycra [read] Keywords: wiki




179


A more actionable Connections UI
Fri, Apr 19th 2013 6:18a   Stephan H Wissel
IBM Connections is a two headed beast: on one hand it is a set of rich APIs offering different services (Status, Blogs, Wiki, Text, Activities etc) on the other it provides a set of UIs on top of this APIs. Yes, not one, but a set: Browser, Android, iShiny™ and IBM Notes. I'm a big fan of the APIs. After all they stand for IBM's commitment to open standards and are build with XML, REST, ATOM and ActivityStreams compliant to the OpenSocial specifications. I'm not so sure about the UIs, [read] Keywords: connections ibm notes application wiki xml
244


Planning applications (XPages MindMap)
Thu, Apr 18th 2013 8:18a   Stephan H Wissel
In a recent XPages workshop in Kuala Lumpur, the class brainstormed on the planning process for an XPages application. This is what we came up with. For every item on the list one could elaborate quite a bit, but putting that on the map would make it rather messy. Enjoy [read] Keywords: xpages application applications
313


Is SharePoint a Failed Vision for Collaboration?
Sun, Apr 14th 2013 6:16a   Stephan H Wissel
Rich Blank (of Jive software) makes a case on CMSWire to consider SharePoint a failure for collaboration. Looking closely it isn't SharePoint to fault. SharePoint with its place concept and flat views is a 1:1 conceptual copy of Lotus Notes implemented with a (then) current Microsoft technology stack. Thus it does have the potential for successful collaboration, as the (then) success of Lotus Notes clearly showed. With the right effort of adoption any collaborative technology can be successfu [read] Keywords: collaboration connections ibm lotus notes email linkedin microsoft sharepoint skype wiki
286


Round-Trip editing experience in web browsers
Wed, Mar 27th 2013 10:18p   Stephan H Wissel
Our applications are increasingly moving to http(s) based interfaces, that is HTML(5) or apps. Besides the irony, that we abandon client applications on desktops to reintroduce them on mobile devices (is ObjectiveC the VB of the 21st century?), that's a good thing™ However from time to time, unless you live in the cloud, we need to integrate into extisting standing desktop applications, mostly but not limited to Office applications. The emerging standard for this is clearly CMIS. Most of [read] Keywords: ibm notes application applications desktop google linux microsoft mobile networking office openntf sap security server sharepoint wiki ubuntu




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition