1 xins 1.5.0 features 101 new features of xins 1.5.0. this presentation has 102 pages

102
1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

Upload: earl-barber

Post on 14-Dec-2015

222 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

1

XINS 1.5.0 features

101 new features of XINS 1.5.0.

This presentation has 102 pages

Page 2: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

2

API version

● Added the possibility to set a different version for an API.

● Just create a .version.properties in the apis\<api name> directory.

Page 3: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

3

API specific log system

● 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.

Page 4: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

4

logIgnorableException

● Added convenient utility method to log exceptions that should be ignored:– Utils.logIgnorableException(Throwable)

Page 5: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

5

Supported methods

● Calling conventions can define which HTTP methods are supported.

● String[] getSupportedMethods()● String[]

getSupportedMethods(HttpRequest)

Page 6: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

6

XML Element to Object

● Added utility method to fill an Object with an XML Element.– Useful for filling Result objects with data

sections.

● Object BeanUtils.xmlToObject(Element, Object);

Page 7: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

7

Object filler

● 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)

Page 8: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

8

Bug fixes

● Many bug fixes (probably more than 101)● See changes file for more details

Page 9: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

9

CallResultOutputter

● New public class CallResultOutputter. – This class will ease the custom calling

convention to return a result similar to the XINS standard calling convention

● org.xins.server.CallResultOutputter

Page 10: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

10

Calling Convention primer

● New tutorial to help you create a custom calling convention.

● http://xins.sf.net/ccprimer.html

Page 11: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

11

Links to API in categories

● Generated category pages have a link to the API in which it's defined.

Page 12: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

12

Checked with updated tools

● XINS 1.5.0 has been checked with the updated versions of the following analysis tools:– FindBugs 1.1.1– PMD 3.8

Page 13: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

13

Checkstyle

● Check the style your Java code.– Creates the checkstyle HTML report for the

implementation of the API.

● xins checkstyle

Page 14: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

14

Code coverage

● Generates a unit test coverage report– uses Cobertura

● xins coverage

Page 15: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

15

Conditional redirection

● 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.username']='superuser']">Admin</bootstrap-property><bootstrap-property name="xinsff.redirect.LoginOkay">MainPage</bootstrap-property>

Page 16: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

16

Control command with XSLT

● The command=Control returns HTML– Looks better than XML– Includes the links to manage the cache and

the links to the meta functions

Page 17: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

17

CVS Change log

● 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

Page 18: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

18

Date utility method

● New utility method to convert a long to a human-readable date.

● String DateConverter.toDateString(long date)

Page 19: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

19

Default attribute

● Added possibility to set a default value for a parameter or an attribute.– 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>

Page 20: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

20

Documentation page

● Documentation is now on a separate page– Sorted in categories

● http://xins.sf.net/documentation.html

Page 21: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

21

Easter egg

● There is now an easter egg. It's very easy to find it, all you need to do is …

Page 22: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

22

Eclipse integration

● Creation of an Eclipse project for an API– Much easier than doing it by hand– One project per API

● xins eclipse

Page 23: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

23

Element to session

● Element objects which are stored in the XINS FF (front-end framework) session are returned in the data section.

Page 24: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

24

Feature sheet

● XINS features list on one page.

● http://xins.sf.net/features.html

Page 25: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

25

FindBugs

● Analyse your API for bugs

● xins findbugs

Page 26: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

26

XINS FF in core

● The xins front-end framework is part of the xins core (in server.jar)– But still a custom calling convention

● package org.xins.server.frontend

Page 27: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

27

Full path for build dir

● All generated files that refer to the build directory, reference it using the full path.– Allows the execution of the script from other

directories

Page 28: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

28

Function.getName()

● getName() method of the Function object is now public.

Page 29: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

29

Public Request and Result

● 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)

Page 30: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

30

JMeter tests generation

● XINS can generate JMeter tests based on the examples provided in the function.

● xins jmeter

Page 31: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

31

Equals Requests

● The Request object overrides the hashCode() and equals() methods.– Two similar requests are now equal– Useful for result caching

Page 32: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

32

Generic debug log

● A new generic DEBUG log message has been added to ease logging.

● Log.log_1053(message);

Page 33: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

33

Maven repository

