101 new features - XINS
Download
Report
Transcript 101 new features - XINS
XINS 1.5.0 features
101 new features of XINS 1.5.0.
This presentation has 102 pages
1
API version
●
●
2
Added the possibility to set a different
version for an API.
Just create a .version.properties in the
apis\<api name> directory.
API specific log system
●
●
●
3
Log system can be defined at the API
level allowing to have different log
systems for different APIs started in the
same Servlet container.
log4j.<api name>.rootLogger=...
If not found log4j.rootLogger used as
default.
logIgnorableException
●
Added convenient utility method to log
exceptions that should be ignored:
–
4
Utils.logIgnorableException(Throwable)
Supported methods
●
●
●
5
Calling conventions can define which
HTTP methods are supported.
String[] getSupportedMethods()
String[]
getSupportedMethods(HttpRequest)
XML Element to Object
●
Added utility method to fill an Object with
an XML Element.
–
●
6
Useful for filling Result objects with data
sections.
Object BeanUtils.xmlToObject(Element,
Object);
Object filler
●
●
7
Copy the value of an object to another
object.
–
Using the get and set method
–
Converting types whenever possible
–
Mapping of names possible
–
Useful for filling Request and Result objects
–
Useful with tools as String Framework or JPA
Object BeanUtils.populate(Object source,
Object destination)
Bug fixes
8
●
Many bug fixes (probably more than 101)
●
See changes file for more details
CallResultOutputter
●
New public class CallResultOutputter.
–
●
9
This class will ease the custom calling
convention to return a result similar to the
XINS standard calling convention
org.xins.server.CallResultOutputter
Calling Convention primer
●
●
10
New tutorial to help you create a custom
calling convention.
http://xins.sf.net/ccprimer.html
Links to API in categories
●
11
Generated category pages have a link to
the API in which it's defined.
Checked with updated tools
●
12
XINS 1.5.0 has been checked with the
updated versions of the following analysis
tools:
–
FindBugs 1.1.1
–
PMD 3.8
Checkstyle
●
Check the style your Java code.
–
●
13
Creates the checkstyle HTML report for the
implementation of the API.
xins checkstyle
Code coverage
●
Generates a unit test coverage report
–
●
14
uses Cobertura
xins coverage
Conditional redirection
●
●
15
In XINS FF, it's now possible to redirect
to another page based on an XPath
expression
<bootstrap-property
name="xinsff.redirect.LoginOkay[parameter[@name='session.use
rname']='superuser']">Admin</bootstrap-property>
<bootstrap-property
name="xinsff.redirect.LoginOkay">MainPage</bootstrapproperty>
Control command with XSLT
●
16
The command=Control returns HTML
–
Looks better than XML
–
Includes the links to manage the cache and
the links to the meta functions
CVS Change log
●
●
17
Generate the CVS report for the specified
API.
–
Report is in HTML
–
/!\ There seems to be a bug with all non-US
locales (in Ant)
xins cvschangelog
Date utility method
●
●
18
New utility method to convert a long to a
human-readable date.
String DateConverter.toDateString(long date)
Default attribute
●
Added possibility to set a default value
for a parameter or an attribute.
–
●
19
Only for optional parameters
<param name="inputInt" required="false" type="_int32"
default="33">
<description>An example of input for an integer with a default
value.</description>
</param>
Documentation page
●
Documentation is now on a separate
page
–
●
20
Sorted in categories
http://xins.sf.net/documentation.html
Easter egg
●
21
There is now an easter egg. It's very
easy to find it, all you need to do is …
Eclipse integration
●
●
22
Creation of an Eclipse project for an API
–
Much easier than doing it by hand
–
One project per API
xins eclipse
Element to session
●
23
Element objects which are stored in the
XINS FF (front-end framework) session
are returned in the data section.
Feature sheet
24
●
XINS features list on one page.
●
http://xins.sf.net/features.html
FindBugs
25
●
Analyse your API for bugs
●
xins findbugs
XINS FF in core
●
The xins front-end framework is part of
the xins core (in server.jar)
–
●
26
But still a custom calling convention
package org.xins.server.frontend
Full path for build dir
●
All generated files that refer to the build
directory, reference it using the full path.
–
27
Allows the execution of the script from other
directories
Function.getName()
●
28
getName() method of the Function object
is now public.
Public Request and Result
●
29
The generated Request and Result
objects are now public
–
Allows the use of them as a container object
–
Allows the use of them with utility methods
(like BeanUtils)
JMeter tests generation
●
●
30
XINS can generate JMeter tests based on
the examples provided in the function.
xins jmeter
Equals Requests
●
31
The Request object overrides the
hashCode() and equals() methods.
–
Two similar requests are now equal
–
Useful for result caching
Generic debug log
●
●
32
A new generic DEBUG log message has
been added to ease logging.
Log.log_1053(message);
Maven repository
●
XINS 1.5.0 will be submitted to the
Maven repository
–
●
33
Ease of use with the dependencies
<dependency>
<groupId>xins</groupId>
<artifactId>xins</artifactId>
<version>1.5.0</version>
</dependency>
HEAD handling
●
HTTP HEAD requests are handled
according to the HTTP specifications.
–
34
using the internal Servlet container
XSLT handling
●
●
35
reload.stylesheet has been added to
correct an XSLT processor error that
sometimes shows up.
Also a bug with the XSLT transformation
using the Ant version of Eclipse has been
identified. The action to fix this problem
has been documented in the user guide
and the FAQ.
Improved Servlet Container
●
36
Several improvements have been done in
the internal Servlet container:
–
Handles different HTTP Methods
–
Better handling of HTTP headers
–
Clean-up of the code
XML Element faster
●
Removed unneeded code in XML Element
object
–
37
5% improvement of the query on the
_GetStatistics function at ERROR log level.
Installation Guide
●
New installation guide
–
●
38
Shorter XINS primer
http://xins.sourceforge.net/install.html
Installation in pf\xins
●
39
Installation of XINS using the installer is
now in c:\Program Files\xins
–
Correct place
–
Avoid multiple directories
JDK 1.5 support
●
●
40
Use of generics if the code is compiled for
Java 1.5
List<Product> listProduct();
JDepend target
●
Generation of the dependency report for
your API
–
●
41
HTML report
xins jdepend
JMX support
●
42
Java Management Extension support
–
Usable with HP OpenView
–
statistics
–
properties
–
list of functions
–
versions
–
NoOp and ReloadProperties operations
Java coding convention
●
●
43
New document for coding convention
http://xins.sourceforge.net/XINS%20Jav
a%20Coding%20Conventions%20%20v1.0%20-%20July%202006.pdf
Lint4J target
44
●
Analyses your API for possible bugs
●
xins lint4j
Local call to API
●
●
45
Call an API using the XINS Client
Framework without using HTTP
–
Just a Java method call
–
Uses the internal servlet container
–
Faster, avoids network overhead
capis=service, file:////usr/MyApi.war,
2000
Maven target
●
Creates the Maven file to describe your
API.
–
●
xins maven
–
46
From the Maven file, a lot of different targets
can be called.
->pom.xml in the api directory.
Control command
●
47
More information is returned by the
Control command in the XINS FF.
Added more unit tests
●
48
More tests
–
New portal API in tests
–
HTTP compliance tests
–
Tests for new features
Sending files
●
Added MultipartCallingConvention to the
examples with the fileupload demo.
–
49
Directly send binaries over the network as
specified with HTTP
NetBeans integration
●
50
Improvements:
–
Copy project files for an existing API (added
also in 1.4.2)
–
Specdocs in context menu.
–
Better profiler detection.
Checked with Lint4J
●
51
XINS code has been analyzed with Lint4J
tools for possible bugs.
Removed NPE
●
A few exceptions were thrown when
creating a CAPI. This has been fixed.
–
52
Easier to debug
Release notes in HTML
●
53
The release notes file is available on the
web site in HTML form.
–
Issues found after the release can be added
–
Looks better
PMD target
●
●
54
New target to analyze the code of the
API.
xins pmd
Page number in ODT
●
The generated OpenDocument Format
has numbered pages.
–
55
Easy to read when printed
Param-combo in ODT
●
56
The generated OpenDocument Format
contains documentation of the paramcombos or attribute-combos defined in
the API.
Value dependency
●
Added the possibility to require a
parameter if another parameter has a
specific value.
–
57
There are also other combinations (See
example or user guide)
Rebranded
●
58
Changed copyright to Orange Nederland
Breedband BV. E-mails changed to
@orange-ft.com
Regeneration of ODT
●
59
The OpenDocument Format is
regenerated when a function or a type
changes.
xiff -> XINS FF
●
60
Renamed xiff to XINS FF for xins frontend framework.
Result caching
●
New article on how to do result caching
–
●
61
List advantages, drawbacks
http://xins.sf.net/resultcaching.html
JMeter run target
●
Added possibility to run JMeter to
measure the performance of your API
from xins
–
●
62
Default uses the location of the generated
JMeter tests
xins -Djmeter.home=... run-jmeter
Session properties
●
63
In the XINS FF, input parameters are set
in the session only when the method is
successful and the input fields are
specified as input parameters.
Shared types
●
64
Possibility to share types between APIs
–
Corporate types
–
Avoids errors
–
Reduces the number of files
HTTP 1.0 supported
●
The internal Servlet container also
supports HTTP 1.0
–
65
Used by WebMethods
OPTION * supported
●
66
The HTTP request “OPTIONS *” will
return the full list of supported methods
Tested by other teams
●
Cap Gemini using WebMethods
–
●
67
Used the WSDL/SOAP/opendoc targets
Axioss
Ant 1.7 Beta support
●
Tested with Ant 1.7 Beta
–
68
Found and fixed problem.
Java SE 6
●
Tested with Java SE 6 (rc-b90 – rc-b99).
–
69
No problems found
This presentation
●
70
1.5.0 features presentation
Tomcat for Eclipse
●
Tomcat files needed for Eclipse are
generated
–
71
No need to copy the WAR file manually after
every build
Updated examples
●
72
Added some of the new features to the
examples
Upgraded libraries
73
●
HTTPClient 3.0.1
●
Log4J 1.2.14
Upgraded docbook
●
74
Documentation generated with XSLT
docbook version 1.71.1
WSDL without input
●
75
WSDL file can be generated even if the
function doesn't have any input section.
Dir with spaces
●
76
XINS works when installed in a directory
with spaces in the name
Hex type
●
77
New type for binaries
–
_hex
–
<hex min=”...” max=”...” />
_list type
●
78
New _list type for a list of text items
_set type
●
79
New _set type for a set of text items
_userAgent session
●
80
It's possible to get the HTTP user agent
in XINS FF using the _userAgent session
property.
_inputs session property
●
81
The list of the input parameters sent to
the XINS FF is available in the _inputs
session property.
Compilation version
●
New build property “build.java.version”
to specify the Java version used at
runtime.
–
●
82
Default the same as the one used to compile
build.java.version=1.4
callxins task
●
New Ant task to call a xins API.
–
●
83
Returned values are stored in Ant properties
<callxins function=”SayHello”
apilocation=”http://localhost:8080/myapi/” prefix=”foo”>
<param name=”firstName”>Peter</param>
</callxins>
-> foo.message=”Hello Peter” where foo.message is a new Ant
property.
API information public
●
84
getBootstrapProperties() and
getFunctionList() public in API.java
build release improved
●
●
85
nodocs and nomanuals properties to skip
the generation of the documentation
-init-release used for release related
targets
Java2html target
●
●
86
Generates the HTML pages of the API
implementation source code.
xins java2html
Improved code coverage
●
87
Generated log files are no longer taken
into account in the code coverage of
XINS.
Request and Result as beans
●
The Request and Result object are
Serializable to better fit the Java beans
specification
–
88
Used for data binding
set method with object
●
89
a set method with object for primitive
types is also generated
–
Before: setApproved(boolean approved)
–
Now: setApproved(boolean approved) and
setApproved(Boolean approved)
Test with NetBeans
●
Test target for API is now compatible with
the NetBeans IDE.
–
90
Uses NetBeans UI for result
Front-end framework
documentation
●
●
91
New document explaining the XINS
Front-end Framework.
http://xins.sf.net/frontend/
XINS FF fixes
●
92
Fixed several possible problems in the
XINS FF:
–
Possible null pointer when no command
specified
–
Param-combo generated a HTTP 500 error
xins task
●
Call a xins target using the xins task
–
●
93
Generates build.xml if needed
<xins api=”myproject”
target=”specdocs” />
Tested with Web Logic
●
94
Tested with Web Logic and Java 1.3.
Detection of multiple input
●
95
The calling convention will detect if an
input parameter is passed more than
once in the request and return HTTP 400
Bad request in such case.
Logging in XINS FF
●
96
Logging in the XINS FF uses logdoc
HTTP correctness
●
97
Correct HTTP error code returned if the
HTTP method used for the request is
incorrect (like unknown HTTP method).
Updated online examples
●
98
Demos on the web site are using xins 1.5
New flash demo
●
Available on Google
–
99
Using NetBeans
Log.java in correct dir
●
The Log.java file is now generated in the
correct directory
–
100
Eclipse was showing warnings about it
Relative file for XSLT
●
101
Loading XSLT using the
XSLTCallingConvention can locate relative
XSLT files.
XINS FF tested in real
application
●
102
XINS FF has been used for the migration
of an application containing about 20
pages
–
Help to detect bugs in the framework
–
Help to detect improvement areas in the
framework
–
Help in testing the framework