Ankündigung

Einklappen
Keine Ankündigung bisher.

SOAP-ERROR: Encoding: Can't decode apache map, missing key

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • SOAP-ERROR: Encoding: Can't decode apache map, missing key

    Hallo,

    ich versuche mich gerade seit ein paar Tagen in das Thema SOAP ein zu arbeiten. Die ersten Gehversuche waren auch recht erfolgreich, aber nun komme ich zu einem Fehler, bei dem ich nicht weiter weiß.

    Die Sachlage sieht bei mir gerade so aus, ich erstelle erfolgreich eine Logging-ID (handle) und rufe danach die Funktion "BasicDataImportEx" auf. Die Funktion führt im Hintergrund auch ihre Aufgabe aus. Aber mein PHP Script fängt eine Exception mit der ich und google nichts anfangen kann.

    SOAP-ERROR: Encoding: Can't decode apache map, missing key
    Folgenden PHP Code verwende ich aktuell:
    PHP-Code:
    <?php
        
    // Logging-ID besorgen
        
    $soapclient = new SoapClient("./Connection.wsdl", array('encoding'=>'UTF-8'));
        
    $id     $soapclient->OpenConnection("User""123456789""DB""""""");
        echo 
    "Login ID: " .$id "<br>";

        
    // Stammdateninformation an SOAP-Server senden
        
    $parm2 = new SoapVar(array("... Stammdateninformationen ...") , SOAP_ENC_ARRAY);
        
    $soapclient = new SoapClient("./Common.wsdl", array('encoding'=>'UTF-8'));
        try{
            
    $timeseries $soapclient->BasicDataImportEx($id"... Stammdatenheader ..."$parm2 );
        }  catch (
    SoapFault $fault) {
            
    trigger_error("SOAP-Fehler: (Fehlernummer: {$fault->faultcode}, "
                
    ."Fehlermeldung: {$fault->faultstring})"E_USER_ERROR);
        }

        
    // Ausloggen
        
    $soapclient = new SoapClient("./Connection.wsdl");
        
    $id     $soapclient->CloseConnection($id);
    ?>
    Die Funktionen sind wie folgt definiert:
    Code:
    Int32 Connection.OpenConnection  ( String  username,  String  password,  String  mandant,  String  client, String  user,  String  computer)
    Code:
    KdnSoapHandler.KMap [] Common.BasicDataImportEx  ( Int32  handle,  string  strBDHeader,  string[]  strBDData,  out string  strError)
    Code:
    void Connection.CloseConnection  ( Int32  Handle)
    Wenn ich die Funktionen über SOAP-UI aufrufe, sende ich folgendes XML
    Code:
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bel="EAI" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
       <soapenv:Header/>
       <soapenv:Body>
          <bel:BasicDataImportEx soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
             <handle xsi:type="xsd:int">226412992</handle>
             <strBDHeader xsi:type="xsd:string">... Stammdatenheader ...</strBDHeader>
             <strBDData xsi:type="bel:ArrayOfString" soapenc:arrayType="xsd:string[1]">
             	<item>... Stammdateninformation ...</item>
             </strBDData>
          </bel:BasicDataImportEx>
       </soapenv:Body>
    </soapenv:Envelope>
    und bekomme folgende Antwort zurück:
    Code:
    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0">
       <SOAP-ENV:Body>
          <i2:BasicDataImportEx id="ref-1" xmlns:i2="BasicDataImportEx">
             <return href="#ref-4"/>
             <strError/>
          </i2:BasicDataImportEx>
          <SOAP-ENC:Array id="ref-4" SOAP-ENC:arrayType="i3:Map[1]" xmlns:ns2="http://soapinterop.org/" xmlns:i3="http://xml.apache.org/xml-soap">
             <item href="#ref-5"/>
          </SOAP-ENC:Array>
          <multiRef id="ref-5" SOAP-ENC:root="0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:Map" xmlns:ns4="http://xml.apache.org/xml-soap">
             <item href="#ref-7"/>
             <item href="#ref-8"/>
          </multiRef>
          <i3:Entry id="ref-7" xmlns:i3="http://xml.apache.org/xml-soap">
             <key xsi:type="xsd:string">IDENT</key>
             <value xsi:type="xsd:string">37797</value>
          </i3:Entry>
          <i3:Entry id="ref-8" xmlns:i3="http://xml.apache.org/xml-soap">
             <key xsi:type="xsd:string">LOGGING</key>
             <value xsi:type="xsd:string">[INFO] 23.10.2014 08:52:56 [0003-0526] Zeile 000000 - Stammdatensatz wurde angelegt</value>
          </i3:Entry>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Ich vermute, dass PHP mit dem Rückgabe-Typ "KdnSoapHandler.KMap []" der Funktion BasicDataImportEx nicht zurecht kommt.

    Könnte mir bitte jemand einen Tipp geben, inwieweit ich meine Quellcode anpassen muss, damit der Fehler nicht mehr auftritt?

    Danke & mfG
    Net Hans
Lädt...
X