Java Reference
In-Depth Information
Invoking a Burlap Service
Invoking a Burlap service is very similar to Hessian. The only difference is that you should use
BurlapProxyFactoryBean .
<bean id="weatherService"
class="org.springframework.remoting.caucho.BurlapProxyFactoryBean">
<property name="serviceUrl"
value=" http://localhost:8080/weather/services/WeatherService" />
<property name="serviceInterface"
value="com.apress.springenterpriserecipes.weather.WeatherService" />
</bean>
Exposing an HTTP Invoker Service
Again, the configuration for exposing a service using HTTP Invoker is similar to that for Hessian and
Burlap, except you have to use HttpInvokerServiceExporter instead.
<bean name="/WeatherService"
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="service" ref="weatherService" />
<property name="serviceInterface"
value="com.apress.springenterpriserecipes.weather.WeatherService" />
</bean>
Invoking an HTTP Invoker Service
Invoking a service exposed by HTTP Invoker is also similar to Hessian and Burlap. This time you have to
use HttpInvokerProxyFactoryBean .
<bean id="weatherService"
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl"
value=" http://localhost:8080/weather/services/WeatherService" />
<property name="serviceInterface"
value="com.apress.springenterpriserecipes.weather.WeatherService" />
</bean>
5-7. Choosing a Web Service Development Approach
Problem
When you are asked to develop a web service, you first have to consider which web service development
approach you are going to use.
Solution
There are two approaches to developing a web service, depending on whether you define the contract
first or last. A web service contract is described using Web Services Description Language (WSDL) . In
contract-last, you expose an existing service interface as a web service whose service contract is
generated automatically. In contract-first, you design the service contract in terms of XML and then
write code to fulfill it.
 
Search WWH ::




Custom Search