Browse Source

c11 export und merge

- c11 export in Content/Reports für Vergleich
- Prüfung auf Fehler
- merge nach Ausführungsplan und mit klaren Namen
gc-server3 1 year ago
parent
commit
ec02e4abf9
8 changed files with 822 additions and 44 deletions
  1. 4 4
      c11.py
  2. 25 5
      cognos11/c11_api.py
  3. 42 33
      cognos11/c11_export.py
  4. 254 0
      cognos11/examples/F.01_request2.xml
  5. 475 0
      cognos11/examples/F.01_response.xml
  6. 2 2
      config/config.py
  7. BIN
      dist/c11.exe
  8. 20 0
      pdf/pdf_merge.py

+ 4 - 4
c11.py

@@ -3,7 +3,6 @@ import cognos11
 from pdf import pdf_merge, pdf_test
 import plac
 from enum import Enum
-from pprint import pprint
 
 
 class ExportFormat(Enum):
@@ -31,13 +30,13 @@ class C11:
 
     def reportoutput(self, folder=""):
         exp = cognos11.c11_export(self.cfg)
-        folder2 = exp.get_folder(folder)
+        # folder2 = exp.get_folder(folder)
         req_plan = exp.get_folder_pdf_request_plan(folder)
         exp.execute_request_plan(req_plan)
         pdf_test.missing_data(self.cfg.cognos11.reportoutput_dir + "/" + folder)
         merge_group = exp.get_merge_group(req_plan)
-        pprint(merge_group)
-        pdf_merge.merge_reports_in_folder(self.cfg, folder2)
+        pdf_merge.pdf_merge_files(merge_group)
+        # pdf_merge.merge_reports_in_folder(self.cfg, folder2)
 
     def merge(self, folder="", config=""):
         folder2 = cognos11.c11_export.get_folder(folder)
@@ -61,3 +60,4 @@ class C11:
 
 if __name__ == "__main__":
     plac.Interpreter.call(C11)
+    # C11().export()

+ 25 - 5
cognos11/c11_api.py

@@ -111,6 +111,7 @@ class c11_api:
                 "defaultName",
                 "defaultDescription",
                 "type",
+                "modificationTime",
                 "target.id",
                 "target.searchPath",
                 "target.defaultName",
@@ -138,6 +139,7 @@ class c11_api:
                     "id": f["id"],
                     "name": f["defaultName"].replace("/", "-"),
                     "description": f["defaultDescription"],
+                    "modified": f["modificationTime"],
                     "path": prefix,
                     "type": f["type"],
                 }
@@ -286,35 +288,53 @@ class c11_api:
         if r.status_code == 500:
             bs = BeautifulSoup(r.text, "xml")
             report["error"] = bs.find_all("messageString")[0].string
+            logging.error(f"{report['path']}/{report['name']}")
             logging.error(report["error"])
             return report
 
         parts = decoder.MultipartDecoder.from_response(r).parts
 
         meta = {"required": {}, "optional": {}}
+
+        bs = BeautifulSoup(parts[0].content, "xml")
+        result = bs.find("bus:result")
+        details = result.find("bus:primaryRequest")
+        params = details.find("bus:parameters")
+        for item in params.find_all("item"):
+            if item["xsi:type"] != "bus:parameterValue":
+                continue
+            k = item.find("bus:name").text
+            # v = item.find("bus:value").find_all("item")
+            v = {}
+            for opt in item.find("bus:value").find_all("item"):
+                if opt.find("bus:display") is not None:
+                    v[opt.find("bus:use").text] = opt.find("bus:display").text
+                else:
+                    v[opt.find("bus:use").text] = opt.find("bus:use").text
+            if len(v.items()) > 0:
+                meta["required"][k] = v
+
         bs = BeautifulSoup(parts[1].content, "lxml")
 
         for sv in bs.find_all("selectvalue"):
             k = sv["parameter"]
-            req = "required" if sv["required"] == "true" else "optional"
             v = dict(
                 [
-                    (opt["usevalue"], opt["displayvalue"])
+                    (opt["usevalue"], opt.get("displayvalue", ""))
                     for opt in sv.find_all("selectoption")
                 ]
             )
-            meta[req][k] = v
+            meta["optional"][k] = v
 
         for sv in bs.find_all("selectdate"):
             k = sv["parameter"]
-            req = "required" if sv["required"] == "true" else "optional"
             v = dict(
                 [
                     (opt["usevalue"], opt.get("displayvalue", ""))
                     for opt in sv.find_all("selectoption")
                 ]
             )
