Quantcast
Channel: SCN : Unanswered Discussions - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 6719

Calling a REST JSON web service from PI 7.0

$
0
0

Hi All,

 

we are using PI 7.0 SP 25.

 

Recently I have got the task to consume a REST web-service that accepts a json payload. In addition, an 1K long OAuth2 bearer token should be sent in the packet in order to authenticate the PI system.

 

I have tried following variants:

 

1. I am able to send a JSON payload by using the SOAP adapter (by specifying "Do not use the SOAP envelop") but I cannot insert the bearer token into the corresponding mime header as it is longer than 200 characters that is the limit for ASMA.

 

2. I could use an Axis handler to specify such long bearer token but I think that there is no way to force Axis to use the JSON payload. The Axis framework fails once I try to create a message that does not contain the soap envelope. And there are no methods of the SOAPBody interface in order to "set" a JSON payload for the body.

 

So it seems that both SOAP adapter and SOAP with Axis won't help here.

 

Any ideas what can be done here to complete the task?

 

Best regards,

Maxim


Viewing all articles
Browse latest Browse all 6719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>