0

Here's the scenario,

  • WS_A and WS_B are Web Services published in different endpoints.

  • WS_A receives personId, makes some processing, logs some data, and returns the name and the lastname of the Person with personId.

  • WS_B receives two Strings name and lastname and saves name+lastname in a database, then returns Ok/Error.

I need to publish an API API_Composition, using WSO2 API Manager, that will call WS_A, and send the result to WS_B, then return the result of WS_B.

Keep in mind that i can't make a new WS_C that has the behaviour of WS_A+WS_B, because i can't access the whole code of any of them.

Is there a way of doing this using only WSO2 API Manager? Are there any other API Management products that can accomplish this requirement?

Regards

DiegoS
  • 816
  • 1
  • 10
  • 26
  • What do you mean by "I can't access the whole code of any of them"? If you have access to the endpoints and you know the input and output of each of the services you should be able to create a composed service C. – Andrei Nov 21 '15 at 10:41
  • No Sir, the input and the output might be known, but not the whole code. – DiegoS Nov 21 '15 at 14:22
  • That's the purpose of a Web Service or any Interface. For example, what if i access the Person with Id=1 and the code notificates someone, or generates some kind of special log.. – DiegoS Nov 21 '15 at 14:31

1 Answers1

3

Yes, you can do this with mediator sequence. I have not found a specific tutorial for your scenario, but here's a blog post that has a demo on using mediator sequences and links to detailed documentation.

(Note: the demo and blog post are for WSO2 API Cloud - the hosted version of WSO2 API Manager. But it all works the same for API Manager - it is the same technology.)

DSotnikov
  • 634
  • 3
  • 10