beautypg.com

Creating the services.xml file, Modifying the applicationcontext.xml file, Creating the – HP Integrity NonStop H-Series User Manual

Page 418: Services.xml, File

background image

}
}

Creating the

services.xml

File

Create the Axis2/Java Deployment Descriptor file (

services.xml

) to instantiate the SpringInit

and EmpInfo services.

To create the

services.xml

file, complete the following steps:

1.

Create the

services.xml

file in the

EmpInfo/WebContent/META-INF

directory, as

explained in the

Creating the

EmpInfo-servlet.xml

File

section in the

Getting Started

with Spring

chapter.

2.

Modify the

services.xml

file to include the instances SpringInit and EmpInfo services.

After modification, the

services.xml

file must appear as:




This web service initializes Spring.

com.hp.empinfo.service.SpringInit
composite
true






Spring EmpInfo Axis2 AAR deployment

com.hp.empinfo.service.EmployeeDao
>org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier
empdao










Modifying the

applicationContext.xml

File

Modify the

applicationContext.xml

file to:

Add a bean definition for integrating Axis2/Java in the EmpInfo application

Edit the JDBC resource location

To modify the

applicationContext.xml

file, complete the following steps:

1.

Specify the

applicationContext

bean as shown:

class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder" />

2.

Edit the bean instance of the

PropertyPlaceholderConfigurer

class to change the

location of the

jdbc.properties

file, as shown:

class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

After modifications, the

applicationContext.xml

file should appear as:


xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder" />

418

Integrating Axis2/Java into Spring

This manual is related to the following products: