123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cpscrn
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <!-- $Header: //cpscrn/main/templates/cps4/portlets/nav/portlet-impl/initCookie.xts#1 $ -->
- <!-- $DateTime: 2008/10/22 11:12:04 $ -->
- <!-- $Change: 25109 $ -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xts:block id="login" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="/cps4/producer/logicsheets/cps-portlet.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:portlet="http://developer.cognos.com/schemas/cps/logic/portlet/1/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xsl:variable name="navService">interface://crn</xsl:variable>
- <login>
- <xts:request protocol="NAV" target="{ $navService }" soapAction="cps.run" responseEnvelope="true">
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsl:copy-of select="/root/envelope/SOAP-ENV:Envelope/SOAP-ENV:Header"/>
- <SOAP-ENV:Body>
- <nav:login xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/">
- <nav:method>sso</nav:method>
- </nav:login>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </login>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="response" dependency="login" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="/cps4/producer/logicsheets/cps-portlet.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:portlet="http://developer.cognos.com/schemas/cps/logic/portlet/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output/*[local-name()='protocolHeader']">
- <xsl:variable name="op" select="/root/login/SOAP-ENV:Envelope/SOAP-ENV:Body/*[1]"/>
- <xsl:for-each select="$op/nav:credential">
- <!-- the userCapabilities cookie is already being generated and it has a signature -->
- <xsl:if test="@name != 'userCapabilities'">
- <xos:param name="Set-Cookie">
- <xsl:value-of select="@name"/>
- <xsl:text>=</xsl:text>
- <xsl:value-of select="."/>
- </xos:param>
- </xsl:if>
- </xsl:for-each>
- <!-- SAP-HACK-START -->
- <xsl:variable name="userCategory" select="/root/cookies/cookie[@name = 'userCategory']"/>
- <xsl:if test="$userCategory">
- <xos:param name="Set-Cookie">
- <xsl:text>userCategory=</xsl:text>
- <xsl:value-of select="$userCategory"/>
- </xos:param>
- </xsl:if>
- <!-- SAP-HACK-END -->
- </xts:append>
- </xts:sequence>
- <portlet:soap-response>
- <portlet:response/>
- </portlet:soap-response>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|