Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

żIs it possible to create a contact in Exchange 2007 with webdav operations?

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2007] >> Migration >> żIs it possible to create a contact in Exchange 2007 with webdav operations? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Limited time MSExchange.org offer! -- 1.Sep.2008 1:00:00 PM
TechGenix and SolarWinds have partnered to provide free copies of SolarWinds Exchange Monitor to all visitors who join the MSExchange.org Forums. SolarWinds Exchange Monitor is a handy desktop dashboard that continuously monitors Microsoft Exchange to deliver real-time insight into Exchange services, mail queue sizes, and host server health. Learn more about Exchange Monitor and the free offer!
żIs it possible to create a contact in Exchange 2007 wi... - 14.Oct.2008 12:35:33 PM   
shades_80

 

Posts: 1
Joined: 14.Oct.2008
Status: offline
Hello!

I wrote an application in vb.net (2005) to create contacts in Exchange 2000,
unfortunately the same code doesn't work in Exchange 2007. Then, I copy the
lines with indications which work fine against Exchange 2000:

Dim objRequest As New MSXML.XMLHTTPRequest

' Open the request object, assigning it the method PROPPATCH.
' WHERE
' strURL = "http://192.1.1.134/public/contactos/i00001_10709.eml"
objRequest.open("PROPPATCH", strURL.ToString, False, usuarioEX.ToString,
passwordEX.ToString)

' Set the necessary headers for the request.
objRequest.setRequestHeader("Content-Type", "text/xml")
objRequest.setRequestHeader("Translate", "f")
objRequest.setRequestHeader("Content-Length", Len(strBody))

' Specify the namespaces to be used.
strXMLNSInfo = "xmlns:g=""DAV:"" " & _
         "xmlns:c=""urn:schemas:contacts:"" " & _
         "xmlns:e=""http://schemas.microsoft.com/exchange/"" " & _
         "xmlns:mapi=""http://schemas.microsoft.com/mapi/"" " & _
         "xmlns:x=""xml:"" xmlns:cal=""urn:schemas:calendar:"" " & _
         "xmlns:mail=""urn:schemas:httpmail:"">"

' Specify the contact's name information .... First Name, Middle Name, Last
Name, etc
strNameInfo = "<c:givenName>@@Nombre@@</c:givenName>" & _
  "<c:middlename></c:middlename>" & _
  "<c:sn>@@ApellidoPaterno@@ @@ApellidoMaterno@@</c:sn>" & _
  "<c:cn>@@Nombre@@ @@ApellidoPaterno@@ @@ApellidoMaterno@@</c:cn>" & _
  "<mail:subject>@@Nombre@@ @@ApellidoPaterno@@</mail:subject>" & _
  "<c:fileas>@@ApellidoPaterno@@ @@ApellidoMaterno@@, @@Nombre@@</c:
fileas>" & _
  "<c:initials></c:initials>" & _
  "<c:nickname></c:nickname>" & _
  "<c:personaltitle>@@Tratamiento@@</c:personaltitle>" & _
  "<c:namesuffix></c:namesuffix>"  

' Put it all together in an HTTP request.
strBody = "<?xml version=""1.0""?>" & _
   "<g:propertyupdate " & strXMLNSInfo & _
          "<g:set>" & _
                "<g:prop>" & _
                           "<g:contentclass>urn:content-classes:person</g:
contentclass>" & _
                           "<e:outlookmessageclass>IPM.Contact</e:
outlookmessageclass>" & _
                            strNameInfo & _
                "</g:prop>" & _
          "</g:set>" & _
   "</g:propertyupdate>"

' Send the request, using the XML document as the body.
objRequest.send(strBody)

' Display the results.
If (objRequest.status >= 200 And objRequest.status < 300) Then
 ToolStripStatusLabel1.Text = "Status: Ok. "
  .............................
  ..................
  ........

After the send method is executed when the application runs against Exchange
2000 the objRequest status is 207 (GOOD) but is 501 (Not Implemented) when
the application runs against Exchange 2007. The value assigned to the
variable strURL in the trial with Exchange 2007 is "
http://192.1.1.124/owa/i00001_10709.eml" The objective is the same that it
was in Exchange 2000, create a contact in a public folder called contactos.

żIs it possible to create a contact in Exchange 2007 with the webdav
operations that I am using?
If yes, żDoes anybody know what i have to correct?

Also, I believe that there is something wrong in the url used in the trial
with Exchange 2007 because it doesn't specify where the contact should be
created (in the public folder called contactos). It was difficult for me to
establish the url to create the contact in Exchange 20007, because "
http://192.1.1.124/owa/#" was the url showed for many windows while I was
sailing in OWA 2007.

żDoes anybody know the specific url that I should use to create a contact in
Exchange 20007 (in a public folder called contactos)?


Thanks in advance.

Memo.
Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2007] >> Migration >> żIs it possible to create a contact in Exchange 2007 with webdav operations? Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts