Hi
Thanks for the responses. The initial basic scenario is a sequence of
services that extend a metadata document. e.g.
Input metadata message1 -> synapse proxy service:
Proxy sends message1 -> classification service -> gets message2 response
Transform message2 -> input format message3
Send message3 -> summarisation service -> gets message4 response
Proxy service returns message4 as response to caller.
All the calls are synchronous and the services must be called as a
pipeline, rather than as parallel processes.
At some point in the future I'll probably get the final response message
forwarded to another service as well as the caller, or may use a
fireAndForget type approach to forward it to another system without
returning a response to the original caller. But I need to solve simple
pipeline approach first.
I've tried using the <property name="RESPONSE" value="false"/> snippet
Ruwan suggested, but cannot make it work correctly.
The config I've been experimenting with is below (there is a simple CBR
switch to test that both endpoints can be called) :
<!-- Attempt at basic CBR using Synapse -->
<definitions xmlns="http://ws.apache.org/ns/synapse">
<!-- Create the proxy endpoint for the pipeline -->
<proxy name="pipelineProxy" trace="enable">
<target inSequence="processMetadata" outSequence="metadataOut"/>
</proxy>
<!-- XSLT to transform response message to request message -->
<localEntry key="metadataResponseToRequest"
src="file:repository/mm/transform/MetadataResponseToRequest.xslt"/>
<!-- Process via pipeline iff content == pipline -->
<sequence name="processMetadata">
<!-- Inefficient switch without regard to message
structure/namespace -->
<switch source="//*/arg0"
xmlns:clas="http://indexing.multimatch.oclc.org/">
<case regex="pipeline">
<send>
<endpoint>
<wsdl
uri="http://localhost:8080/Classifier/classifier?wsdl"
service="ClassificationService" port="ClassifierPort"/>
</endpoint>
</send>
<xslt key="metadataResponseToRequest"/>
<send>
<endpoint>
<wsdl
uri="http://localhost:8080/Summariser/summariser?wsdl"
service="SummarisationService" port="SummariserPort"/>
</endpoint>
</send>
</case>
<default>
<!-- Just summarise the message -->
<send>
<endpoint>
<wsdl
uri="http://localhost:8080/Summariser/summariser?wsdl"
service="SummarisationService" port="SummariserPort"/>
</endpoint>
</send>
</default>
</switch>
</sequence>
<!-- Return the message -->
<sequence name="metadataOut">
<send/>
</sequence>
</definitions>
Thanks - Paul
--
*Paul Griffiths*
Developer *·* OCLC Ltd
Brincliffe House · 861 Ecclesall Road *·* Sheffield S11 7AE *·* United
Kingdom
t +44-(0)114-281 6467 *·* f +44-(0)114-281 60 41
e [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> *·* w
www.oclc.org <http://www.oclc.org>