A
Andy
Hi,
I'm trying to get a users free/busy status from exchange from within a
website and
using the code below, but when I run this a login page from MS Outlook Web
Access is retrieved from the server rather than a XML file containing the
users free/busy status for the specified time period.
I've spent all day looking for solutions to this but I'm stumped. I have
been looking for an Exchange newsgroup but there doesn't seam to be one, does
anyone know if i can post this some where else to get a response from an
Exchange expert.
The Server is 2003, with Exchange 2003.
Any help would be very much appreciated!
Code being run is shown below and was modified from the following location
http://msdn.microsoft.com/library/d...e2k3/_esdk_checking_free_busy_status_http.asp
<%
' Initialize variables.
' The public folder server that contains the user's free/busy information.
strServer = "????????????"
' The user's e-mail address.
strUser = "andy.long@????????????.co.uk"
' Build the URL with the freebusy command. Specify a start date/time of
' 08:00 (UTC) 27 Sep 2004, an end date/time of 20:00 (UTC) 27 Sep 2004, an
' interval of 60 minutes, and the e-mail address of the user. Multiple
' e-mail addresses can be specified by appending one or more
' "&u=SMTP:[email protected]" command parameter values to the URL string.
strUrl="https://" & strServer & "/public/?cmd=freebusy" & _
"&start=2006-10-24T08:00:00Z" & _
"&end=2006-10-24T20:00:00Z" & _
"&interval=60" & _
"&u=SMTP:" & strUser ' & "&u=SMTP:[email protected]"
' Initialize the XMLHTTP object.
set objRequest=createobject("Msxml2.ServerXMLHTTP")
' Open the request object with the GET method and
' specify that it will be sent asynchronously.
objRequest.open "GET", strUrl, false
' Set the Content-Type header.
objRequest.setRequestHeader "Content-Type", "text/xml"
' Set the Content-Length header.
objRequest.setRequestHeader "Content-Length", 0
' Set the Accept-language header.
objRequest.setRequestHeader "Accept-Language", "en-us"
' Send the GET method request.
objRequest.send
' The request was successful.
If 200 = objRequest.status Then
' Uncomment this line to see the XML response.
response.write(objRequest.responsetext)
' Create the DOM document.
Set objDoc = createobject("msxml2.domdocument")
' Load the XML response body.
If objDoc.loadXml(objRequest.ResponseText) Then
' Build a list of the WM:item XML nodes, corresponding to the
' returned user and free/busy information of the freebusy
' command. The WM: namespace is typically assigned the a: prefix
' in the XML response body. The namespaces and their associated
' prefixes are located in the attributes of the WM:response node
' of the XML response.
Set objNodeList=objDoc.selectNodes("//a:item")
' Iterate through the WM:item nodes.
For Each objItemNode In objNodeList
' Use an XPath query to get the WM:displayname node
' from the WM:item node.
set objDisplayNode = objItemNode.selectSingleNode("a:displayname")
' Use an XPath query to get the WM:fbdata node
' from the WM:item node.
set objFBNode = objItemNode.selectSingleNode("a:fbdata")
' Display free/busy information.
response.write("Display name: " & objDisplayNode.Text)
response.write("Free/busy data: " & objFBNode.Text)
response.write("<br>")
Next
End If
Else
response.write(objRequest.status & " " & objRequest.statustext)
End if
' Clean up.
Set objRequest = nothing
Set objDoc = nothing
%>
I'm trying to get a users free/busy status from exchange from within a
website and
using the code below, but when I run this a login page from MS Outlook Web
Access is retrieved from the server rather than a XML file containing the
users free/busy status for the specified time period.
I've spent all day looking for solutions to this but I'm stumped. I have
been looking for an Exchange newsgroup but there doesn't seam to be one, does
anyone know if i can post this some where else to get a response from an
Exchange expert.
The Server is 2003, with Exchange 2003.
Any help would be very much appreciated!
Code being run is shown below and was modified from the following location
http://msdn.microsoft.com/library/d...e2k3/_esdk_checking_free_busy_status_http.asp
<%
' Initialize variables.
' The public folder server that contains the user's free/busy information.
strServer = "????????????"
' The user's e-mail address.
strUser = "andy.long@????????????.co.uk"
' Build the URL with the freebusy command. Specify a start date/time of
' 08:00 (UTC) 27 Sep 2004, an end date/time of 20:00 (UTC) 27 Sep 2004, an
' interval of 60 minutes, and the e-mail address of the user. Multiple
' e-mail addresses can be specified by appending one or more
' "&u=SMTP:[email protected]" command parameter values to the URL string.
strUrl="https://" & strServer & "/public/?cmd=freebusy" & _
"&start=2006-10-24T08:00:00Z" & _
"&end=2006-10-24T20:00:00Z" & _
"&interval=60" & _
"&u=SMTP:" & strUser ' & "&u=SMTP:[email protected]"
' Initialize the XMLHTTP object.
set objRequest=createobject("Msxml2.ServerXMLHTTP")
' Open the request object with the GET method and
' specify that it will be sent asynchronously.
objRequest.open "GET", strUrl, false
' Set the Content-Type header.
objRequest.setRequestHeader "Content-Type", "text/xml"
' Set the Content-Length header.
objRequest.setRequestHeader "Content-Length", 0
' Set the Accept-language header.
objRequest.setRequestHeader "Accept-Language", "en-us"
' Send the GET method request.
objRequest.send
' The request was successful.
If 200 = objRequest.status Then
' Uncomment this line to see the XML response.
response.write(objRequest.responsetext)
' Create the DOM document.
Set objDoc = createobject("msxml2.domdocument")
' Load the XML response body.
If objDoc.loadXml(objRequest.ResponseText) Then
' Build a list of the WM:item XML nodes, corresponding to the
' returned user and free/busy information of the freebusy
' command. The WM: namespace is typically assigned the a: prefix
' in the XML response body. The namespaces and their associated
' prefixes are located in the attributes of the WM:response node
' of the XML response.
Set objNodeList=objDoc.selectNodes("//a:item")
' Iterate through the WM:item nodes.
For Each objItemNode In objNodeList
' Use an XPath query to get the WM:displayname node
' from the WM:item node.
set objDisplayNode = objItemNode.selectSingleNode("a:displayname")
' Use an XPath query to get the WM:fbdata node
' from the WM:item node.
set objFBNode = objItemNode.selectSingleNode("a:fbdata")
' Display free/busy information.
response.write("Display name: " & objDisplayNode.Text)
response.write("Free/busy data: " & objFBNode.Text)
response.write("<br>")
Next
End If
Else
response.write(objRequest.status & " " & objRequest.statustext)
End if
' Clean up.
Set objRequest = nothing
Set objDoc = nothing
%>