-            meta[req][k] = v
+            meta["optional"][k] = v
         filename = (
             self.cfg.cognos11.config_dir
             + f"/params/{report['path']}/{report['name']}.json"

+ 42 - 33
cognos11/c11_export.py

@@ -30,13 +30,13 @@ class c11_export:
             self.api = c11_api(cfg).login()
 
         now = datetime.now().strftime("%Y%m%d_%H%M%S")
-        prot_file = f"{self.cfg.cognos11.logs_dir}/error_{now}.log"
+        prot_file = f"{self.cfg.cognos11.logs_dir}/c11_export_{now}.log"
         os.makedirs(self.cfg.cognos11.logs_dir, exist_ok=True)
         logging.basicConfig(
             filename=prot_file,
             filemode="w",
             encoding="utf-8",
-            level=logging.DEBUG,
+            level=logging.INFO,
             force=True,
         )
 
@@ -52,16 +52,30 @@ class c11_export:
         folder = self.get_folder(folder, "XML")
         reports = self.api.get_reports_in_folder(folder, True)
         for r in reports:
-            print(r["name"])
             self.export_unstubbed(r["id"])
 
     def export_unstubbed(self, report_id):
         report = self.api.get_report(report_id)
+        if "error" in report:
+            return
+
+        params = self.get_params(report, {})
+        request = ReportRequest(
+            report["id"], params, report["filename"], report["format"]
+        )
+        # test if execution of report is possible
+        self.request_and_save_file(request, save=False)
+
+        filename = (
+            f"{self.cfg.cognos11.specs_dir}/{report['path']}/{report['name']}.xml"
+        )
+        modified = datetime.fromisoformat(report["modified"]).timestamp()
+        if Path(filename).exists() and Path(filename).stat().st_mtime > modified:
+            return
+
         unstubbed_report = self.api.request_unstubbed(report_id)
         if unstubbed_report:
-            filename = (
-                f"{self.cfg.cognos11.specs_dir}/{report['path']}/{report['name']}.xml"
-            )
+            print(f"{report['path']}/{report['name']}")
             os.makedirs(os.path.dirname(filename), exist_ok=True)
             with open(filename, "w") as f:
                 f.write(unstubbed_report)
@@ -69,7 +83,7 @@ class c11_export:
     def get_folder_pdf_request_plan(self, folder=""):
         folder = self.get_folder(folder, "PDF")
         reports = self.api.get_reports_in_folder(folder, True)
-        return [self.export_pdf(r) for r in reports]
+        return [self.export_pdf(r["id"]) for r in reports]
 
     def export_pdf(self, report_id, folder=None):
         report = self.api.get_report(report_id)
@@ -81,28 +95,16 @@ class c11_export:
             json.dump(report, open("dump.json", "w"), indent=2)
         if "meta" not in report:
             logging.warning(report["name"] + " is not accessible!")
-            return False
-        params = {}
-        if len(report["meta"]["required"]) > 0:
-            if set(report["meta"]["required"].keys()) != {"p_Von", "p_Bis"}:
-                return False
-            params["p_Von"] = {"2022-10-12": "12.10.2022"}
-            params["p_Bis"] = {"2022-10-12": "12.10.2022"}
-            # params["p_Zeitraum"] = {"Einzelne Monate": "Einzelne Monate"}
-
-            for k, v in report["meta"]["optional"].items():
-                if k in ["p_Zeit", "p_Auswahl_Monate", "p_12_Monate"]:
-                    for k1, v1 in reversed(v.items()):
-                        if v1 != "Invalid Dates":
-                            params[k] = {k1: v1}
-                            continue  # use last element only
+            return []
 
         if len(report["params"]) == 0:
             filename = report["filename"]
+            params = self.get_params(report, {})
             return [ReportRequest(report["id"], params, filename, report["format"])]
         result = []
         if len(report["params"]) == 1:
             filename = report["filename"].format("_Summe")
+            params = self.get_params(report, {})
             result.append(
                 ReportRequest(report["id"], params, filename, report["format"])
             )
@@ -110,13 +112,14 @@ class c11_export:
             key1 = report["params"][0]
             for k1, v1 in report["meta"]["optional"][key1].items():
                 filename = report["filename"].format(v1)
-                params[key1] = {k1: v1}
+                params = self.get_params(report, {key1: {k1: v1}})
                 result.append(
                     ReportRequest(report["id"], params, filename, report["format"])
                 )
             return result
         if len(report["params"]) == 2:
             filename = report["filename"].format("_Summe", "").replace("_.", ".")
+            params = self.get_params(report, {})
             result.append(
                 ReportRequest(report["id"], params, filename, report["format"])
             )
@@ -124,26 +127,30 @@ class c11_export:
             key1, key2 = report["params"]
             for k1, v1 in report["meta"]["optional"][key1].items():
                 filename = report["filename"].format(v1, "_Summe")
-                params = {}
-                params[key1] = {k1: v1}
+                params = self.get_params(report, {key1: {k1: v1}})
                 result.append(
                     ReportRequest(report["id"], params, filename, report["format"])
                 )
 
                 for k2, v2 in report["meta"]["optional"][key2].items():
                     filename = report["filename"].format(v1, v2)
-                    params[key2] = {k2: v2}
+                    params = self.get_params(report, {key1: {k1: v1}, key2: {k2: v2}})
                     result.append(
                         ReportRequest(report["id"], params, filename, report["format"])
                     )
             return result
 
+    def get_params(self, report, optional_params):
+        params = report["meta"]["required"].copy()
+        params.update(optional_params)
+        return params
+
     def execute_request_plan(self, req_plan):
         for req_group in req_plan:
             for report_req in req_group:
                 self.request_and_save_file(report_req)
 
-    def request_and_save_file(self, report_request: ReportRequest):
+    def request_and_save_file(self, report_request: ReportRequest, save=True):
         logging.debug(report_request.filename)
         logging.debug(report_request.params)
         status_code, content = self.api.request_file(
@@ -151,12 +158,14 @@ class c11_export:
             report_request.params,
             report_request.report_format,
         )
-        if status_code == 200:
-            os.makedirs(os.path.dirname(report_request.filename), exist_ok=True)
-            with open(report_request.filename, "wb") as f:
-                f.write(content)
-        else:
-            logging.warning(content)
+        if status_code != 200:
+            return
+
+        if not save:
+            return
+        os.makedirs(os.path.dirname(report_request.filename), exist_ok=True)
+        with open(report_request.filename, "wb") as f:
+            f.write(content)
 
     def get_merge_group(self, req_plan):
         res = {}

+ 254 - 0
cognos11/examples/F.01_request2.xml

@@ -0,0 +1,254 @@
+<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:bus='http://developer.cognos.com/schemas/bibus/3/' xmlns:rns1='http://developer.cognos.com/schemas/reportService/1'>
+    <SOAP-ENV:Header>
+        <bus:biBusHeader xsi:type="bus:biBusHeader">
+            <bus:CAM xsi:type="bus:CAM">
+                <authenticityToken xsi:type="xsd:base64Binary">VjGmR9j05/vgQbead0Lzfcy56A77HW7gZc5js22tDMhGmw==</authenticityToken>
+            </bus:CAM>
+            <bus:CAF xsi:type="bus:CAF">
+                <contextID xsi:type="xsd:string">CAFW000000a0Q0FGQTYwMDAwMDAwMDlBaFFBQUFBR0kzQnZCQmZtZWhCQlBFdFB0d3owU1FrUUpBY0FBQUJUU0VFdE1qVTJJQUFBQUtQZS1JWk1YVDlPU0tuRzM2YWQxVnVLcEI2Ti14SSp4eHpmS1BMQmk1R000NzA5NDF8cnM_</contextID>
+            </bus:CAF>
+            <bus:hdrSession xsi:type="bus:hdrSession">
+                <bus:formFieldVars SOAP-ENC:arrayType="bus:formFieldVar[]" xsi:type="SOAP-ENC:Array">
+                    <item xsi:type="bus:formFieldVar">
+                        <name xsi:type="xsd:string">_ContextBlockSize</name>
+                        <value xsi:type="xsd:string">1000000</value>
+                    </item>
+                    <item xsi:type="bus:formFieldVar">
+                        <name xsi:type="xsd:string">ignoreXHTMLStrict</name>
+                        <value xsi:type="xsd:string">true</value>
+                    </item>
+                </bus:formFieldVars>
+            </bus:hdrSession>
+            <bus:userPreferenceVars SOAP-ENC:arrayType="bus:userPreferenceVar[]" xsi:type="SOAP-ENC:Array">
+                <item>
+                    <bus:name xsi:type="xsd:string">productLocale</bus:name>
+                    <bus:value xsi:type="xsd:string">de</bus:value>
+                </item>
+                <item>
+                    <bus:name xsi:type="xsd:string">contentLocale</bus:name>
+                    <bus:value xsi:type="xsd:string">de</bus:value>
+                </item>
+            </bus:userPreferenceVars>
+            <bus:dispatcherTransportVars xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:dispatcherTransportVar[]">
+                <item xsi:type="bus:dispatcherTransportVar">
+                    <name xsi:type="xsd:string">rs</name>
+                    <value xsi:type="xsd:string">true</value>
+                </item>
+            </bus:dispatcherTransportVars>
+            <bus:tracking xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:tracking">
+                <bus:conversationContext xsi:type="bus:conversationContext">
+                    <bus:affinityStrength xsi:type="xs:int">5000</bus:affinityStrength>
+                    <bus:id xsi:type="xs:string">ldC2Gj8222Md2lydvjql28G8hw2ds8ljMq9Gwl84</bus:id>
+                    <bus:nodeID xsi:type="xs:string">102</bus:nodeID>
+                    <bus:processID xsi:type="xs:int">26508</bus:processID>
+                    <bus:status xsi:type="xs:string">complete</bus:status>
+                </bus:conversationContext>
+                <bus:hopCount xsi:type="xs:integer">0</bus:hopCount>
+                <bus:providers xsi:type="SOAP-ENC:Array" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:arrayType="bus:provider[0]"/>
+                <bus:requestContext xsi:type="xs:string">ldC2Gj8222Md2lydvjql28G8hw2ds8ljMq9Gwl84</bus:requestContext>
+                <bus:sessionContext xsi:type="xs:string">f:0:77D0F8F4F45FAF9745AE47FD67CA731C997EC8C5711A8D93EB39879E15827E1C</bus:sessionContext>
+            </bus:tracking>
+        </bus:biBusHeader>
+    </SOAP-ENV:Header>
+    <SOAP-ENV:Body>
+        <rns1:forward>
+            <bus:conversation xsi:type="bus:asynchRequest">
+                <bus:name xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">run</bus:name>
+                <bus:objectPath xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:searchPathSingleObject">storeID("i39DBC461C1064EB0A31EB37F3739BAB2")</bus:objectPath>
+                <bus:options xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SOAP-ENC:Array" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:arrayType="bus:option[15]">
+                    <item xsi:type="bus:asynchOptionInt">
+                        <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
+                        <bus:value xsi:type="xs:int">5</bus:value>
+                    </item>
+                    <item xsi:type="bus:asynchOptionInt">
+                        <bus:name xsi:type="bus:asynchOptionEnum">secondaryWaitThreshold</bus:name>
+                        <bus:value xsi:type="xs:int">30</bus:value>
+                    </item>
+                    <item xsi:type="bus:runOptionStringArray">
+                        <bus:name xsi:type="bus:runOptionEnum">outputFormat</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xs:string[1]">
+                            <item xsi:type="xs:string">XHTML</item>
+                        </bus:value>
+                    </item>
+                    <item xsi:type="bus:asynchOptionEncoding">
+                        <bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>
+                        <bus:value xsi:type="bus:encodingEnum">MIME</bus:value>
+                    </item>
+                    <item xsi:type="bus:runOptionAnyURI">
+                        <bus:name xsi:type="bus:runOptionEnum">xslURL</bus:name>
+                        <bus:value xsi:type="xs:string">V5html_viewer.xsl</bus:value>
+                    </item>
+                    <item xsi:type="bus:runOptionString">
+                        <bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>
+                        <bus:value xsi:type="xs:string">XHTMLFRGMT</bus:value>
+                    </item>
+                    <item xsi:type="bus:runOptionAnyURI">
+                        <bus:name xsi:type="bus:runOptionEnum">outputLocation</bus:name>
+                        <bus:value xsi:type="xs:string">http://developer.cognos.com/ceba/constants/temporaryObjectLocationEnum#serverFileSystem</bus:value>
+                    </item>
+                    <item xsi:type="bus:runOptionData">
+                        <bus:name xsi:type="bus:runOptionEnum">data</bus:name>
+                        <bus:value xsi:type="bus:dataEnum">runWithAllData</bus:value>
+                    </item>
+                    <item xsi:type="bus:genericOptionBoolean">
+                        <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures</bus:name>
+                        <bus:value xsi:type="xs:boolean">false</bus:value>
+                    </item>
+                    <item xsi:type="bus:genericOptionBoolean">
+                        <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled</bus:name>
+                        <bus:value xsi:type="xs:boolean">false</bus:value>
+                    </item>
+                    <item xsi:type="bus:runOptionBoolean">
+                        <bus:name xsi:type="bus:runOptionEnum">returnOutputWhenAvailable</bus:name>
+                        <bus:value xsi:type="xs:boolean">true</bus:value>
+                    </item>
+                    <item xsi:type="bus:runOptionNameValueArray">
+                        <bus:name xsi:type="bus:runOptionEnum">xslParameters</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:nameValue[3]">
+                            <item xsi:type="bus:nameValue">
+                                <bus:name xsi:type="xs:string">CVGateway</bus:name>
+                                <bus:value xsi:type="xs:string">../v1/disp</bus:value>
+                            </item>
+                            <item xsi:type="bus:nameValue">
+                                <bus:name xsi:type="xs:string">renderIntermediateXML</bus:name>
+                                <bus:value xsi:type="xs:string">false</bus:value>
+                            </item>
+                            <item xsi:type="bus:nameValue">
+                                <bus:name xsi:type="xs:string">renderEnvironment</bus:name>
+                                <bus:value xsi:type="xs:string">false</bus:value>
+                            </item>
+                        </bus:value>
+                    </item>
+                    <item xsi:type="bus:genericOptionBoolean">
+                        <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/runOptionEnum#interactive</bus:name>
+                        <bus:value xsi:type="xs:boolean">true</bus:value>
+                    </item>
+                    <item xsi:type="bus:genericOptionAnyURI">
+                        <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/runOptionEnum#promptXslUrl</bus:name>
+                        <bus:value xsi:type="xs:string">V5html_viewer.xsl</bus:value>
+                    </item>
+                    <item xsi:type="bus:runOptionLanguageArray">
+                        <bus:name xsi:type="bus:runOptionEnum">outputLocale</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xs:string[1]">
+                            <item xsi:type="xs:string">de</item>
+                        </bus:value>
+                    </item>
+                </bus:options>
+                <bus:parameters xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SOAP-ENC:Array" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:arrayType="bus:parameterValue[11]">
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Mandant</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Auswahl_Zeitraum</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[1]">
+                            <item xsi:type="bus:simpleParmValueItem">
+                                <bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>
+                                <bus:display xsi:type="xs:string">Einzelne Monate</bus:display>
+                                <bus:use xsi:type="xs:string">Einzelne Monate</bus:use>
+                            </item>
+                        </bus:value>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Kostenträger</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Marke</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Absatzkanal</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Kostenstelle</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Kostenträger_Detail</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Kostenstelle_Detail</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_AH</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Auswahl_Monate</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[1]">
+                            <item xsi:type="bus:simpleParmValueItem">
+                                <bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>
+                                <bus:display xsi:type="xs:string">letzte 13 Monate</bus:display>
+                                <bus:use xsi:type="xs:string">letzte 13 Monate</bus:use>
+                            </item>
+                        </bus:value>
+                    </item>
+                    <item xsi:type="bus:parameterValue">
+                        <bus:name xsi:type="xs:string">p_Absatzkanal_Detail</bus:name>
+                        <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                    </item>
+                </bus:parameters>
+                <bus:specification xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SOAP-ENC:Array" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:arrayType="bus:asynchSpecification[0]"/>
+                <bus:stateData xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:xmlEncodedXML">&lt;stateData&gt;H4sIAAAAAAAA/3VRXU/bMBT9K3lanqC+TmmTiyathQKT+Kga9sJUIce5TT0cO7MdA/v1UwLdtE17u7rnng8fSwDclGtn2y7cNC5Cjlr4sCFTk6P6WrzaPpQMI+d/AG+MtWio5DNcKdOIikS/21lXk+tN4z2pQDAIunfOhjrrRk61QwkZvi1KclFJijzDzgYyQQm9Fk60FMjdipZ8yzDO0Qfr6PO5zzJUWXG+PJvO4AzYbLpaskUGq2U2v8jmWbFcLDlK4EgvwYlr2zTKNLFAUV9ZuRZhPzynwNbWpAf5EqaAE2nN4D3ZWV2T+/rJiJY+ppdn6fav1VrIJ9GQT7eT7m08IBePS9LU0OOiD7a1ldKUbiejz+GEM86PAI44v2fFB2m1NafT/H1g8+MsLx7SbQSGtvpGMgxxPXD+v3wXygjzo+rlfi906E3zT9wbq3XyO1By2VZX6Xbixup/yRwzSFYmPCv5pHvTJA+kgiO1p3SLkgN2TrXCvW7oe08+HDqFDLVt7sak968d+dn7l0aYjUhHTgRlzQjOcfVCsg+EcorOxy5yhjXtRK9DSZrkcOlLCophBMDaKa2/dOf22dwwjDnSC8l71ZKHKcKsOMnyoij4KZzkQ2FGRNWMbh4yhAQSKPI8gYQlMUc/JDeSFCBKYOhFpLs+dH2Ic5TClCJSFWJxmBe+Cog/AXXF0xweAwAA&lt;/stateData&gt;</bus:stateData>
+            </bus:conversation>
+            <bus:parameterValues xmlns:bus='http://developer.cognos.com/schemas/bibus/3/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' SOAP-ENC:arrayType="bus:parameterValue[]" xsi:type="SOAP-ENC:Array">
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Auswahl_Monate</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[1]">
+                        <item xsi:type="bus:simpleParmValueItem">
+                            <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
+                            <bus:use xsi:type="xsd:string">letzte 13 Monate</bus:use>
+                            <bus:display xsi:type="xsd:string">letzte 13 Monate</bus:display>
+                        </item>
+                    </bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Mandant</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_AH</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Marke</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Kostenstelle</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Kostenstelle_Detail</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Absatzkanal</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Absatzkanal_Detail</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Kostenträger</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+                <item xsi:type="bus:parameterValue">
+                    <bus:name xsi:type="xsd:string">p_Kostenträger_Detail</bus:name>
+                    <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"></bus:value>
+                </item>
+            </bus:parameterValues>
+            <bus:options SOAP-ENC:arrayType="bus:option[]" xsi:type="SOAP-ENC:Array">
+                <item xsi:type="bus:runOptionBoolean">
+                    <bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>
+                    <bus:value xsi:type="xsd:boolean">false</bus:value>
+                </item>
+            </bus:options>
+        </rns1:forward>
+    </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>

+ 475 - 0
cognos11/examples/F.01_response.xml

@@ -0,0 +1,475 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
+    <SOAP-ENV:Header>
+        <bus:biBusHeader xsi:type="bus:biBusHeader">
+            <bus:CAF xsi:type="bus:CAF">
+                <bus:contextID xsi:type="xs:string">CAFW000000a0Q0FGQTYwMDAwMDAwMDlBaFFBQUFBR0kzQnZCQmZtZWhCQlBFdFB0d3owU1FrUUpBY0FBQUJUU0VFdE1qVTJJQUFBQUtQZS1JWk1YVDlPU0tuRzM2YWQxVnVLcEI2Ti14SSp4eHpmS1BMQmk1R000NzA5NDF8cnM_</bus:contextID>
+            </bus:CAF>
+            <bus:CAM xsi:type="bus:CAM">
+                <bus:authenticityToken xsi:type="xs:base64Binary">VjGmR9j05/vgQbead0Lzfcy56A77HW7gZc5js22tDMhGmw==</bus:authenticityToken>
+                <bus:CAMPassport xsi:type="bus:CAMPassport">
+                    <bus:canCallLogon xsi:type="xs:boolean">false</bus:canCallLogon>
+                    <bus:generation xsi:type="xs:int">3</bus:generation>
+                    <bus:id xsi:type="xs:string">101:a172f7a2-edb2-ed95-8f8c-8edc3a4384ad:4080599177</bus:id>
+                    <bus:isAnonymous xsi:type="xs:boolean">false</bus:isAnonymous>
+                    <bus:logEnabled xsi:type="xs:boolean">false</bus:logEnabled>
+                </bus:CAMPassport>
+                <bus:roles xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xs:string[0]"/>
+                <bus:settings xsi:type="bus:CAMSettings">
+                    <bus:anonymousAllowed xsi:type="xs:boolean">false</bus:anonymousAllowed>
+                    <bus:namespacesConfigured xsi:type="xs:boolean">true</bus:namespacesConfigured>
+                </bus:settings>
+                <bus:userSessionID xsi:type="xs:base64Binary">AggAAAAQ0xZlAAAAAAoAAABy5gtv3sM+d9lzFAAAAAYjcG8EF+Z6EEE8S0+3DPRJCRAkBwAAAFNIQS0yNTYgAAAApkfY9Of74EG3mndC833MuegO+x1u4GXOY7NtrQzIRps=</bus:userSessionID>
+            </bus:CAM>
+            <bus:dispatcherTransportVars xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:dispatcherTransportVar[]">
+                <item xsi:type="bus:dispatcherTransportVar">
+                    <bus:name xsi:type="xs:string">rs</bus:name>
+                    <bus:value xsi:type="xs:string">true</bus:value>
+                </item>
+                <item xsi:type="bus:dispatcherTransportVar">
+                    <bus:name xsi:type="xs:string">html</bus:name>
+                    <bus:value xsi:type="xs:string">false</bus:value>
+                </item>
+                <item xsi:type="bus:dispatcherTransportVar">
+                    <bus:name xsi:type="xs:string">originalSOAPAction</bus:name>
+                    <bus:value xsi:type="xs:string">http://www.ibm.com/xmlns/prod/cognos/reportService/202004/</bus:value>
+                </item>
+            </bus:dispatcherTransportVars>
+            <bus:hdrSession xsi:type="bus:hdrSession">
+                <bus:environmentVars xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:environmentVar[5]">
+                    <item xsi:type="bus:environmentVar">
+                        <bus:name xsi:type="xs:string">ORIGINAL_CONTENT_LENGTH</bus:name>
+                        <bus:value xsi:type="xs:string">5851</bus:value>
+                    </item>
+                    <item xsi:type="bus:environmentVar">
+                        <bus:name xsi:type="xs:string">WEB_CONTENT_ROOT</bus:name>
+                        <bus:value xsi:type="xs:string"/>
+                    </item>
+                    <item xsi:type="bus:environmentVar">
+                        <bus:name xsi:type="xs:string">SERVER_NAME</bus:name>
+                        <bus:value xsi:type="xs:string">localhost</bus:value>
+                    </item>
+                    <item xsi:type="bus:environmentVar">
+                        <bus:name xsi:type="xs:string">HTTP_ACCEPT_LANGUAGE</bus:name>
+                        <bus:value xsi:type="xs:string">de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7,es;q=0.6</bus:value>
+                    </item>
+                    <item xsi:type="bus:environmentVar">
+                        <bus:name xsi:type="xs:string">Accept-Encoding</bus:name>
+                        <bus:value xsi:type="xs:string">gzip, deflate, br</bus:value>
+                    </item>
+                </bus:environmentVars>
+                <bus:formFieldVars xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:formFieldVar[0]"/>
+                <bus:setCookieVars xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:setCookieVar[0]"/>
+            </bus:hdrSession>
+            <bus:providers xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:provider[0]"/>
+            <bus:tracking xsi:type="bus:tracking">
+                <bus:conversationContext xsi:type="bus:conversationContext">
+                    <bus:affinityStrength xsi:type="xs:int">5000</bus:affinityStrength>
+                    <bus:id xsi:type="xs:string">ldC2Gj8222Md2lydvjql28G8hw2ds8ljMq9Gwl84</bus:id>
+                    <bus:nodeID xsi:type="xs:string">102</bus:nodeID>
+                    <bus:processID xsi:type="xs:int">26508</bus:processID>
+                    <bus:status xsi:type="xs:string">complete</bus:status>
+                </bus:conversationContext>
+                <bus:hopCount xsi:type="xs:integer">0</bus:hopCount>
+                <bus:providers xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:provider[0]"/>
+                <bus:requestContext xsi:type="xs:string">ldC2Gj8222Md2lydvjql28G8hw2ds8ljMq9Gwl84</bus:requestContext>
+                <bus:sessionContext xsi:type="xs:string">f:0:77D0F8F4F45FAF9745AE47FD67CA731C997EC8C5711A8D93EB39879E15827E1C</bus:sessionContext>
+            </bus:tracking>
+            <bus:userCapabilityCache xsi:type="bus:userCapabilityCache">
+                <bus:signature xsi:type="xs:base64Binary">AwcAAABTSEEtMjU2FAAAAAYjcG8EF+Z6EEE8S0+3DPRJCRAkWN+szaUFKJl7wxtdsLQZbFK51iPSiw1j0ZL1oeSSj8U=</bus:signature>
+                <bus:userCapabilities xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:userCapabilityEnum[73]">
+                    <item xsi:type="bus:userCapabilityEnum">canUseAnalysisStudio</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseCognosViewer</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseCognosViewerContextMenu</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseCognosViewerRunWithOptions</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseCognosViewerSelection</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseCognosViewerToolbar</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseDataManager</item>
+                    <item xsi:type="bus:userCapabilityEnum">canReceiveDetailedErrors</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseDrillThroughAssistant</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseEventStudio</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseDashboardViewer</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseDashboardViewerFileManagement</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseGlossary</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseShowHiddenObjectsPreference</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseLineage</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUsePackageDataSources</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseQueryStudio</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseQueryStudioAdvancedMode</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseQueryStudioFileManagement</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseScheduling</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSchedulingPriority</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseObjectCapabilities</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSpecifications</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseConditionalSubscriptions</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseReportStudio</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseBursting</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseReportStudioFileManagement</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseHTML</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseUserDefinedSQL</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseWebBasedModeling</item>
+                    <item xsi:type="bus:userCapabilityEnum">canCreateSnapshots</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUploadFiles</item>
+                    <item xsi:type="bus:userCapabilityEnum">canManageContent</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseInteractiveDashboard</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseExploration</item>
+                    <item xsi:type="bus:userCapabilityEnum">canGenerateCSVOutput</item>
+                    <item xsi:type="bus:userCapabilityEnum">canGeneratePDFOutput</item>
+                    <item xsi:type="bus:userCapabilityEnum">canGenerateXLSOutput</item>
+                    <item xsi:type="bus:userCapabilityEnum">canGenerateXMLOutput</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseMyDataSets</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseMobileAdministration</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseCognosInsight</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseMobileService</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseQueryServiceTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseAdministrationPortal</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseContentStoreTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseServerAdministrationTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseDataSourcesTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseDistributionListsAndContactsTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUsePrintersTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseMonitorActivityTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseCapabilitiesTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUsePortalAdministrationTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseUsersGroupsAndRolesTool</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSchedulingByDay</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSchedulingByHour</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSchedulingByMinute</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSchedulingByMonth</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSchedulingByTrigger</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSchedulingByWeek</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSchedulingByYear</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUsePersonalDataSourceCredentials</item>
+                    <item xsi:type="bus:userCapabilityEnum">canImportRelationalMetadata</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseExternalData</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseSelfServicePackageWizard</item>
+                    <item xsi:type="bus:userCapabilityEnum">canCollaborate</item>
+                    <item xsi:type="bus:userCapabilityEnum">canLaunchCollaborationTools</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseCollaborationFeatures</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUpdateRepositoryRules</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseRepository</item>
+                    <item xsi:type="bus:userCapabilityEnum">canViewContentInRepository</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseAdvancedDashboardFeatures</item>
+                    <item xsi:type="bus:userCapabilityEnum">canUseInteractiveDashboardFeatures</item>
+                </bus:userCapabilities>
+            </bus:userCapabilityCache>
+            <bus:userPreferenceVars xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:userPreferenceVar[18]">
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">linesPerPage</bus:name>
+                    <bus:value xsi:type="xs:string">15</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">listViewSeparator</bus:name>
+                    <bus:value xsi:type="xs:string">none</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">timeZoneID</bus:name>
+                    <bus:value xsi:type="xs:string">Europe/Berlin</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">skin</bus:name>
+                    <bus:value xsi:type="xs:string">corporate</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">showWelcomePage</bus:name>
+                    <bus:value xsi:type="xs:string">true</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">format</bus:name>
+                    <bus:value xsi:type="xs:string">HTML</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">isToolbarDocked</bus:name>
+                    <bus:value xsi:type="xs:string">true</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">showHints</bus:name>
+                    <bus:value xsi:type="xs:string">hideAll</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">backgroundSessionLogging</bus:name>
+                    <bus:value xsi:type="xs:string">1970-01-01 00:00:00</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures</bus:name>
+                    <bus:value xsi:type="xs:string">false</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">displayMode</bus:name>
+                    <bus:value xsi:type="xs:string">list</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled</bus:name>
+                    <bus:value xsi:type="xs:string">false</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">showOptionSummary</bus:name>
+                    <bus:value xsi:type="xs:string">true</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">automaticPageRefresh</bus:name>
+                    <bus:value xsi:type="xs:string">30</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">columnsPerPage</bus:name>
+                    <bus:value xsi:type="xs:string">3</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">productLocale</bus:name>
+                    <bus:value xsi:type="xs:string">de</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">showHiddenObjects</bus:name>
+                    <bus:value xsi:type="xs:string">false</bus:value>
+                </item>
+                <item xsi:type="bus:userPreferenceVar">
+                    <bus:name xsi:type="xs:string">contentLocale</bus:name>
+                    <bus:value xsi:type="xs:string">de</bus:value>
+                </item>
+            </bus:userPreferenceVars>
+        </bus:biBusHeader>
+    </SOAP-ENV:Header>
+    <SOAP-ENV:Body>
+        <rns1:runResponse xmlns:rns1="http://developer.cognos.com/schemas/reportService/1">
+            <bus:result xsi:type="bus:asynchReply">
+                <bus:details xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:asynchDetail[4]">
+                    <item xsi:type="bus:asynchDetailReportStatus">
+                        <bus:status xsi:type="bus:asynchDetailReportStatusEnum">prompting</bus:status>
+                    </item>
+                    <item xsi:type="bus:asynchDetailParameterValues">
+                        <bus:parameters xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[11]">
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Mandant</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Auswahl_Zeitraum</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[1]">
+                                    <item xsi:type="bus:simpleParmValueItem">
+                                        <bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>
+                                        <bus:display xsi:type="xs:string">Einzelne Monate</bus:display>
+                                        <bus:use xsi:type="xs:string">Einzelne Monate</bus:use>
+                                    </item>
+                                </bus:value>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Kostenträger</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Marke</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Absatzkanal</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Kostenstelle</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Kostenträger_Detail</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Kostenstelle_Detail</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_AH</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Auswahl_Monate</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[1]">
+                                    <item xsi:type="bus:simpleParmValueItem">
+                                        <bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>
+                                        <bus:display xsi:type="xs:string">letzte 13 Monate</bus:display>
+                                        <bus:use xsi:type="xs:string">letzte 13 Monate</bus:use>
+                                    </item>
+                                </bus:value>
+                            </item>
+                            <item xsi:type="bus:parameterValue">
+                                <bus:name xsi:type="xs:string">p_Absatzkanal_Detail</bus:name>
+                                <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                            </item>
+                        </bus:parameters>
+                    </item>
+                    <item xsi:type="bus:asynchDetailAsynchSpecification">
+                        <bus:specification xsi:type="bus:reportServiceReportSpecification">
+                            <bus:value xsi:type="bus:specification" href="cid:decoratedSpec"/>
+                        </bus:specification>
+                    </item>
+                    <item xsi:type="bus:asynchDetailReportOutput">
+                        <bus:outputObjects xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:baseClass[0]"/>
+                        <bus:outputPages xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xs:string[1]">
+                            <item xsi:type="xs:string">&lt;href&gt;cid:1&lt;/href&gt;</item>
+                        </bus:outputPages>
+                    </item>
+                </bus:details>
+                <bus:primaryRequest xsi:type="bus:asynchRequest">
+                    <bus:name xsi:type="xs:string">run</bus:name>
+                    <bus:objectPath xsi:type="bus:searchPathSingleObject">storeID("i39DBC461C1064EB0A31EB37F3739BAB2")</bus:objectPath>
+                    <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[15]">
+                        <item xsi:type="bus:asynchOptionInt">
+                            <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
+                            <bus:value xsi:type="xs:int">5</bus:value>
+                        </item>
+                        <item xsi:type="bus:asynchOptionInt">
+                            <bus:name xsi:type="bus:asynchOptionEnum">secondaryWaitThreshold</bus:name>
+                            <bus:value xsi:type="xs:int">30</bus:value>
+                        </item>
+                        <item xsi:type="bus:runOptionStringArray">
+                            <bus:name xsi:type="bus:runOptionEnum">outputFormat</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xs:string[1]">
+                                <item xsi:type="xs:string">XHTML</item>
+                            </bus:value>
+                        </item>
+                        <item xsi:type="bus:asynchOptionEncoding">
+                            <bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>
+                            <bus:value xsi:type="bus:encodingEnum">MIME</bus:value>
+                        </item>
+                        <item xsi:type="bus:runOptionAnyURI">
+                            <bus:name xsi:type="bus:runOptionEnum">xslURL</bus:name>
+                            <bus:value xsi:type="xs:string">V5html_viewer.xsl</bus:value>
+                        </item>
+                        <item xsi:type="bus:runOptionString">
+                            <bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>
+                            <bus:value xsi:type="xs:string">XHTMLFRGMT</bus:value>
+                        </item>
+                        <item xsi:type="bus:runOptionAnyURI">
+                            <bus:name xsi:type="bus:runOptionEnum">outputLocation</bus:name>
+                            <bus:value xsi:type="xs:string">http://developer.cognos.com/ceba/constants/temporaryObjectLocationEnum#serverFileSystem</bus:value>
+                        </item>
+                        <item xsi:type="bus:runOptionData">
+                            <bus:name xsi:type="bus:runOptionEnum">data</bus:name>
+                            <bus:value xsi:type="bus:dataEnum">runWithAllData</bus:value>
+                        </item>
+                        <item xsi:type="bus:genericOptionBoolean">
+                            <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures</bus:name>
+                            <bus:value xsi:type="xs:boolean">false</bus:value>
+                        </item>
+                        <item xsi:type="bus:genericOptionBoolean">
+                            <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled</bus:name>
+                            <bus:value xsi:type="xs:boolean">false</bus:value>
+                        </item>
+                        <item xsi:type="bus:runOptionBoolean">
+                            <bus:name xsi:type="bus:runOptionEnum">returnOutputWhenAvailable</bus:name>
+                            <bus:value xsi:type="xs:boolean">true</bus:value>
+                        </item>
+                        <item xsi:type="bus:runOptionNameValueArray">
+                            <bus:name xsi:type="bus:runOptionEnum">xslParameters</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:nameValue[3]">
+                                <item xsi:type="bus:nameValue">
+                                    <bus:name xsi:type="xs:string">CVGateway</bus:name>
+                                    <bus:value xsi:type="xs:string">../v1/disp</bus:value>
+                                </item>
+                                <item xsi:type="bus:nameValue">
+                                    <bus:name xsi:type="xs:string">renderIntermediateXML</bus:name>
+                                    <bus:value xsi:type="xs:string">false</bus:value>
+                                </item>
+                                <item xsi:type="bus:nameValue">
+                                    <bus:name xsi:type="xs:string">renderEnvironment</bus:name>
+                                    <bus:value xsi:type="xs:string">false</bus:value>
+                                </item>
+                            </bus:value>
+                        </item>
+                        <item xsi:type="bus:genericOptionBoolean">
+                            <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/runOptionEnum#interactive</bus:name>
+                            <bus:value xsi:type="xs:boolean">true</bus:value>
+                        </item>
+                        <item xsi:type="bus:genericOptionAnyURI">
+                            <bus:name xsi:type="xs:string">http://developer.cognos.com/ceba/constants/runOptionEnum#promptXslUrl</bus:name>
+                            <bus:value xsi:type="xs:string">V5html_viewer.xsl</bus:value>
+                        </item>
+                        <item xsi:type="bus:runOptionLanguageArray">
+                            <bus:name xsi:type="bus:runOptionEnum">outputLocale</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xs:string[1]">
+                                <item xsi:type="xs:string">de</item>
+                            </bus:value>
+                        </item>
+                    </bus:options>
+                    <bus:parameters xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[11]">
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Mandant</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Auswahl_Zeitraum</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[1]">
+                                <item xsi:type="bus:simpleParmValueItem">
+                                    <bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>
+                                    <bus:display xsi:type="xs:string">Einzelne Monate</bus:display>
+                                    <bus:use xsi:type="xs:string">Einzelne Monate</bus:use>
+                                </item>
+                            </bus:value>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Kostenträger</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Marke</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Absatzkanal</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Kostenstelle</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Kostenträger_Detail</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Kostenstelle_Detail</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_AH</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Auswahl_Monate</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[1]">
+                                <item xsi:type="bus:simpleParmValueItem">
+                                    <bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>
+                                    <bus:display xsi:type="xs:string">letzte 13 Monate</bus:display>
+                                    <bus:use xsi:type="xs:string">letzte 13 Monate</bus:use>
+                                </item>
+                            </bus:value>
+                        </item>
+                        <item xsi:type="bus:parameterValue">
+                            <bus:name xsi:type="xs:string">p_Absatzkanal_Detail</bus:name>
+                            <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[0]"/>
+                        </item>
+                    </bus:parameters>
+                    <bus:specification xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:asynchSpecification[0]"/>
+                    <bus:stateData xsi:type="bus:xmlEncodedXML">&lt;stateData&gt;H4sIAAAAAAAA/3VRXU/bMBT9K3lanqC+TmmTiyathQKT+Kga9sJUIce5TT0cO7MdA/v1UwLdtE17u7rnng8fSwDclGtn2y7cNC5Cjlr4sCFTk6P6WrzaPpQMI+d/AG+MtWio5DNcKdOIikS/21lXk+tN4z2pQDAIunfOhjrrRk61QwkZvi1KclFJijzDzgYyQQm9Fk60FMjdipZ8yzDO0Qfr6PO5zzJUWXG+PJvO4AzYbLpaskUGq2U2v8jmWbFcLDlK4EgvwYlr2zTKNLFAUV9ZuRZhPzynwNbWpAf5EqaAE2nN4D3ZWV2T+/rJiJY+ppdn6fav1VrIJ9GQT7eT7m08IBePS9LU0OOiD7a1ldKUbiejz+GEM86PAI44v2fFB2m1NafT/H1g8+MsLx7SbQSGtvpGMgxxPXD+v3wXygjzo+rlfi906E3zT9wbq3XyO1By2VZX6Xbixup/yRwzSFYmPCv5pHvTJA+kgiO1p3SLkgN2TrXCvW7oe08+HDqFDLVt7sak968d+dn7l0aYjUhHTgRlzQjOcfVCsg+EcorOxy5yhjXtRK9DSZrkcOlLCophBMDaKa2/dOf22dwwjDnSC8l71ZKHKcKsOMnyoij4KZzkQ2FGRNWMbh4yhAQSKPI8gYQlMUc/JDeSFCBKYOhFpLs+dH2Ic5TClCJSFWJxmBe+Cog/AXXF0xweAwAA&lt;/stateData&gt;</bus:stateData>
+                </bus:primaryRequest>
+                <bus:secondaryRequests xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:asynchSecondaryRequest[3]">
+                    <item xsi:type="bus:asynchSecondaryRequest">
+                        <bus:name xsi:type="xs:string">forward</bus:name>
+                        <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[0]"/>
+                        <bus:parameters xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[0]"/>
+                    </item>
+                    <item xsi:type="bus:asynchSecondaryRequest">
+                        <bus:name xsi:type="xs:string">back</bus:name>
+                        <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[0]"/>
+                        <bus:parameters xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[0]"/>
+                    </item>
+                    <item xsi:type="bus:asynchSecondaryRequest">
+                        <bus:name xsi:type="xs:string">release</bus:name>
+                        <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[0]"/>
+                        <bus:parameters xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[0]"/>
+                    </item>
+                </bus:secondaryRequests>
+                <bus:status xsi:type="bus:asynchReplyStatusEnum">complete</bus:status>
+            </bus:result>
+        </rns1:runResponse>
+    </SOAP-ENV:Body>
+</SOAP-ENV:Envelope>

+ 2 - 2
config/config.py

@@ -45,7 +45,7 @@ class Cognos11Config:
 
 
 def joinpath(path, *other):
-    return str(Path(path).joinpath(*other)).lower()
+    return str(Path(path).joinpath(*other))
 
 
 class Config:
@@ -138,7 +138,7 @@ class Config:
         self.cognos11 = Cognos11Config(
             logs_dir=joinpath(self.log_dir, "c11"),
             reportoutput_dir=joinpath(self.portal_dir, "ReportOutput"),
-            specs_dir=joinpath(self.system_dir, "Report"),
+            specs_dir=joinpath(self.portal_dir, "Content", "Reports"),
             webservice="http://localhost:9300/bi/",
             config_dir=joinpath(self.xml_dir, "c11"),
             folders_file=joinpath(self.xml_dir, "c11", "folders.json"),

BIN
dist/c11.exe


+ 20 - 0
pdf/pdf_merge.py

@@ -3,6 +3,7 @@ from PyPDF2 import PdfMerger
 from pathlib import Path
 import re
 import json
+from datetime import datetime
 
 
 def pdf_merge(base_dir: str, report_name, config=None):
@@ -26,6 +27,25 @@ def pdf_merge(base_dir: str, report_name, config=None):
                 merger.write(target)
 
 
+def pdf_merge_files(file_dict):
+    max_age = datetime.now().timestamp() - 12 * 60 * 60
+
+    for target, file_list in file_dict.items():
+        if target[-4:] != ".pdf":
+            continue
+        pdfs = [
+            f
+            for f in file_list
+            if Path(f).exists() and Path(f).stat().st_mtime > max_age
+        ]
+        if len(pdfs) == 0:
+            continue
+        with PdfMerger() as merger:
+            for pdf in pdfs:
+                merger.append(pdf)
+            merger.write(target)
+
+
 def get_reports(reports_file, folder):
     with open(reports_file, "r") as frh:
         reports = json.load(frh)