Jump to: navigation, search

Swordfish Documentation: Architecture: Internal Service Proxy

Revision as of 04:19, 20 November 2009 by Juergen.kindler.sopera.de (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


The internal service proxy allows plugins to access the NMR inside Swordfish.


Component diagrams

Sketch of сomponent сlasses for internal Service Proxy Plugin

Service Proxy Classes.png

Example of ServiceProxy usage:

  • proxy injection (at runtime available as OSGi service):
  •     <osgi:reference id="serviceProxy"
        	interface="org.eclipse.swordfish.core.proxy.ServiceProxy" />
        <bean id="ASFRegistryProvider"
  • invocation of target service:
  • public class ASFRegistryProvider extends AbstractDocumentProvider {
        private ServiceProxy proxy;
        public Collection<ServiceDescription<?>> getServiceProviderDescriptions(QName interfaceName) {
            String res = null;
            try {
                res = proxy.invokeRequestResponseOperation(
            } catch (Exception e) {
            // further processing...
            return null;
        public void setProxy(ServiceProxy proxy) {
            this.proxy = proxy;

During invocation ServiceProxy performs the following steps:

  • creates new NMR Exchange for provided operation;
  • looks up outbound endpoint from the NMR using provided service name;
  • sends exchange to NMR according to selected message exchange pattern (e.g. "http://www.w3.org/ns/wsdl/in-out").

NOTE: Current version of proxy assumes that outbound endpoint of target service is already registered within ServiceMix NMR.

See also

Swordfish JavaDoc

Architecture overview