PDA

View Full Version : Get Key



Martinw
07-11-2012, 04:41 PM
XML 2010

To access a website's xml feed I need to get a password everyday and then include it in my data request.

Below is my attempt at the code to get the password. And below that is the html request and response code.

Any help would be greatly appreciated as I really am out of my depth with this stuff

Ta,
Martin

Sub GetKey()

Dim xmldoc As MSXML2.DOMDocument
Dim XML As Object

Set xmldoc = New MSXML2.DOMDocument

xmldoc.async = False

xmldoc.Load ("")

Set deviceId = 10000012
Set jurisdictionId = 2
Set requestChannel = 1
Set accountId = 123456
Set accountPassword = pass2




'Set XML = server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
'The username and password are the 4th and 5th parameters respectivly
'XML.Open "GET", strURL, False, strUsername, strPassword
'XML.send ("")

End Sub

<soapenv:Envelope xmlns:ser="" xmlns:soapenv="">
<soapenv:Header/>
<soapenv:Body>
<ser:authenticateAccount>
<apiMeta>
<!--Optional:-->
<deviceId>1000001</deviceId>
<jurisdictionId>2</jurisdictionId>
<requestChannel>1</requestChannel>
</apiMeta>
<authRequest>
<accountId>1471594</accountId>
<accountPassword>password02</accountPassword>
</authRequest>
</ser:authenticateAccount>
</soapenv:Body>
</soapenv:Envelope>

<soap:Envelope xmlns:soap="">
<soap:Body>
<ns2:authenticateAccountResponse xmlns:ns2="">
<return>
<accountBalance>1471380.4</accountBalance>
<accountId>1471594</accountId>
<emailId>rabbit@rabbittt.com.au</emailId>
<firstName>Rabbit</firstName>
<jurisdictionId>1</jurisdictionId>
<lastName>Better</lastName>
<tierCode>0</tierCode>
<usernamePasswordToken>UOyIk1KngqQ3BKPca3yNYv9xvjblUeQt</usernamePasswordToken>
</return>
</ns2:authenticateAccountResponse>
</soap:Body>
</soap:Envelope>