[GELÖST] SOAP und FRITZ!Box



  • Hi,
    ich würde gerne meinen Online-Zustand,... bei meiner FRITZ!Box
    abfragen und möchte das mit SOAP realisieren.
    Die zu sendende Nachricht sollte wie folgt aussehen

    POST /upnp/control/WANIPConn1 HTTP/1.1 
    HOST: fritz.box:49000 
    CONTENT-LENGTH: 273 
    CONTENT-TYPE: text/xml; charset="utf-8" 
    SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#GetStatusInfo"
    
    <?xml version="1.0" encoding="utf-8"?> 
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
     <s:Body> 
       <u:GetStatusInfo xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /> 
     </s:Body> 
    </s:Envelope>
    

    das ganze habe ich in einem String gespeichert und schicke den Inhalt dann an meine Fritz.box

    POST /upnp/control/WANIPConn1 HTTP/1.1\r\nHOST: fritz.box:49000\r\nCONTENT-LENGTH: 279\r\nCONTENT-TYPE: text/xml; charset=\"utf-8\"\r\nSOAPACTION: \"urn:schemas-upnp-org:service:WANIPConnection:1#GetStatusInfo\"\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\r\n <s:Body>\r\n<u:GetStatusInfo xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\" />\r\n</s:Body>\r\n</s:Envelope>\r\n
    

    als Antwort erhalte ich allerdings jedes mal die Fehlermeldung:

    HTTP/1.1 404 Not Found
    Content-Length: 4252
    Content-Type: text/html
    
    [...]<p>Die angegebene URL wurde nicht gefunden.<p>[...]
    

    Wo liegt der Fehler?? 😞 😕



  • hat sich erledigt - anfängerfehler. lag am port


Anmelden zum Antworten