● XINS 1.5.0 will be submitted to the Maven repository– Ease of use with the dependencies

● <dependency> <groupId>xins</groupId> <artifactId>xins</artifactId> <version>1.5.0</version></dependency>

Page 34: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

34

HEAD handling

● HTTP HEAD requests are handled according to the HTTP specifications.– using the internal Servlet container

Page 35: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

35

XSLT handling

● 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.

Page 36: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

36

Improved Servlet Container

● Several improvements have been done in the internal Servlet container:– Handles different HTTP Methods– Better handling of HTTP headers– Clean-up of the code

Page 37: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

37

XML Element faster

● Removed unneeded code in XML Element object– 5% improvement of the query on the

_GetStatistics function at ERROR log level.

Page 38: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

38

Installation Guide

● New installation guide– Shorter XINS primer

● http://xins.sourceforge.net/install.html

Page 39: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

39

Installation in pf\xins

● Installation of XINS using the installer is now in c:\Program Files\xins– Correct place– Avoid multiple directories

Page 40: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

40

JDK 1.5 support

● Use of generics if the code is compiled for Java 1.5

● List<Product> listProduct();

Page 41: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

41

JDepend target

● Generation of the dependency report for your API– HTML report

● xins jdepend

Page 42: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

42

JMX support

● Java Management Extension support– Usable with HP OpenView– statistics– properties– list of functions– versions– NoOp and ReloadProperties operations

Page 43: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

43

Java coding convention

● New document for coding convention

● http://xins.sourceforge.net/XINS%20Java%20Coding%20Conventions%20-%20v1.0%20-%20July%202006.pdf

Page 44: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

44

Lint4J target

● Analyses your API for possible bugs

● xins lint4j

Page 45: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

45

Local call to API

● 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

Page 46: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

46

Maven target

● Creates the Maven file to describe your API.– From the Maven file, a lot of different targets

can be called.

● xins maven– ->pom.xml in the api directory.

Page 47: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

47

Control command

● More information is returned by the Control command in the XINS FF.

Page 48: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

48

Added more unit tests

● More tests– New portal API in tests– HTTP compliance tests– Tests for new features

Page 49: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

49

Sending files

● Added MultipartCallingConvention to the examples with the fileupload demo.– Directly send binaries over the network as

specified with HTTP

Page 50: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

50

NetBeans integration

● Improvements:– Copy project files for an existing API (added

also in 1.4.2)– Specdocs in context menu.– Better profiler detection.

Page 51: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

51

Checked with Lint4J

● XINS code has been analyzed with Lint4J tools for possible bugs.

Page 52: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

52

Removed NPE

● A few exceptions were thrown when creating a CAPI. This has been fixed.– Easier to debug

Page 53: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

53

Release notes in HTML

● The release notes file is available on the web site in HTML form.– Issues found after the release can be added– Looks better

Page 54: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

54

PMD target

● New target to analyze the code of the API.

● xins pmd

Page 55: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

55

Page number in ODT

● The generated OpenDocument Format has numbered pages.– Easy to read when printed

Page 56: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

56

Param-combo in ODT

● The generated OpenDocument Format contains documentation of the param-combos or attribute-combos defined in the API.

Page 57: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

57

Value dependency

● Added the possibility to require a parameter if another parameter has a specific value.– There are also other combinations (See

example or user guide)

Page 58: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

58

Rebranded

● Changed copyright to Orange Nederland Breedband BV. E-mails changed to @orange-ft.com

Page 59: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

59

Regeneration of ODT

● The OpenDocument Format is regenerated when a function or a type changes.

Page 60: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

60

xiff -> XINS FF

● Renamed xiff to XINS FF for xins front-end framework.

Page 61: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

61

Result caching

● New article on how to do result caching

– List advantages, drawbacks

● http://xins.sf.net/resultcaching.html

Page 62: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

62

JMeter run target

● Added possibility to run JMeter to measure the performance of your API from xins– Default uses the location of the generated

JMeter tests

● xins -Djmeter.home=... run-jmeter

Page 63: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

63

Session properties

● 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.

Page 64: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

64

Shared types

● Possibility to share types between APIs– Corporate types– Avoids errors– Reduces the number of files

Page 65: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

65

HTTP 1.0 supported

