Module descriptor
A SOAP RPC plugin module descriptor looks like this:
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 Implementation
The Java implementation looks like this:
Note the following points from the code above:
- The WebService annotation specifies the interface which this endpoint implements and the name of the endpoint in the generated WSDL
- If your implementation extends SecuredRpcService then users must pass a valid login token to requests (unless they are using Trusted Applications). Each method on your interface must take a String as its first parameter, and clients must pass a token returned by the login method of the
authSOAP endpoint. Your implementation ignores this parameter – it is processed by a Spring interceptor. If no valid token is provided, the current user will be the anonymous user. - The class is autowired by Spring, so it can use any Spring beans available in the Fisheye/Crucible Spring context. For example, the
TxTemplateis automatically injected into the instance by Spring. This could also have been achieved by defining a methodpublic void setTxTemplate(TxTemplate txTemplate) {...} rather than using the@Autowiredannotation. - All SOAP RPC endpoint implementations must include the setContext/getContext methods and the
@Resourceannotation on setContext.
Labels:






