LibraryLink ToToggle FramesPrintFeedback

Deploying a FUSE Services Framework Endpoint

The following steps outline, at a high-level, what you must do to successfully configure and deploy a FUSE Services Framework endpoint to the Spring container:

  1. Write a FUSE Services Framework configuration file for your application. See Configuring your application.

  2. Build a WAR file that contains the configuration file, the WSDL file that defines your service, and the code that you generated from that WSDL file, including the implementation file, and any libraries that your application requires. See Building a WAR file.

  3. Deploy the WAR file in one of the following ways:

You must write an XML configuration file for your application. The Spring container requires this file to instantiate, configure, and assemble the beans in your application.

Example 5.1 shows the spring.xml configuration file used in the Spring container sample application. You can use any name for your configuration file, however, it must end with a .xml extension. This example file is taken from the InstallDir/samples/spring_container sample application. Most of the samples in the InstallDir/samples directory contain files namedspring.xml, which configure the samples for deployment to the Spring container.

Example 5.1. Configuration File—spring.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans 1
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xsi:schemaLocation="
        http://cxf.apache.org/jaxws
        http://cxf.apache.org/schemas/jaxws.xsd
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">
    <jaxws:endpoint id="SoapEndpoint" 2
        implementor="#SOAPServiceImpl"
        address="http://localhost:9000/SoapContext/SoapPort"
        wsdlLocation="hello_world.wsdl"
        endpointName="e:SoapPort"
        serviceName="s:SOAPService"
        xmlns:e="http://apache.org/hello_world_soap_http"
        xmlns:s="http://apache.org/hello_world_soap_http"/>
    <bean id="SOAPServiceImpl" class="demo.hw.server.GreeterImpl"/> 3
</beans>

The code shown in Example 5.1 can be explained as follows:

1

The Spring beans element is required at the beginning of every FUSE Services Framework configuration file. It is the only Spring element that you must be familiar with.

2

Configures a jaxws:endpoint element that defines a service and its corresponding endpoints.

[Important]Important

The location of the WSDL file specified in the wsdlLocation is relative to the WAR's WEB_INF/wsdl folder.

For more information on configuring a FUSE Services Framework jaxws:endpoint element, see Using the jaxws:endpoint Element.

3

Identifies the class that implements the service.

To deploy your application to the Spring container you must build a WAR file that has the following structure and contents:

The simplest way to deploy a FUSE Services Framework endpoint to the Spring container is to:

The Spring container automatically scans the repository for newly deployed applications. The default value at which it scans the repository is every 5000 milliseconds.

You can use the Apache ant utility to build the FUSE Services Framework sample applications. This includes building the WAR files and deploying them to the Spring container. If you want to use the ant utility to build your applications, including the WAR file for deployment to the Spring container, see the example build.xml file located in the InstallDir/samples/spring_container/wsdl_first directory.

For more information about the ant utility, see http://ant.apache.org/.

You can change the time interval at which the Spring container scans the repository by changing the scanInterval property in the spring_container.xml configuration file. See Example 5.2 for more detail.

You can change the Spring container repository location by changing the value of the containerRepository property in the spring_container.xml configuration file. See Example 5.2 for more detail.