● The internal Servlet container also supports HTTP 1.0– Used by WebMethods

Page 66: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

66

OPTION * supported

● The HTTP request “OPTIONS *” will return the full list of supported methods

Page 67: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

67

Tested by other teams

● Cap Gemini using WebMethods– Used the WSDL/SOAP/opendoc targets

● Axioss

Page 68: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

68

Ant 1.7 Beta support

● Tested with Ant 1.7 Beta– Found and fixed problem.

Page 69: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

69

Java SE 6

● Tested with Java SE 6 (rc-b90 – rc-b99).– No problems found

Page 70: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

70

This presentation

● 1.5.0 features presentation

Page 71: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

71

Tomcat for Eclipse

● Tomcat files needed for Eclipse are generated– No need to copy the WAR file manually after

every build

Page 72: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

72

Updated examples

● Added some of the new features to the examples

Page 73: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

73

Upgraded libraries

● HTTPClient 3.0.1● Log4J 1.2.14

Page 74: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

74

Upgraded docbook

● Documentation generated with XSLT docbook version 1.71.1

Page 75: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

75

WSDL without input

● WSDL file can be generated even if the function doesn't have any input section.

Page 76: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

76

Dir with spaces

● XINS works when installed in a directory with spaces in the name

Page 77: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

77

Hex type

● New type for binaries– _hex– <hex min=”...” max=”...” />

Page 78: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

78

_list type

● New _list type for a list of text items

Page 79: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

79

_set type

● New _set type for a set of text items

Page 80: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

80

_userAgent session

● It's possible to get the HTTP user agent in XINS FF using the _userAgent session property.

Page 81: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

81

_inputs session property

● The list of the input parameters sent to the XINS FF is available in the _inputs session property.

Page 82: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

82

Compilation version

● New build property “build.java.version” to specify the Java version used at runtime.– Default the same as the one used to compile

● build.java.version=1.4

Page 83: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

83

callxins task

● New Ant task to call a xins API.– 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.

Page 84: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

84

API information public

● getBootstrapProperties() and getFunctionList() public in API.java

Page 85: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

85

build release improved

● nodocs and nomanuals properties to skip the generation of the documentation

● -init-release used for release related targets

Page 86: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

86

Java2html target

● Generates the HTML pages of the API implementation source code.

● xins java2html

Page 87: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

87

Improved code coverage

● Generated log files are no longer taken into account in the code coverage of XINS.

Page 88: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

88

Request and Result as beans

● The Request and Result object are Serializable to better fit the Java beans specification– Used for data binding

Page 89: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

89

set method with object

● a set method with object for primitive types is also generated– Before: setApproved(boolean approved)– Now: setApproved(boolean approved) and

setApproved(Boolean approved)

Page 90: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

90

Test with NetBeans

● Test target for API is now compatible with the NetBeans IDE.– Uses NetBeans UI for result

Page 91: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

91

Front-end framework documentation

● New document explaining the XINS Front-end Framework.

● http://xins.sf.net/frontend/

Page 92: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

92

XINS FF fixes

● Fixed several possible problems in the XINS FF:– Possible null pointer when no command

specified– Param-combo generated a HTTP 500 error

Page 93: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

93

xins task

● Call a xins target using the xins task– Generates build.xml if needed

● <xins api=”myproject” target=”specdocs” />

Page 94: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

94

Tested with Web Logic

● Tested with Web Logic and Java 1.3.

Page 95: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

95

Detection of multiple input

● 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.

Page 96: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

96

Logging in XINS FF

● Logging in the XINS FF uses logdoc

Page 97: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

97

HTTP correctness

● Correct HTTP error code returned if the HTTP method used for the request is incorrect (like unknown HTTP method).

Page 98: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

98

Updated online examples

● Demos on the web site are using xins 1.5

Page 99: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

99

New flash demo

● Available on Google– Using NetBeans

Page 100: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

100

Log.java in correct dir

● The Log.java file is now generated in the correct directory– Eclipse was showing warnings about it

Page 101: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

101

Relative file for XSLT

● Loading XSLT using the XSLTCallingConvention can locate relative XSLT files.

Page 102: 1 XINS 1.5.0 features 101 new features of XINS 1.5.0. This presentation has 102 pages

102

XINS FF tested in real application

● 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