How could we get Authorization Bearer from a SOAP Service
Hello, first of all thanks for your time and help.
We do send from a REST POST request using SoapUI software, an "Authorization Bearer".
POST http://[IP]:[Port]/aplicaciones/scs/informescctest/Servicios.SOAP.InformesCConcertadosv01r00.cls HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
Authorization: Bearer eyJ0e[...]
SOAPAction: http://SCS.Servicios/InformesCConcertadosv01r00/ResultadosER7
Content-Length: 1871
Host: AAA
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Our mission is to get it inside a SOAP Service.
The Service's ADAPTER is:
Parameter ADAPTER = "EnsLib.SOAP.InboundAdapter";
This service Extends from:
Class Servicios.SOAP.InformesCConcertadosv01r00 Extends (EnsLib.SOAP.Service, ITB.HL7.BS.XMLService) [ ProcedureBlock ]
Could you help us, please?
We have already tried:
Method ResultadosER7(mensaje As %Stream.FileCharacter, authorization As %String(MAXLEN="")) As %Stream.FileCharacter [ Final, ProcedureBlock = 1, SoapAction = "http://SCS.Servicios/InformesCConcertadosv01r00/ResultadosER7", SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{
set token = ##class(%SYS.OAuth2.AccessToken).GetAccessTokenFromRequest(.status)set token = ..Adapter.%GetParameter("Authorization")
We have already read:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
https://community.intersystems.com/post/unexpected-contentype-when-call…
https://docs.intersystems.com/irisforhealthlatest/csp/documatic/%25CSP…
Comments
Hi @Yone Moreno
Good read: Using Oauth2 with SOAP (Web)Services