GithubHelp home page GithubHelp logo

znerd / xins Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 19.32 MB

XML Interface for Network Services

Home Page: http://xins.sourceforge.net/

License: BSD 3-Clause "New" or "Revised" License

Java 99.70% Shell 0.13% JavaScript 0.17%

xins's People

Contributors

znerd avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xins's Issues

Type definitions not backwards-compatible

In XINS 2.x, pattern types implicitly apply to a whole line, without ^ or $ BOL/EOL characters. This changed in XINS 3. This should probably be rolled back as it seriously breaks compatibility.

Still, ^ and $ could be allowed in pattern types, optionally, without affecting the result.

'xins clean' creates build/ directory

Steps to reproduce:

  1. Go to a XINS project directory
  2. Execute: rm -rf build
  3. Execute: xins clean

Expected result:

  • No build directory

Actual result:

  • The directory build is created

Allow disabling of NDC generation

It should be possible to disable the setting of NDCs (in Log4J terminology) or context IDs (in XINS terminology). System, bootstrap and runtime properties should be supported. The name of the property should be "org.xins.server.contextID.push". Supported values should be "true" (the default) and "false".

Example use cases:

  1. No properties set, system nor bootstrap nor runtime
    • context IDs should be generated as in XINS 2.2
    • existing context IDs (set by the servlet container, for example) should be overwritten
  2. Bootstrap property is set to "false"
    • context IDs should not be generated
    • existing context IDs (set by the servlet container, for example) should remain in place
  3. Bootstrap property is set to "false" and runtime property is set to "true"
    • see use case 1
  4. Bootstrap property is set to "true" and runtime property is set to "false"
    • see use case 2
  5. Bootstrap property is set to "false" and runtime property is set to "false"
    • see use case 2
  6. Bootstrap property is set to "true" and runtime property is set to "true"
    • see use case 1

IPv6 not supported

XINS does not support IPv6.

Example of error while calling XINS 3.0-beta1 via an IPv6 stack:

