exchangefreaks.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Showing "Bad Request" when selecting particular appointment

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications
Author Message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Oct 26, 2007 5:55 am    Post subject: Showing "Bad Request" when selecting particular appointment Reply with quote

I am doing following code:

Dim sQuery As String
Dim status As Integer
Dim oXMLHttp1 As MSXML2.XMLHTTP30 = New MSXML2.XMLHTTP30
Try

oXMLHttp1.open("SEARCH", stURI, False, Me.UserNameAlias,
Me.Password)

sQuery = "" & _
" xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:""> " & _
"SELECT ""DAV:id"", ""DAV:getlastmodified"" " & _
"FROM Scope('SHALLOW TRAVERSAL OF """ & stURI & """')"
& _
"WHERE ""DAV:href"" = """ & strHref & """ " & _
"" & _
""


oXMLHttp1.setRequestHeader("Content-Type", "text/xml")
oXMLHttp1.setRequestHeader("Brief", "t")
' Send the query.
oXMLHttp1.send(sQuery)

status = CheckStatus(oXMLHttp1.status)
If status = En.enStatus.Multi_Status Then
MsgBox(oXMLHttp1.responseText)
End If

Catch ex As Exception
Throw New Exception(ex.Message, ex.InnerException)
Finally
sQuery = Nothing
status = Nothing
End Try

The value of sQuery contains:


- xmlns:cal="urn:schemas:calendar:">
SELECT "DAV:id", "DAV:getlastmodified" FROM Scope('SHALLOW
TRAVERSAL OF
"http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/"')WHERE
"DAV:href" =
"http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML"


but it is giving me "Bad Request" error where as appointment is present with
href
"http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML".

Although If I remove where condition in Select clause then it shows all the
appointment including href
"http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML".

Please suggest where I am doing wrong.

Thanks & regards,

Atul Saxena

Archived from group: microsoft>public>exchange>applications
Back to top
View user's profile Send private message
Henning Krause [MVP - Exc



Joined: 05 Aug 2007
Posts: 142

PostPosted: Sat Oct 27, 2007 11:38 pm    Post subject: Re: Showing "Bad Request" when selecting particular appointm Reply with quote

Hello,

DAV:href is a constructed property, you cannot search for it.

But since you already got the URL, just do a PROPFIND request on the
address.

Kind regards,
Henning Krause

"Atul Saxena" wrote in message @microsoft.com...
>I am doing following code:
>
> Dim sQuery As String
> Dim status As Integer
> Dim oXMLHttp1 As MSXML2.XMLHTTP30 = New MSXML2.XMLHTTP30
> Try
>
> oXMLHttp1.open("SEARCH", stURI, False, Me.UserNameAlias,
> Me.Password)
>
> sQuery = "" & _
> " > xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:""> " &
> _
> "SELECT ""DAV:id"", ""DAV:getlastmodified"" "
> & _
> "FROM Scope('SHALLOW TRAVERSAL OF """ & stURI &
> """')"
> & _
> "WHERE ""DAV:href"" = """ & strHref & """ " & _
> "" & _
> ""
>
>
> oXMLHttp1.setRequestHeader("Content-Type", "text/xml")
> oXMLHttp1.setRequestHeader("Brief", "t")
> ' Send the query.
> oXMLHttp1.send(sQuery)
>
> status = CheckStatus(oXMLHttp1.status)
> If status = En.enStatus.Multi_Status Then
> MsgBox(oXMLHttp1.responseText)
> End If
>
> Catch ex As Exception
> Throw New Exception(ex.Message, ex.InnerException)
> Finally
> sQuery = Nothing
> status = Nothing
> End Try
>
> The value of sQuery contains:
>
>
> - > xmlns:cal="urn:schemas:calendar:">
> SELECT "DAV:id", "DAV:getlastmodified" FROM Scope('SHALLOW
> TRAVERSAL OF
> "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/"')WHERE
> "DAV:href" =
> "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML"
>
>
> but it is giving me "Bad Request" error where as appointment is present
> with
> href
> "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML".
>
> Although If I remove where condition in Select clause then it shows all
> the
> appointment including href
> "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML".
>
> Please suggest where I am doing wrong.
>
> Thanks & regards,
>
> Atul Saxena
Back to top
View user's profile Send private message
Atul Saxena



Joined: 12 Oct 2007
Posts: 15

PostPosted: Mon Oct 29, 2007 1:04 am    Post subject: Re: Showing "Bad Request" when selecting particular appointm Reply with quote

Thanks Henning, You are right, it is working fine with PROPFIND.

Thanks & regards,

Atul Saxena

"Henning Krause [MVP - Exchange]" wrote:

> Hello,
>
> DAV:href is a constructed property, you cannot search for it.
>
> But since you already got the URL, just do a PROPFIND request on the
> address.
>
> Kind regards,
> Henning Krause
>
> "Atul Saxena" wrote in message
> @microsoft.com...
> >I am doing following code:
> >
> > Dim sQuery As String
> > Dim status As Integer
> > Dim oXMLHttp1 As MSXML2.XMLHTTP30 = New MSXML2.XMLHTTP30
> > Try
> >
> > oXMLHttp1.open("SEARCH", stURI, False, Me.UserNameAlias,
> > Me.Password)
> >
> > sQuery = "" & _
> > " > > xmlns:m='urn:schemas:mailheader:' xmlns:cal=""urn:schemas:calendar:""> " &
> > _
> > "SELECT ""DAV:id"", ""DAV:getlastmodified"" "
> > & _
> > "FROM Scope('SHALLOW TRAVERSAL OF """ & stURI &
> > """')"
> > & _
> > "WHERE ""DAV:href"" = """ & strHref & """ " & _
> > "" & _
> > ""
> >
> >
> > oXMLHttp1.setRequestHeader("Content-Type", "text/xml")
> > oXMLHttp1.setRequestHeader("Brief", "t")
> > ' Send the query.
> > oXMLHttp1.send(sQuery)
> >
> > status = CheckStatus(oXMLHttp1.status)
> > If status = En.enStatus.Multi_Status Then
> > MsgBox(oXMLHttp1.responseText)
> > End If
> >
> > Catch ex As Exception
> > Throw New Exception(ex.Message, ex.InnerException)
> > Finally
> > sQuery = Nothing
> > status = Nothing
> > End Try
> >
> > The value of sQuery contains:
> >
> >
> > - > > xmlns:cal="urn:schemas:calendar:">
> > SELECT "DAV:id", "DAV:getlastmodified" FROM Scope('SHALLOW
> > TRAVERSAL OF
> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/"')WHERE
> > "DAV:href" =
> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML"
> >
> >
> > but it is giving me "Bad Request" error where as appointment is present
> > with
> > href
> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML".
> >
> > Although If I remove where condition in Select clause then it shows all
> > the
> > appointment including href
> > "http://192.168.111.10/Exchange/ccrindiaadmin@ccrindia.com/Calendar/No%20Appointment.EML".
> >
> > Please suggest where I am doing wrong.
> >
> > Thanks & regards,
> >
> > Atul Saxena
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Creating a new appointment with CDO 1.2.1 Hello, I am using MS Exchange 2003 and MS Outlook 2007. Now I try do develop a programm, which is able to create new appointments in a calendar of an user. I try to do this with CDo 1.2.1, but I always get the same error message. Here is some of my code:

Calendar Items not seen by Appointment scheduler When inviting someone to a meeting and verifying availability using the scheduling tab...no information is available. Items are on the calendar. I've noticed this problem only exists with users who have Personal Folders enabled for delivery of new email.

Creating an appointment in an Exchange 5.5 mailbox from an A Can anyone give advice/code samples on how to write an ASP page that will use CDO (version 1.2.1 ?) to create an appointment in a user's calendar ? Here's the details :- 1. The user will access the ASP page via integrated security. 2. Their Exchange 5.5 a

Permission denied trying to save Appointment (CDOEX) Hi. I'm facing this annoying "Permission denied" error when I try to execute the code below inside a ASP.NET page. When I run the page, it pops me a system form asking for credentials, but it fails no matter what user/pass I type. The same code is execut

Permission denied trying to save Appointment (CDOEX) Hi. I'm facing this annoying "Permission denied" error when I try to execute the code below inside a ASP.NET page. When I run the page, it pops me a system form asking for credentials, but it fails no matter what user/pass I type. The same code is execut
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Applications All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group