jbossapache-camelopenshiftredhatjboss-developer-studio

How do i integrate with API´s?


I have read documentation and studied various examples on JBoss but still havent figuerd out how to make API calls and play with the data. I think i would like to use apache Camel, but is there any other tool that might be better at this?

UserCase:

1: Make a call to https://jsonplaceholder.typicode.com/posts/1 and print the body in the console.

2: Consume a wsdl file and get access to a SOAP API, make calls and print the data in the console.

What example or tutorial should i look on, or could you explain to me the best way to achieve this in JBoss?

Edit: Do i just do this in pure java perhaps?

Edit2: Fuse Online looks like something i might use to achieve my user cases. Could anyone confirm?

It seems weird with 50 views and no responses, Is something unclear with the question?


Solution

  • This is how i made rest/soap requests and managed to integrate with APIs.

    Soap:

    <to id="_to2" uri="cxf:https://thisSoapAPIExampleURL.cgi?dataFormat=MESSAGE&amp;wsdlURL=C:\Users\Softy\workspace\restTest\src\main\resources\wsdl\MyAPI.wsdl"/>
    

    Rest:

    <to id="_to1" uri="http4://jsonplaceholder.typicode.com/posts"/>
    

    or

     <to id="_to1" uri="cxfrs:https://jsonplaceholder.typicode.com/posts"/>