Page 1 of 1

Integrator SOAPServerService - How to read HEADER fragment

Posted: Tue Feb 28, 2017 6:56 pm
by dvanoni
Hi all!

I'm working with Lansa Integrator and in particular I'm defining a SOAP server using the SOAPServerService with some methods to call. I understand how to define the XML request and response body using the Integrator editor. Everything works well.

Now I need to read the authentication credentials from the Header part of the request. How can I read that from my rp?

For instance I have a request like this and I want to get the values inside the wsse:Username and wsse:Password tag:

Code: Select all

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://soap.service.speak.hupac.com">
   <soapenv:Header>
   	      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken>
                <wsse:Username>username</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>
   <soapenv:Header/>
   <soapenv:Body>
      <soap:getTerminalList>
      </soap:getTerminalList>
   </soapenv:Body>
</soapenv:Envelope>
Thanks

Re: Integrator SOAPServerService - How to read HEADER fragment

Posted: Tue Mar 07, 2017 5:44 pm
by dvanoni
Just to clarify my requirement, I want to manage the basic authentication of SOAP server according to the standards (http://docs.oasis-open.org/wss/v1.1/wss ... curity.pdf). So I need to implement the credentials validation logic in my rp or function and get the data from the "Header" tag of the request.

Does anybody have some experience with it?

Thanks