FishEye 1.6 : SOAP RPC Plugin Module
This page last changed on Apr 22, 2008 by edawson.
Module descriptorA SOAP RPC plugin module descriptor looks like this: <rpc-soap key="my.foo.service" path="/foo" class="com.yoydyne.rpc.FooServiceImpl"/> The descriptor is simple, because much of the configuration is defined by JAX-WS annotations on the implementing class. The descriptor above defines a SOAP endpoint at http://<your server>/<your context>/service/foo. The WSDL for the service is available at http://<your server>/<your context>/service/foo?wsdl Service ImplementationThe Java implementation looks like this: @WebService(endpointInterface = "com.yoydyne.rpc.FooService", name = "Foo", serviceName = "Foo") @SOAPBinding(style = Style.RPC, use = Use.LITERAL) public class FooServiceImpl implements FooService, SecuredRpcService { @Autowired private TxTemplate txTemplate; public ReviewData createReview(String token, ReviewData review) { return reviewService.createReview(review); } public String doSomething(String token, String arg) { return txTemplate.execute(new TxCallback<String>() { public String doInTransaction(TransactionStatus status) { return "Logged in as " + txTemplate.getEffectivePrincipal(); } }); } public WebServiceContext getContext() { return context; } @Resource public void setContext(WebServiceContext context) { this.context = context; } } Note the following points from the code above:
|
![]() |
Document generated by Confluence on Sep 23, 2008 01:42 |