Integrator SOAPServerService - How to read HEADER fragment

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
dvanoni
Posts: 37
Joined: Wed Dec 02, 2015 3:47 am
Location: Chiasso - Switzerland

Integrator SOAPServerService - How to read HEADER fragment

Post 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
dvanoni
Posts: 37
Joined: Wed Dec 02, 2015 3:47 am
Location: Chiasso - Switzerland

Re: Integrator SOAPServerService - How to read HEADER fragment

Post 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
Post Reply