|
|||||
|
|||||
XFire Integration
xfire is a web service framework that can expose pojo objects as web service. Yan provides an integration package allowing configuring xfire services with yan. Standalone applicationA sample xfire configuration file is: echo.xml The <service> tag is supported by the jfun.yan.xfire.ServiceNut class. This tag supports every attribute currently supported by the native xfire configuration. The "scope" attribute can be set to "application", "service", "session" and "request".
In order to set up xfire environment, either "jfun/yan/xfire/xfireXmlBeans.xml" or "jfun/yan/xfire/xfire.xml" needs to be loaded. A typical Java code that bootstrap xfire may look like: The container created can then be used to lookup regular beans as well as xfire Service: ServletWhen deployed as a servlet, jfun.yan.xfire.XFireYanServlet can be used to read service information from a yan configuration file. For example, the xfire book example can be configured using Yan configuration file. The web.xml file will look like: web.xml The "yanConfigFile" parameter is used to specify the location of the configuration file. And the yan.xml file looks like: yan.xml In this example, component "bookshelf" is configured in exactly the same way as any other regular component. We then use the "service" tag to expose it as a web service. Backbone ConfigurationThough not required, reading the xfire.xml helps in knowing what ids the xfire infrastructure beans are registered under. Now let's take a look: xfire.xml |
|||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||