rvi / ONVIFCameraAndroid

Example on how to connect to an ONVIF camera on Android
MIT License
142 stars 68 forks source link

401 Unauthorized #14

Closed a-bellezza closed 3 years ago

a-bellezza commented 4 years ago

Hi, i'm having an issue while using the library version: 1.1.9

I get "HTTP Error: 401 Unauthorized" response while i try to use the getProfile method. Here is the request and the response i see logged:

------------------REQUEST:------------------------- URL: http://192.168.1.167:888/onvif/device_service

Headers: Content-Type text/xml; charset=utf-8 Authorization Digest username="ad-2020@", realm="realm", nonce="nonce", uri="/onvif/device_service", response="1204fe0080c5377e7c5f99d80e788ff8", cnonce="a1b390a149f9085d64598b75f3a9e0f1", nc=00000001, qop="auth"Digest username="ad-2020@", uri="/onvif/device_service", response="1204fe0080c5377e7c5f99d80e788ff8", cnonce="a1b390a149f9085d64598b75f3a9e0f1", nc=00000001, qop="auth"

Body: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://www.w3.org/2003/05/soap-envelope" >

false ------------------------ Response ----------------------------- **Header** WWW-Authenticate: Basic realm="gSOAP Web Service" Server: gSOAP Content-Type: application/soap+xml; charset=utf-8 Content-Length: 1654 Connection: close **BODY** SOAP-ENV:Sender HTTP Error: 401 Unauthorized
rvi commented 3 years ago

Sorry for the late reply, somehow, github notifications are going to my spam folder.

Probably a wrong login/password if you have a 401.