Unable to process HTTP GET request from 0:0:0:0:0:0:0:1%0, path is "/", query string is "". Returning HTTP status code 500. Reason: "Internal error while processing function call.".
[exec] org.xins.common.text.ParseException: The string "0:0:0:0:0:0:0:1%0" is not a valid IP address.
[exec] at org.xins.common.net.IPAddressUtils.newParseException(IPAddressUtils.java:319)
[exec] at org.xins.common.net.IPAddressUtils.ipPartToInt(IPAddressUtils.java:147)
[exec] at org.xins.common.net.IPAddressUtils.ipToInt(IPAddressUtils.java:67)
[exec] at org.xins.server.IPFilter.match(IPFilter.java:263)
[exec] at org.xins.server.AccessRule.isAllowed(AccessRule.java:349)
[exec] at org.xins.server.AccessRuleList.isAllowed(AccessRuleList.java:250)
[exec] at org.xins.server.API.allow(API.java:1081)
[exec] at org.xins.server.API.handleCall(API.java:1151)
[exec] at org.xins.server.Engine.invokeFunction(Engine.java:872)
[exec] at org.xins.server.Engine.delegateToCC(Engine.java:723)
[exec] at org.xins.server.Engine.doService(Engine.java:608)
[exec] at org.xins.server.Engine.service(Engine.java:471)
[exec] at org.xins.server.APIServlet.service(APIServlet.java:218)
[exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Server fails if properties file is not found

The server framework fails if the properties file is not found. For example:

 [java]   1054 INFO    Initialized Log4J configuration.
 [java]   3100 DEBUG   Changing APIServlet state from INITIAL to BOOTSTRAPPING_FRAMEWORK.
 [java]   3301 ERROR   Logging subsystem cannot be initialized. System administration issue detected. Runtime properties file ("src/riskcheck/impl/xins.properties") cannot be opened. Detail: "src/riskcheck/impl/xins.properties (No such file or directory)".
 [java]   3300 DEBUG   Initializing logging subsystem with the settings set in the "src/riskcheck/impl/xins.properties" file.
 [java] log4j:WARN No appenders could be found for logger (org.xins.server.log.3304).
 [java] log4j:WARN Please initialize the log4j system properly.
 [java]   1054 INFO    Initialized Log4J configuration.
 [java]   3100 DEBUG   Changing APIServlet state from BOOTSTRAPPING_FRAMEWORK to FRAMEWORK_BOOTSTRAP_FAILED.
 [java]   3444 ERROR   The XINS/Java Server Framework failed to start.
 [java]   3444 DEBUG   The XINS/Java Server Framework failed to start.
 [java] javax.servlet.ServletException
 [java]     at org.xins.server.Engine.<init>(Engine.java:158)
 [java]     at org.xins.server.APIServlet.init(APIServlet.java:166)
 [java]     at org.xins.common.servlet.container.LocalServletHandler.initServlet(LocalServletHandler.java:81)
 [java]     at org.xins.common.servlet.container.LocalServletHandler.<init>(LocalServletHandler.java:49)
 [java]     at org.xins.common.servlet.container.HTTPServletHandler.addWAR(HTTPServletHandler.java:214)
 [java]     at org.xins.common.servlet.container.HTTPServletHandler.<init>(HTTPServletHandler.java:139)
 [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 [java]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 [java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 [java]     at org.xins.common.servlet.container.HTTPServletStarter.<init>(HTTPServletStarter.java:138)
 [java]     at org.xins.common.servlet.container.HTTPServletStarter.main(HTTPServletStarter.java:208)

Pluggable client-side protocols

Currently the XINSServiceCaller only supports the POX-RPC protocol (_xins-std). The protocol to use should be pluggable instead, so that other protocols (e.g. Google Protocol Buffers) can be used.

XSD validation for definitions

Currently, definitions are validated with a DTD only. It would be good if they would be validated using an XML Schema definition (XSD). Then the DTD declaration becomes optional. XINS 3 would not require to add new DTDs then...

ExpiryStrategy thread continues after webapp died

Here is an message I noticed in the log, with XINS 3.0-beta2-dev (very very close to -beta1, probably same line numbers):

30-apr-2010 22:47:24 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  Could not load org.apache.log4j.spi.NOPLoggerRepository.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
    at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:175)
    at org.apache.log4j.LogManager.getLogger(LogManager.java:199)
    at org.apache.log4j.Logger.getLogger(Logger.java:105)
    at org.xins.common.Log.log_1406(Log.java:1092)
    at org.xins.common.collections.expiry.ExpiryStrategy$TimerThread.run(ExpiryStrategy.java:391)
Exception in thread "org.xins.common.collections.expiry.ExpiryStrategy # 0 [timeOut=3600000L; precision=180000L] timer thread" java.lang.NoClassDefFoundError: org/apache/log4j/spi/NOPLoggerRepository
    at org.apache.log4j.LogManager.getLoggerRepository(LogManager.java:175)
    at org.apache.log4j.LogManager.getLogger(LogManager.java:199)
    at org.apache.log4j.Logger.getLogger(Logger.java:105)
    at org.xins.common.Log.log_1406(Log.java:1092)
    at org.xins.common.collections.expiry.ExpiryStrategy$TimerThread.run(ExpiryStrategy.java:391)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.spi.NOPLoggerRepository
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
    ... 5 more

Ability to mark functions as idempotent

It would be nice if functions could be marked as idempotent, so that a client can retry a call even if a call may have been executed already (but, for example, timed out at some point).

The create-type target does not work if APIs are not under apis/

$ xins create-type

BUILD SUCCESSFUL
Total time: 1 second
Buildfile: build/build.xml

create-type:
[input] Please, enter the name of the api:
crm
[input] Please, enter the name of the new type:
Gender
[input] Please, enter the description of the new type:
Gender, either male or female.

BUILD FAILED
java.io.FileNotFoundException: /Users/ernst/xinstest/apis/crm/spec/Gender.typ (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:179)
at java.io.FileOutputStream.(FileOutputStream.java:102)
at java.io.FileWriter.(FileWriter.java:61)
at org.apache.tools.ant.taskdefs.Echo.execute(Echo.java:67)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.