I am trying to create dynamic routing in OSB to route my request to three business services. In my case, I have one webservice that has three different operations. So I created three different business services, A, B and C on that webservice(on the same endpoint URI). Now when I route my request to these businesses services based on routing rule, I want to call operationA in business service A, operationB in business service B and operationC in business service C. Here is my dynamic routing expression:
<ctx:route>
<ctx:service>{$routingTable/mapping[event/text()=$event]/service/text()}</ctx:service>
<ctx:operation>{$operation}</ctx:operation>
</ctx:route>
Here is my routing rule:
<mappings>
<mapping>
<event>A</event>
<service>DynamicRoute/BusinessService/businessA</service>
<operation>operationA</operation>
</mapping>
<mapping>
<event>B</event>
<service>DynamicRoute/BusinessService/businessB</service>
<operation>operationB</operation>
</mapping>
<mapping>
<event>C</event>
<service>DynamicRoute/BusinessService/businessC</service>
<operation>operationC</operation>
</mapping>
</mappings>
For some reason this doesn't work for me. It throws this error "Could somebody help me in this? Thanks.