Integrating Lotus Notes applications with web services(Part 2)

Share

Once we received the information from the web services, the next step was to parse that stream in order to get the necessary data. I needed a quick and easy way of doing this. After a little search on the existing solutions, I have chosen to use Xstream library. It’s simple to work with and you don’t need extra mapping. You just create the Java classes, that will represent our xml file.

Every project has an id and a name, and a plan. An plan has also an id and a name, and a list of plans.

To use XStream, simply instantiate the XStream class with a standard JAXP DOM parser as the constructor’s parameter. In this case only xstream-[version].jar is required it the classpath. The no parameter constructor for the XStream class uses the XPP3 parser (XPP3 is a very fast XML pull-parser implementation). In this case you must include the xpp3-[version].jar as a dependency.

In the xml file the project’s id is an attribute. To work properly you need the useAttributeFor method. The addImplicitCollection method treats “Plan A” as it would be inside a plans tag. A link between the xml element and a Java class is made by the alias method.

If you want to use Xstream with Lotus Notes you will get an exception like this: “java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties”. The solution is to add an entry to Lotus Domino JVM’s java.policy file to allow XStream jar use reflection.
Adding this grant solves the issue:
permission java.lang.reflect.ReflectPermission “suppressAccessChecks”;

This example contains few of the Xstream’s capabilities. For further information see:

Xstream web site
XPP3 web site

Finally, there’s another very important peculiarity of what does Cialis that brings it so high above its alternatives. It is the only med that is available in two versions – one intended for use on as-needed basis and one intended for daily use. As you might know, Viagra and Levitra only come in the latter of these two forms and should be consumed shortly before expected sexual activity to ensure best effect. Daily Cialis, in its turn, contains low doses of Tadalafil, which allows to build its concentration up in your system gradually over time and maintain it on acceptable levels, which, consequently, makes it possible for you to enjoy sex at any moment without having to time it.

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close