Home AMX User Forum NetLinx Studio

SOAP-RESTful protocol with authentication

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

Comments

  • ericmedleyericmedley Posts: 4,177
    Can you make things happen from your computer using a web browser or the manufacturer's software? If so, I'd just WireShark the interaction and you'll see the messages you need. Nothing a little reverse engineering can't take care of.
  • Duncan EllisDuncan Ellis Posts: 161
    Hey Eric

    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
  • IC-STL-JBIC-STL-JB Posts: 21
    Thanks, Duncan... that's exactly what I was looking for! The problem with trying Wireshark, is that since I'm not really emulating something that's onsite, I can't snoop for anything. I just have an API document that says how I SHOULD be able to talk to it! :)
Sign In or Register to comment.