SOAP-RESTful protocol with authentication
IC-STL-JB
Posts: 21
Hi,
I tried to search on something related to this first, and couldn't find anything. So, if this is covered somewhere else, sorry! Guess I'm a crappy searcher!
I have an IP based door lock access control system (Intelli-M Access by Infinias) that uses a version of RESTful, which I think is a variant of SOAP to allow XML control. I have not been able to figure out the exact syntax that includes the login information so that I can do lock/unlock commands. I have an API document provided by Infinias, but it's not very descriptive on syntax, and their tech support wants nothing to do with me.
Could anyone offer any sample RESTful/SOAP command strings that included an enveloped username/password combo? Does the info need to be encoded?
Any help would be greatly appreciated... The API word doc they gave me is included below...
thanks,
Jeff B
http://www.infinias.com/main/Products/Intelli-MAccess.aspx
I tried to search on something related to this first, and couldn't find anything. So, if this is covered somewhere else, sorry! Guess I'm a crappy searcher!
I have an IP based door lock access control system (Intelli-M Access by Infinias) that uses a version of RESTful, which I think is a variant of SOAP to allow XML control. I have not been able to figure out the exact syntax that includes the login information so that I can do lock/unlock commands. I have an API document provided by Infinias, but it's not very descriptive on syntax, and their tech support wants nothing to do with me.
Could anyone offer any sample RESTful/SOAP command strings that included an enveloped username/password combo? Does the info need to be encoded?
Any help would be greatly appreciated... The API word doc they gave me is included below...
thanks,
Jeff B
http://www.infinias.com/main/Products/Intelli-MAccess.aspx
0
Comments
Usually you have to provide a username and password in the header, encoded in Base64 and your encoding would listed as basic, followed by your command listing. So you'd get:
'PUT ',sURI,' HTTP/1.1',$0D,$0A,
'HOST: http://',sIPaddress,':',ITOA(nPort),$0D,$0A,
'USER-AGENT: Rest version 1_0 10/04/12',$0D,$0A,
'ACCEPT-LANGUAGE: EN',$0D,$0A,
'AUTHORIZATION : BASIC ',s64,$0D,$0A,
'CONTENT-TYPE: text/xml; charset="utf-8"',$0D,$0A"
followed by your command set - s64 is your base 64 encoded username and password
sURI is the pathname for your command. Ive not see the device you're discussing but maybe this will give you a head start?
REST is never easy because its bulky and the docs are usually pretty rubbish. This is all sent using a HTTP wrapper to the port defined as your port for REST.
Hope this helps
Duncan