Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Swordfish Documentation: Architecture: Internal Service Proxy"
Line 51: | Line 51: | ||
<li>creates new NMR Exchange for provided operation</li> | <li>creates new NMR Exchange for provided operation</li> | ||
<li>lookups outbound endpoint from the NMR using provided service name</li> | <li>lookups outbound endpoint from the NMR using provided service name</li> | ||
− | <li> sends exchange to NMR according to selected message exchange pattern ( | + | <li> sends exchange to NMR according to selected message exchange pattern (e.g. "http://www.w3.org/ns/wsdl/in-out")</li> |
</ul> | </ul> | ||
<b>NOTE:</b>Current implementation assumes that outbound endpoint of target service is already registered within ServiceMix NMR. | <b>NOTE:</b>Current implementation assumes that outbound endpoint of target service is already registered within ServiceMix NMR. |
Revision as of 07:01, 26 October 2009
Component diagrams
Sketch of сomponent сlasses for Internal Service Proxy Plugin
Plugin description
Example of InternalProxy 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"/>
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; } }
During invocation InternalProxy performs the following steps:
- creates new NMR Exchange for provided operation
- lookups 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 implementation assumes that outbound endpoint of target service is already registered within ServiceMix NMR.