Prev | Current Page 340 | Next

Binildas A Christudas

"Service-Oriented Java Business Integration"

out.println("TargetService.echo : String. this = " +
this);
try
{
return helloWeb.hello(input);
}
catch(Exception exception)
{
exception.printStackTrace();
return exception.getMessage();
}
}
}
???
???
JBI Proxy
[ 256 ]
IHelloProxy.java: We now need to wire the JBI proxy to the web services
stub. IHelloProxy is an interface defined for this purpose and hence is
having the same single business method, hello.
public interface IHelloProxy
{
public String hello(String input);
}
IHelloProxyService.java: HelloProxyService is a wrapper or adapter
for the JBI proxy. In other words, the helloProxy instance field in
HelloProxyService will refer to the JBI proxy.
public class HelloProxyService implements IHelloProxy
{
private IHelloProxy helloProxy;
public void setHelloProxy(IHelloProxy helloProxy)
{
this.helloProxy = helloProxy;
}
public String hello(String input)
{
System.out.println("HelloProxyService.hello. this = " + this);
return helloProxy.hello(input);
}
}
The bean wiring discussed in this section is done using Spring and is shown in the
next section.
XBean-based JBI Proxy Binding
Using XBean, we will now configure the JBI proxy to be deployed onto the standard
servicemix-jsr181 JBI component.


Pages:
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352