Can I call ServiceCallout policy from Javascript

Not applicable

I have a requirement to make 3 SOAP calls parallely and mash up the responses...The target server sets behind a 2-way TLS and hence I need to consider the SSL properties as well...

What is I create separate API's for each of the SOAP service and then use JavaScript through service Callout to process them parallel...Is this solution feasible?

Thanks

0 6 698
6 REPLIES 6

Hi @Deepa

I think you mean you want to call SOAP services in a sequence. I will recommend use service callout policy and 3 separate pass through proxies for the soap services. Call these proxies using proxy chaining from your service callout policy.

Sorry to mislead you...I want to make the calls parallel and then mash the responses

OK in that case you can make asynchronous calls from javascript, similar to how ajax calls are made

Will I be able to make asynchronous calls from javascript over https (2-WAY TLS)

If you use nodejs, yes.

@Deepa, Target Servers are not supported in JavaScript. Hence here is the solution for your requirement:

  1. Create 3 internal pass through APIs protected by access control policy (IP restriction - RMPs)
  2. Add service call out policy in the 3 internal APIs and configure the target servers (with SSL config) to communicate with back end services
  3. Create a composite API protected by your OAuth and add a JavaScript policy to call the above created 3 internal APIs asynchronously and then mash up the respective responses into a single response object