cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MII 14.0 - Calling external REST service

former_member191528
Participant
0 Kudos

Hello All,

Can you call an external rest service in SAP MII 14.0 ?

Which action block can be used to do it ?

I saw the JSON to XML convertor block in SAP MII.

But how do I call a REST service in the first place ?

Thanks,

Kiran

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Use the HTTP Post action in the Logic Engine under Web.


Sam

former_member191528
Participant
0 Kudos

Hi Sam,

Thanks for your reply.We want to do a GET operation and not a POST operation ?  Can MII 14.0 do it ? I am getting an error when I try to execute it.

Thanks,

Kiran

0 Kudos

There is a "Map" available for the "RequestProperties" in the link editor which will enable the "Post" rather than the Get which is to put the parameters in the URL.


Sam

matthias_hollstein
Participant
0 Kudos

Hello

I've the same trouble here with MII15.0.

With the http post action block I can solve the authentification, but in the next step, I cannot recieve any data. Actual try is loading xml content after the http post, but I'm getting:Status: 401 - Unauthorized.

I need a solution to receive REST data in one transaction call.

Thank you

matthias_hollstein
Participant
0 Kudos

This case is solved, because MII is not session based. We have to handle it in the JAVA using a session (we will create a wrapper for this issue). That will give us the data into MII.

kind regrads

Matthias

0 Kudos

Matthias,

I am not 100% clear on the solution you found or the comment about the "session" either.  So any additional details that you can provide here are appreciated.

Thanks,
Sam

matthias_hollstein
Participant
0 Kudos

Hello Sam
for RESTful communication and also in our application, there is a session information necessary. Normally in MII you cannot create a session with the http post action block. So we have to create a session logic in the JAVA backend and call this "wrapper" for our request during MII.
It seems be no solution to communicate RESTful in MII, I think.
Are this enough details for you?
kind regards
Matthias

pooja_vivekanandan
Discoverer
0 Kudos

Hi Matthias,

For the authentication, you can provide the credentials in the HTTP post action using the credential store.

Can you give more details on what all data you need in the session?

For RESTful communication, each request is supposed to have all the needed information for the service which is possible with POST action block.

Thanks,

Pooja

matthias_hollstein
Participant
0 Kudos

Hello Pooja

thank you for the reply. Using credentials doesn't help in this case. I've also tried several other variations of using credentials within the http post action block, before I found the explanation about the session behavior. In our used application, there is a session (cookie) necessary, and this cannot be handled by MII obviously.
kind regards
Matthias

Answers (1)

Answers (1)

former_member844162
Discoverer
0 Kudos

Hello all,

Can someone explain to me the solution after 9 years ? please

Thanks,

Anis