rest2soap getting a get parameter from regex and use it into requestXSLT

32 views
Skip to first unread message

fra...@gmail.com

unread,
Nov 22, 2018, 9:16:19 AM11/22/18
to membrane-monitor
Hello,

I use rest2soap to convert a web service into membrane.
That works well.

Here is my configuration in the proxies.xml file:
<serviceProxy port="2000">
            <rest2Soap>       
                   
                <mapping regex="/lists/.*" soapAction=""
                    soapURI="/systinet/server/packages/WSAscol/Demande"
                    requestXSLT="./getLists.xsl"
                    responseXSLT="./xml2json.xsl"
                    />
               
            </rest2Soap>
           
            <target host="localhost" port="8080" />
        </serviceProxy>

I want to retrieve a parameter (Authentication) in the header of the call request (here /lists/.*) with my application and send it to my web service (here ./getLists.xsl)
Here is what my getLists.xsl file looks like where I have to put the value of the retrieve parameter in the header:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/">
    <xsl:template match="/">
        <s11:Envelope >
          <s11:Body>
            <tns:getListsForDemands xmlns:tns="http://systinet.com/wsdl/">
            <tns:p0>token authentication</tns:p0>
            </tns:getListsForDemands>
          </s11:Body>
        </s11:Envelope>   
    </xsl:template>
</xsl:stylesheet>

Is it possible to do that? If yes, comment?
I looked in the documentation, we can make an interceptor but I'm not sure.

Thank you for your help.
Reply all
Reply to author
Forward
0 new messages