123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseEventStudio">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt"/>
- <!--
- ===============================================================================================
- deletePrevSelOprData - As the page is resubmitted when changing operation for a WSDL it requires
- to delete any operation arguments from the env upon resubmission.
- ===============================================================================================
- -->
- <xts:block id="deletePrevSelOprData" dependency="formlogic_init" mode="interpret" condition=".[/root/env/param[@name='url_newoperation']='true']" mandatory="false" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:delete select="/root/env/param[starts-with(@name, 'pv_')]" mandatory="false"/>
- <xts:delete select="/root/env/param[@name='taskParameters']"/>
- <xts:delete select="/root/env/param[@name='url_newoperation']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ================================================================================
- whip out the parameters that were saved off previously
-
- ===============================================================================================
- -->
- <xts:block id="decodeExistingParameters" path="/ags/parameters/decodeExistingParameters.xslt" dependency="deletePrevSelOprData" processor="XSLT" type="exec" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished' ]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ================================================================================
- If we have been through this dialog before we will have saved or unsaved parameter values to display, so whip them out
- from the parameter named taskParameters. this contains the previously saved param values retrieved in loadAgent and any unsaved updates
- from previous passes through this dialog
-
- ===============================================================================================
- -->
- <xts:block id="checkExistingParameters" path="/ags/parameters/checkExistingParameters.xslt" dependency="decodeExistingParameters" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ================================================================================
-
- We also may have just come back from a jauort server, so update this info with any new parameter values
- ===============================================================================================
- -->
- <xts:block id="mergeLiteralParameters" path="/ags/parameters/mergeLiteralParameters.xslt" dependency="checkExistingParameters" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished']" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- readAgsConfigProp - check if show trigger is enabled
- ===============================================================================================
- -->
- <xts:block id="readAgsConfigProp" mode="interpret" dependency="mergeLiteralParameters" mandatory="false" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append>
- <evts>
- <xts:function name="getConfiguration" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xts:param name="webservice.showTrigger"/>
- </xts:function>
- </evts>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- readWSDLdata - operation parameters etc.
- cq 265497: deployed web task looses operation
- ===============================================================================================
- -->
- <xts:block id="readWSDLdata" mode="interpret" dependency="readAgsConfigProp" condition=".[not(/root/env/param[@name='isTriggerUsed']) and /root/env/param[@name='url_wsdl'] and /root/env/param[@name='url_wsdl']!='' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:delete select="/root/WSDL" mandatory="false"/>
- <xts:append>
- <xts:request protocol="WSDL" cache="false" mimeType="text/xml" href="{/root/env/param[@name='url_wsdl']}" faultBlock="faultHandler"/>
- </xts:append>
- <xsl:if test="contains(/root/env/param[@name='url_operation'], '_[opr]_')">
- <xts:update select="/root/env/param[@name='url_operation']">
- <param name="url_operation">
- <xsl:value-of select="concat(substring-before(/root/env/param[@name='url_operation'], '_[opr]_'),'_[opr]_')"/>
- </param>
- </xts:update>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- putCognosWSDLdata - Trigger operation parameters etc.
- ===============================================================================================
- -->
- <xts:block id="putCognosWSDLdata" mode="interpret" dependency="readWSDLdata" condition=".[/root/env/param[@name='isTriggerUsed'] and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:delete select="/root/WSDL" mandatory="false"/>
- <xts:append>
- <WSDL>
- <Service name="CognosReportNetService">
- <PortType name="CognosReportNetPort" type="CognosReportNetPortType" Binding="SOAPBindingImpl">
- <Operation name="trigger">
- <Parameter Name="triggerName" Type="string" SimpleJavaType="true"/>
- </Operation>
- </PortType>
- </Service>
- </WSDL>
- </xts:append>
- <xts:append select="/root/env">
- <param name="url_wsdl">
- <xsl:value-of select="concat(/root/configProps/param/property[@name='internalDispatcher'], '?b_action=wsdl')"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- ProcessResponse - Process the response of the call and transform it into a standard xml structure
- ===============================================================================================
- -->
- <xts:block id="processResponse" mode="interpret" dependency="putCognosWSDLdata" condition=".[ not(/root/soapFault) and (/root/env/param[@name='url_wsdl'] and /root/env/param[@name='url_wsdl']!='' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup')]" mandatory="false" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xsl:variable name="WSDLOpr">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='url_operation'] != ''">
- <xsl:value-of select="/root/env/param[@name='url_operation']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="count(/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/Operation)>0">
- <xsl:value-of select="/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/Operation[1]/@uname"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="WSDLSvc">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='url_serviceName'] != ''">
- <xsl:value-of select="/root/env/param[@name='url_serviceName']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="count(/root/WSDL/Service)>0">
- <xsl:value-of select="/root/WSDL/Service[1]/@name"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="WSDLSvcPort">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='url_port'] != ''">
- <xsl:value-of select="/root/env/param[@name='url_port']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="count(/root/WSDL/Service)>0">
- <xsl:value-of select="/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/@name"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <!--xts:delete select="/root/WSDL" mandatory="false"/-->
- <xts:append>
- <parametersResponse>
- <parameter>
- <!--xsl:for-each select="/root/WSDL/Service[@name=$WSDLSvc]/PortType[@Binding='SOAPBindingImpl']/Operation[@name=$WSDLOpr]/Parameter"-->
- <xsl:apply-templates select="/root/WSDL/Service[@name=$WSDLSvc]/PortType[@Binding='SOAPBindingImpl']/*"/>
-
- </parameter>
- </parametersResponse>
- </xts:append>
- <xts:delete select="/root/env/param[@name='url_methods']"/>
- <xts:append select="/root/env">
- <param name="url_methods">
- <xsl:value-of select="concat($WSDLSvc,'?',$WSDLOpr, '?', $WSDLSvcPort)"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
-
-
- <xsl:template match="Operation">
- <xsl:variable name="WSDLOpr1">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='url_operation'] != ''">
- <xsl:value-of select="/root/env/param[@name='url_operation']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="count(/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/Operation)>0">
- <xsl:value-of select="/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/Operation[1]/@uname"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="@uname=$WSDLOpr1">
- <xsl:apply-templates select="./*"/>
- </xsl:when>
- <xsl:otherwise>
- <!-- manage old build stored agent data -->
- <xsl:if test="@name=$WSDLOpr1">
- <xsl:apply-templates select="./*"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
-
- <xsl:template match="Parameter">
- <item>
- <xsl:apply-templates select="@*"/>
- <value>
- <xsl:value-of select="@name"/>
- </value>
- <xsl:apply-templates select="./*"/>
- </item>
- </xsl:template>
-
- <xsl:template match="Datatype">
- <!-- now copy each sub element 1 level ??-->
- <item>
- <xsl:apply-templates select="./*"/>
- <xsl:apply-templates select="@*"/>
- </item>
- </xsl:template>
-
- <xsl:template match="@*">
- <xsl:variable name="name">
- <xsl:value-of select="translate(local-name(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
- </xsl:variable>
- <xsl:element name="{$name}">
- <xsl:value-of select="."/>
- </xsl:element>
- </xsl:template>
-
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- check that we have all the parameters, even those without saved values
- and produce a block of xml to be used by the display that contains all the parameters and any parameter values that may have been
- saved or recently generated by this page via the rs or the model insert button
- remove any saved params that are no longer valid
- ===============================================================================================
- -->
- <xts:block id="mergeParameters" path="/ags/parameters/mergeParameters.xslt" dependency="processResponse" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup'] " processor="XSLT" type="exec" mandatory="false">
- </xts:block>
- <!--
- ================================================================================
- decode the the model item parameters from the form fields and update the parameters block
- ===============================================================================================
- -->
- <xts:block id="mergeModelParameters" path="/ags/parameters/mergeModelParameters.xslt" processor="XSLT" type="exec" mode="interpret" dependency="mergeParameters" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished'] " mandatory="false"/>
- <!--
- ================================================================================
-
- if We have just come back from a jaunt round the report server, update the agent task blob
- ===============================================================================================
- -->
- <xts:block id="createParametersBlob" path="/ags/parameters/createParametersBlob.xslt" dependency="mergeModelParameters" processor="XSLT" type="exec" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup' or /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished'] " mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- returnResult - We're done with the webservice morphlet, so return the appropriate response
- ===============================================================================================
- -->
- <xts:block id="returnResult" path="/ags/tabResultTemplate.xslt" dependency="createParametersBlob" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ================================================================================
- Append the report path to the agent path.
- ===============================================================================================
- -->
- <xts:block id="appendDisplayedPageType" dependency="returnResult" processor="XSLT" type="exec" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <displayedPage quote-string="">web</displayedPage>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- create a data structure for the display to work on....
- take the report server parameters as the basis and include the default literal summary and model values
-
- format:
- <parametersDisplay>
- <parameter name="... identifier" caption="localised dislpay name" multivalued="true/false" required="true/false" type="" literalValue="" modelValue=""/>
- </parametersDisplay>
- This logic sheet is superset of all needed display parameters. Not all will be needed or used.
- ===============================================================================================
- -->
- <xts:block id="createDisplayData" path="/ags/parameters/createDisplayData.xslt" dependency="appendDisplayedPageType" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup -
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" processor="XSLT" dependency="createDisplayData" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <!-- logicsheets -->
- <xts:logicsheet path="ags/logicsheets/agentDefinition.xsl"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- agent studio logicsheets -->
- <xts:logicsheet path="ags/logicsheets/arguments.xslt"/>
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <!-- Prevent the href from appearing in the status bar. -->
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:agsarg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/arguments/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:agsad="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/agentDefinition/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:bmt="http://www.developer.cognos.com/schemas/bmt/51/0" xmlns:out="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:req-params="http://developer.cognos.com/schemas/request/params" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="agsarg xts cm pf xtsext lyt dp df cf cp xos utml agsdlg bmt">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
- <xsl:variable name="mname" select="'dialogAdapter.xts'"/>
- <xsl:variable name="spacer">
- <img height="10" width="10">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </xsl:variable>
- <!-- SEC_INFO hasTask is not javascript encoded, it is always a boolean value true|false-->
- <xsl:variable name="hasTask">
- <xsl:choose>
- <xsl:when test="key('env-param','url_wsdl') != ''">
- <xsl:text>true</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>false</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="isUsingTrigger">
- <xsl:choose>
- <xsl:when test="key('env-param','isTriggerUsed') != ''">
- <xsl:text>true</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>false</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:element name="{key('request-param','resultNode')}" namespace="">
- <markup>
- <xts:transform name="XMLEncode">
- <utml:form name="pform">
- <!-- we're maintaining our own parameter values -->
- <utml:exclude-prefix>pv_</utml:exclude-prefix>
- <!-- this defines the form command operation to be performed when all the collected properties are submitted... -->
- <!-- ================================================================ -->
- <!-- H E A D E R -->
- <!-- ================================================================ -->
- <agsdlg:header>
- <dp:image>
- <img alt="" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$ags_image_root"/>icon_Web_service_24.gif</xsl:attribute>
- </img>
- </dp:image>
- <dp:title>
- <xts:string id="DIALOG_WS_TITLE"/>
- </dp:title>
- <dp:description>
- <xts:string id="DIALOG_WS_DESCRIPTION"/>
- </dp:description>
- </agsdlg:header>
- <!-- need this to be included by default -->
- <script type="text/javascript" src="../ags/dragDropHandler.js"/>
- <utml:input type="hidden" id="taskName" name="taskName" utml:update="false">
- <utml:value>
- <xsl:choose>
- <xsl:when test="key('env-param', 'selected_path') and key('env-param', 'pageitem')">
- <xsl:value-of select="/root/cm:queryResponse/cm:webServiceTask/cm:defaultName"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'taskName') and string-length(string(key('env-param', 'taskName'))) > 0">
- <xsl:value-of select="key('env-param', 'taskName')"/>
- </xsl:when>
- </xsl:choose>
- </utml:value>
- </utml:input>
- <!-- ================================================================ -->
- <!-- B O D Y -->
- <!-- ================================================================ -->
- <!-- Define a new layout This consists of two identical sections-->
- <lyt:layout width="100%" style="2">
- <lyt:section>
- <dp:list width="80%">
- <dp:section>
- <dp:label>
- <xts:string id="DIALOG_WS_URL"/>
- </dp:label>
- </dp:section>
- <dp:section>
- <utml:input type="text" name="url_wsdl" id="url_wsdl" utml:update="false" style="width:100%" AUTOCOMPLETE="off">
- <utml:value>
- <xsl:choose>
- <xsl:when test="key('env-param', 'url_wsdl') and string-length(string(key('env-param', 'url_wsdl'))) > 0">
- <xsl:value-of select="key('env-param', 'url_wsdl')"/>
- </xsl:when>
- </xsl:choose>
- </utml:value>
- </utml:input>
- </dp:section>
- <dp:section>
- <img height="10" width="1" src="../ps/images/space.gif"/>
- </dp:section>
- <dp:section align="center">
- <dp:buttonGroup align="center">
- <dp:button>
- <a href="#" onclick="doRetrieveWS();">
- <dp:buttonText>
- <xts:string id="DIALOG_WS_RETRIEVE"/>
- </dp:buttonText>
- <dp:buttonImage dp:tooltip="DIALOG_WS_RETRIEVE">../ags/images/arrow_down.gif</dp:buttonImage>
- </a>
- </dp:button>
- </dp:buttonGroup>
- </dp:section>
- </dp:list>
- </lyt:section>
- <lyt:section>
- <xsl:variable name="display">
- <xsl:if test="not(key('request-param','eventList')) or key('request-param','eventList') = ''">none</xsl:if>
- </xsl:variable>
- <xsl:value-of select="key('request-param','suppressionDetails')" disable-output-escaping="yes"/>
- <xsl:if test="/root/evts/configuration/property[@name='webservice.showTrigger']='true'">
- <dp:list>
- <dp:section>
- <dp:section1>
- <utml:input type="checkbox" name="isTriggerUsed" id="isTriggerUsed" utml:update="true" onclick="getTriggerCall('test');">
- <xts:string id="CLICK_WS_TRIGGER"/>
- </utml:input>
- </dp:section1>
- </dp:section>
- </dp:list>
- </xsl:if>
- </lyt:section>
- </lyt:layout>
- <xsl:choose>
- <!--xsl:when test="/root/soapFault/fault/xts:exception/xts:exceptionCode != '' ">
- <dp:section1>
- <xsl:value-of select="/root/soapFault/fault/xts:exception/xts:exceptionCode"/>
- </dp:section1>
- </xsl:when-->
- <xsl:when test="$hasTask = 'true'">
- <lyt:layout style="1">
- <lyt:section>
- <dp:textarea>
- <dp:section1>
- <xts:string id="DIALOG_WS_OPERATION"/>
- </dp:section1>
- <dp:section2>
- <xsl:choose>
- <xsl:when test="/root/WSDL//Operation">
- <utml:input id="url_serviceName" name="url_serviceName" type="hidden" utml:update="true"/>
- <utml:input id="url_newoperation" name="url_newoperation" type="hidden" utml:update="true"/>
- <utml:input id="url_operation" name="url_operation" type="hidden" utml:update="true"/>
- <utml:input id="url_port" name="url_port" type="hidden">
- <utml:value>
- <xsl:value-of select="/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/@name"/>
- </utml:value>
- </utml:input>
- <utml:select id="url_methods" name="url_methods" onchange="loadMethod(this)">
- <xsl:for-each select="/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/Operation">
- <utml:option>
- <utml:value>
- <xsl:value-of select="xtsext:javascriptencode(string(concat( ../../@name , '?' , ./@uname, '?', ../@name )))"/>
- </utml:value>
- <xsl:value-of select="xtsext:javascriptencode(string(concat( ./@name , ' (' , ../../@name , ')' )))"/>
- </utml:option>
- </xsl:for-each>
- </utml:select>
- </xsl:when>
- <xsl:when test="/root/soapFault">
- <xsl:text>
- <xts:string id="DIALOG_MESSAGE_NOT_AVAILABLE"/>
- </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>
- <xts:string id="DIALOG_MESSAGE_NONE"/>
- </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </dp:section2>
- </dp:textarea>
- </lyt:section>
- </lyt:layout>
- <xsl:if test="not(/root/soapFault)">
- <lyt:layout style="1">
- <lyt:section width="100%">
- <dp:section>
- <xsl:variable name="WSDLOpr">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='url_operation'] != ''">
- <xsl:value-of select="/root/env/param[@name='url_operation']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="count(/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/Operation)>0">
- <xsl:value-of select="/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/Operation[1]/@name"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <agsarg:arguments>
- <displayedPage>web</displayedPage>
- </agsarg:arguments>
- <agsarg:argumentsScript/>
- </dp:section>
- </lyt:section>
- </lyt:layout>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
- <dp:emptyFooter/>
- <script type="text/javascript">
- // function to initialize the script for the contents of the screen
- var operations = new Object();
-
- function init() {
- var cf=parent.getConfigFrame?parent.getConfigFrame():null;
- var fault = '<xsl:value-of select="xtsext:javascriptencode(xtsext:xmlencode(string(/root/soapFault/fault/*[local-name()='exception']/*[local-name()='exceptionMsg'])))"/>' ;
- <xsl:for-each select="/root/soapFault/fault/*[local-name()='exception']/*[local-name()='exceptionMsg']">
- cf.pageErrors[<xsl:value-of select="position()"/>-1] = "<xsl:value-of select="xtsext:javascriptencode(string(.))"/>" ;
- </xsl:for-each>
- if(fault != ''){
- parent.showErrorPage(80);
- return;
- }
-
- var hasTask = <xsl:value-of select="string($hasTask)"/>;
- var url_method_val = '<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='url_methods']))"/>';
- var matchedOldMethod ='old method';
- var isOldIB = false;
- if(url_method_val.indexOf('_[opr]_')<2){
- matchedOldMethod = url_method_val.substring(0, url_method_val.lastIndexOf('?'));
- isOldIB = true;
- }
- <xsl:for-each select="/root/WSDL/Service/PortType[@Binding='SOAPBindingImpl']/Operation">
- var key = "<xsl:value-of select="xtsext:javascriptencode(string(concat( ../../@name , '?' , ./@uname, '?', ../@name )))"/>";
- var obj = new Object();
- obj.url_serviceName = "<xsl:value-of select="xtsext:javascriptencode(string(../../@name))"/>";
- obj.url_operation = "<xsl:value-of select="xtsext:javascriptencode(string(./@uname))"/>";
- if(isOldIB && key.indexOf(matchedOldMethod)>-1){
- //matchedOldMethod = key;
- var index = <xsl:value-of select="position()"/>-1 ;
- index = (index < 0) ? 0 : index;
- document.getElementById("url_methods").selectedIndex = index;
- }
- obj.url_port = "<xsl:value-of select="xtsext:javascriptencode(string(../@name))"/>";
- operations[key] = obj;
- </xsl:for-each>
- if(window.initPromptPage && hasTask) {
- initPromptPage();
- }
- if(<xsl:value-of select="xtsext:javascriptencode(string($isUsingTrigger))"/>){
- //document.getElementById("url_wsdl").value = '';
- document.getElementById("url_wsdl").disabled = true;
- document.getElementById("isTriggerUsed").checked = true;
- }
- }
- function trimString (str) {
- str = this != window? this : str;
- return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
- }
-
- String.prototype.trim = trimString;
- function doRetrieveWS()
- {
- var url = document.getElementById("url_wsdl") ;
- <xsl:variable name="NO_URL_MSG">
- <xts:string id="DIALOG_WS_NO_WSDL"/>
- </xsl:variable>
- if(null!= url){
- var urlVal = url.value;
- urlVal = urlVal.trim();
- if(urlVal.length < 1) {
- var msgWarn = "<xsl:value-of select="xtsext:javascriptencode(string($NO_URL_MSG))"/>";
- // need to trim the message - remove extra spaces
- alert(msgWarn.trim());
- return ;
- }
- }
-
- if(!<xsl:value-of select="xtsext:javascriptencode(string($isUsingTrigger))"/>){
- //We clicked retrieve so Reset the operation name.
- if (document.getElementById("url_operation")) {
- document.getElementById("url_operation").value="";
- document.getElementById("url_serviceName").value="";
- }
- parent.getConfigFrame().loadPage('ags/dialogAdapter.xts', 'maintain');
- }
- loadMethod("url_methods") ;
- }
-
- function setURLValues()
- {
- var methodInput = document.getElementById("url_methods");
- if(methodInput){
- // Selected a new method.
- var s = methodInput.value;
- // get the values from the operation array
- var url_serviceName = operations[s].url_serviceName;
- var url_operation = operations[s].url_operation;
- var url_port = operations[s].url_port;
- var oprName = url_operation;
- //WebServiceTaskRunnable.AGS_WS_OPRN_CONST => _[opr]_ for bug 571678.0
- var n = url_operation.indexOf('_[opr]_');
-
- if(n>0) {
- oprName = url_operation.substring(0, n);
- }
- document.getElementById("url_serviceName").value = url_serviceName;
- document.getElementById("url_operation").value = url_operation;
- document.getElementById("url_port").value = url_port;
- document.getElementById("taskName").value = oprName;
- }
- }
-
- function loadMethod(obj)
- {
- setURLValues();
- document.getElementById("url_newoperation").value = 'true';
- parent.getConfigFrame().loadPage('ags/dialogAdapter.xts', 'maintain');
- }
- // submit the operation and service name
- function leavingDialog(){
- if(window.argumentsLeavingDialog){
- argumentsLeavingDialog();
- }
- setURLValues();
- }
-
- function getTriggerCall(abc){
- var isTrig = document.getElementById("isTriggerUsed") ;
-
- if(isTrig){
- isTrig.value = true;
- document.getElementById("url_wsdl").value = '';
- document.getElementById("url_wsdl").disabled = true;
- parent.getConfigFrame().loadPage('ags/dialogAdapter.xts', 'maintain');
-
- }
- }
- </script>
- </utml:form>
- </xts:transform>
- </markup>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- <xts:delete select="/root/WSDL" mandatory="false"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - special debug block for nested requests
- ===============================================================================================
- -->
- <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
- <!-- Get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="faultHandler" type="fault" processor="XSLT">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="contains(//*, 'CAM-AAA-0055')">
- <fault>
- <passport>timeout</passport>
- </fault>
- </xsl:when>
- <xsl:when test="./*[local-name() = 'exception']/*[local-name() = 'exceptionDetail']/*[local-name() = 'exception']/errorCode = 'cmArchiveEncrypted' or ./*[local-name() = 'exception']/*[local-name() = 'exceptionDetail']/*[local-name() = 'exception']/errorCode = 'cmImportCryptoFailed'">
- <copyFault>
- <xsl:copy-of select="."/>
- </copyFault>
- </xsl:when>
- <xsl:otherwise>
- <soapFault>
- <xsl:copy>
- <xsl:copy-of select="/root/fault"/>
- </xsl:copy>
- </soapFault>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|