Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Swordfish Documentation: Architecture: Internal Service Proxy"

Line 5: Line 5:
  
 
<h1>Plugin description</h1>
 
<h1>Plugin description</h1>
Current limitations:
+
InternalProxy acts as.
- InternalProxy assumes that outbound service endpoint is already registered within NMR.
+
At runtime it can be easy retrieved as OSGi service and
<br/>
+
Example of usage:
 
+
<ul>
 +
<li>Proxy injection (at runtime available as OSGi service):</li>
 
<pre>
 
<pre>
 
     <osgi:reference id="internalProxy"
 
     <osgi:reference id="internalProxy"
Line 17: Line 18:
 
         p:proxy-ref="internalProxy"/>
 
         p:proxy-ref="internalProxy"/>
 
</pre>
 
</pre>
 
+
<li>Invocation of service:</li>
 
+
 
<pre>
 
<pre>
 
public class ASFRegistryProvider extends AbstractDocumentProvider {
 
public class ASFRegistryProvider extends AbstractDocumentProvider {
Line 47: Line 47:
 
}
 
}
 
</pre>
 
</pre>
 +
</ul>
 +
<br/>
 +
<b>Current implementation assumes that outbound service endpoint is already registered within NMR.<b/>
 +
It is possible to

Revision as of 06:25, 26 October 2009

Component diagrams

Sketch of сomponent сlasses for Internal Service Proxy Plugin

Internal Proxy Classes.png

Plugin description

InternalProxy acts as. At runtime it can be easy retrieved as OSGi service and Example of usage:

  • Proxy injection (at runtime available as OSGi service):
  •     <osgi:reference id="internalProxy"
        	interface="org.eclipse.swordfish.core.proxy.InternalProxy" />
    
        <bean id="ASFRegistryProvider"
            class="org.eclipse.swordfish.internal.resolver.backend.remote.ASFRegistryProvider"
            p:proxy-ref="internalProxy"/>
    
  • Invocation of service:
  • public class ASFRegistryProvider extends AbstractDocumentProvider {
    
        private InternalProxy proxy;
    
        @Override
        public Collection<ServiceDescription<?>> getServiceProviderDescriptions(QName interfaceName) {
            String res = null;
            try {
                res = proxy.invokeRequestResponseOperation(
                    QName.valueOf("{http://services.sopware.org/registry/ServiceRegistryProvider/1.0}ServiceRegistryProvider"),
                    QName.valueOf("{http://services.sopware.org/registry/ServiceRegistryProvider/1.0}xlookUp_serviceProvider"),
                    "<inMessage/>");
            } catch (Exception e) {
                e.printStackTrace();
            }
    
            // further processing...
    
            return null;
        }
    
        public void setProxy(InternalProxy proxy) {
            this.proxy = proxy;
        }
    
    }
    


Current implementation assumes that outbound service endpoint is already registered within NMR.<b/> It is possible to

Back to the top