cancel
Showing results for 
Search instead for 
Did you mean: 

Call External APIs from XI

Former Member
0 Kudos

Hello,

I have a scenario where I need to call external APIs which return the object for PDF document.

I want to display this document in web Application (synchronous call).

I have two options:

1. write a web service to call external APIs and then call this web service from XI using SOAP Receiver adapter.

2. Develop adapter module in SOAP Receiver to call external API.

I was wondering the performance of this two approaches as it will be a synchronous call.

Also please correct me if it is not possible to call external APIs in adapter module of SOAP Receiver.

Thanks in advance.

Beena

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Beena,

I didn't quite understand the scenario in general howver as far as your question is concerned. there are 2 approcaches which u can use.

First approach would be to create a webservice and deploy it in your XI's J2EE engine and you can call the webservice from XI using soap.

seond approach would be to use a java proxy which will call the external API.

I used Webservice approach as I had a similar scenario like yours.

Hope this helps

Thanks and Regards

Arvind

Former Member
0 Kudos

Hi Arvind,

I have PDF documents stored on external server. There are APIs to retrieve them.

The APIs can retrieve them as attachements.

I need to fetch these documents and display in web application.

I was thinking to deploy the web service on the server where PDF documents resides (Tomcat-AXIS) and call this web service from XI Axis SOAP Adapter.

I think it is better approach to use Java proxy instead of deploying web service on XI J2EE Engine as XML-SOAP conversion can be avoided.

Please correct me if I am wrong.

Thanks,

Beena.

Former Member
0 Kudos

Hi Beena,

Using Java proxy is a nice approach. But you hv to watch out for the size of PDF file as well. If its huge, then the performance will be hampered if u send it to the web application back thru XI as thr will be pdf-xm conversion taking place.

Also, u r using a synchrnous call which is making ur web application wait for the response.

Instead of that make an asynchrounous scenario where in the java proxy will fetch the pdf file & dump it in a file system.

Now, develop another scenario where XI will just pick the file and transfer it to the web application without converting it to anything.

Refer the following link for the second scenario

<a href="/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository:///people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository

Hope the above solution helps.

Regards,

Akshay