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 

PROPPATCH method - webdav again..

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Development
Author Message
szpulek



Joined: 06 Aug 2007
Posts: 4

PostPosted: Wed Jul 25, 2007 6:42 pm    Post subject: PROPPATCH method - webdav again.. Reply with quote

Hello All,

I am trying to create a contact in user's contacts folder using webdav and
java. I wrote something similar to: http://support.microsoft.com/kb/296126
but I get: HTTP/1.1 400 Bad Request. I don't know if I understand properly
xml schema used in webdav. Please take a look on my request:

PROPPATCH /exchange/user1/Contacts/contact1 HTTP/1.1
Content-Type: text/xml
Translate: f
User-Agent: Jakarta Commons-HttpClient/3.0.1
Host: myHost
Content-Length: 412





givenName


sn


00 11 22 33


email1@insert.com





Is there something wrong with its syntax?
Cheers, szpulek.

Archived from group: microsoft>public>exchange2000>development
Back to top
View user's profile Send private message
Glen Scales [MVP]



Joined: 05 Aug 2007
Posts: 92

PostPosted: Thu Jul 26, 2007 3:54 pm    Post subject: Re: PROPPATCH method - webdav again.. Reply with quote

Try something like this instead





givenName
sn
00 11 22 33
email1@insert.com




Cheers
Glen

"szpulek" wrote in message $de9$1@news.onet.pl...
> Hello All,
>
> I am trying to create a contact in user's contacts folder using webdav and
> java. I wrote something similar to: http://support.microsoft.com/kb/296126
> but I get: HTTP/1.1 400 Bad Request. I don't know if I understand properly
> xml schema used in webdav. Please take a look on my request:
>
> PROPPATCH /exchange/user1/Contacts/contact1 HTTP/1.1
> Content-Type: text/xml
> Translate: f
> User-Agent: Jakarta Commons-HttpClient/3.0.1
> Host: myHost
> Content-Length: 412
>
>
>
>
>
> givenName
>
>
> sn
>
>
> 00 11 22 33
>
>
> email1@insert.com
>
>
>
>
>
> Is there something wrong with its syntax?
> Cheers, szpulek.
>
>
Back to top
View user's profile Send private message
szpulek



Joined: 06 Aug 2007
Posts: 4

PostPosted: Thu Jul 26, 2007 1:51 pm    Post subject: Re: PROPPATCH method - webdav again.. Reply with quote

Hi Glen,
thank you very much. This solution works fine, I got response 207. With my
method I can only make request like this:

PROPPATCH /exchange/user1/Contacts/contact1.eml HTTP/1.1
Content-Type: text/xml
Translate: f
User-Agent: Jakarta Commons-HttpClient/3.0.1
Host: myHost
Content-Length: 491





sn


givenName


email1@insert.com

xmlns:e="http://schemas.microsoft.com/exchange/">
IPM.Contact


00 11 22 33





I got HTTP/1.1 207 Multi-Status but unfortunately fields are empty, I need
to verify if it is a problem on Exchange side or on my application side..
Response:

HTTP/1.1 207 Multi-Status
Date: Thu, 26 Jul 2007 07:35:59 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
MS-Exchange-Permanent-URL: url...[changed]
Repl-UID:
Content-Type: text/xml
Content-Length: 445
ResourceTag:

MS-WebStorage: 6.5.7638

xmlns:a="DAV:"
xmlns:b="urn:schemas:contacts"
xmlns:c="http://schemas.microsoft.com/exchange/">



http://myHost/exchange/user1/Contacts/contact1.eml


HTTP/1.1 201 Created



HTTP/1.1 200 OK

















Is there any way to verify if this problem appears on Exchange?
Cheers, szpulek.



Użytkownik "Glen Scales [MVP]" napisał w
wiadomości news:%23PrPkfyzHHA.5160@TK2MSFTNGP05.phx.gbl...
> Try something like this instead
>
>
>
>
>
> givenName
> sn
> 00 11 22 33
> email1@insert.com
>
>
>
>
> Cheers
> Glen
>
> "szpulek" wrote in message
> $de9$1@news.onet.pl...
>> Hello All,
>>
>> I am trying to create a contact in user's contacts folder using webdav
>> and java. I wrote something similar to:
>> http://support.microsoft.com/kb/296126 but I get: HTTP/1.1 400 Bad
>> Request. I don't know if I understand properly xml schema used in webdav.
>> Please take a look on my request:
>>
>> PROPPATCH /exchange/user1/Contacts/contact1 HTTP/1.1
>> Content-Type: text/xml
>> Translate: f
>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>> Host: myHost
>> Content-Length: 412
>>
>>
>>
>>
>>
>> givenName
>>
>>
>> sn
>>
>>
>> 00 11 22 33
>>
>>
>> email1@insert.com
>>
>>
>>
>>
>>
>> Is there something wrong with its syntax?
>> Cheers, szpulek.
>>
>>
>
>
Back to top
View user's profile Send private message
Glen Scales [MVP]



Joined: 05 Aug 2007
Posts: 92

PostPosted: Fri Jul 27, 2007 2:35 pm    Post subject: Re: PROPPATCH method - webdav again.. Reply with quote

Unfortunately there is very little logging you can do with davex.dll If the
request is succeeding but you aren't seeing changes what might be happening
is your actually creating new properties because of the way you are
formatting your request. Have a look at the item in question using Exchange
Explorer or a Mapi editor like Outlook Spy this should allow you to see if
any new properties are getting created.

You XML looks okay though but what are you actually trying to do ? you are
not setting enough properties to create a contact that would only really
work in the context of updating those specific properties.

Cheers
Glen



"szpulek" wrote in message $ec4$1@news.onet.pl...
> Hi Glen,
> thank you very much. This solution works fine, I got response 207. With my
> method I can only make request like this:
>
> PROPPATCH /exchange/user1/Contacts/contact1.eml HTTP/1.1
> Content-Type: text/xml
> Translate: f
> User-Agent: Jakarta Commons-HttpClient/3.0.1
> Host: myHost
> Content-Length: 491
>
>
>
>
>
> sn
>
>
> givenName
>
>
> email1@insert.com
>
> > xmlns:e="http://schemas.microsoft.com/exchange/">
> IPM.Contact
>
>
> 00 11 22 33
>
>
>
>
>
> I got HTTP/1.1 207 Multi-Status but unfortunately fields are empty, I need
> to verify if it is a problem on Exchange side or on my application side..
> Response:
>
> HTTP/1.1 207 Multi-Status
> Date: Thu, 26 Jul 2007 07:35:59 GMT
> Server: Microsoft-IIS/6.0
> X-Powered-By: ASP.NET
> MS-Exchange-Permanent-URL: url...[changed]
> Repl-UID:
> Content-Type: text/xml
> Content-Length: 445
> ResourceTag:
>
> MS-WebStorage: 6.5.7638
>
> > xmlns:a="DAV:"
> xmlns:b="urn:schemas:contacts"
> xmlns:c="http://schemas.microsoft.com/exchange/">
>
>
>
> http://myHost/exchange/user1/Contacts/contact1.eml
>
>
> HTTP/1.1 201 Created
>
>
>
> HTTP/1.1 200 OK
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Is there any way to verify if this problem appears on Exchange?
> Cheers, szpulek.
>
>
>
> Użytkownik "Glen Scales [MVP]" napisał w
> wiadomości news:%23PrPkfyzHHA.5160@TK2MSFTNGP05.phx.gbl...
>> Try something like this instead
>>
>>
>>
>>
>>
>> givenName
>> sn
>> 00 11 22 33
>> email1@insert.com
>>
>>
>>
>>
>> Cheers
>> Glen
>>
>> "szpulek" wrote in message
>> $de9$1@news.onet.pl...
>>> Hello All,
>>>
>>> I am trying to create a contact in user's contacts folder using webdav
>>> and java. I wrote something similar to:
>>> http://support.microsoft.com/kb/296126 but I get: HTTP/1.1 400 Bad
>>> Request. I don't know if I understand properly xml schema used in
>>> webdav. Please take a look on my request:
>>>
>>> PROPPATCH /exchange/user1/Contacts/contact1 HTTP/1.1
>>> Content-Type: text/xml
>>> Translate: f
>>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>>> Host: myHost
>>> Content-Length: 412
>>>
>>>
>>>
>>>
>>>
>>> givenName
>>>
>>>
>>> sn
>>>
>>>
>>> 00 11 22 33
>>>
>>>
>>> email1@insert.com
>>>
>>>
>>>
>>>
>>>
>>> Is there something wrong with its syntax?
>>> Cheers, szpulek.
>>>
>>>
>>
>>
>
>
Back to top
View user's profile Send private message
szpulek



Joined: 06 Aug 2007
Posts: 4

PostPosted: Fri Jul 27, 2007 2:36 pm    Post subject: Re: PROPPATCH method - webdav again.. Reply with quote

Hi Glen,

My goal is to create a new contact in specified contacts folder.

I thought that my application somehow don't send proper xml to Exchange. I
checked it with Ethereal and I noticed strange Exchange behaviour. My xml is
ok and whole request also. But then Exchange answers two times with HTTP/1.1
401 Unathorized and then third time with response which I recently presented
(HTTP/1.1 207 Multi-Status) with status OK and empty fields. Perhaps those
401s are the reason?

You wrote also that there might be required fields. Can you give me some
hints which are required? In my xml I use only fields which I want to create
with specified value.

Cheers, szpulek.


Użytkownik "Glen Scales [MVP]" napisał w
wiadomości news:%23FBlBY%23zHHA.5772@TK2MSFTNGP02.phx.gbl...
> Unfortunately there is very little logging you can do with davex.dll If
> the request is succeeding but you aren't seeing changes what might be
> happening is your actually creating new properties because of the way you
> are formatting your request. Have a look at the item in question using
> Exchange Explorer or a Mapi editor like Outlook Spy this should allow you
> to see if any new properties are getting created.
>
> You XML looks okay though but what are you actually trying to do ? you are
> not setting enough properties to create a contact that would only really
> work in the context of updating those specific properties.
>
> Cheers
> Glen
>
>
>
> "szpulek" wrote in message
> $ec4$1@news.onet.pl...
>> Hi Glen,
>> thank you very much. This solution works fine, I got response 207. With
>> my method I can only make request like this:
>>
>> PROPPATCH /exchange/user1/Contacts/contact1.eml HTTP/1.1
>> Content-Type: text/xml
>> Translate: f
>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>> Host: myHost
>> Content-Length: 491
>>
>>
>>
>>
>>
>> sn
>>
>>
>> givenName
>>
>>
>> email1@insert.com
>>
>> >> xmlns:e="http://schemas.microsoft.com/exchange/">
>> IPM.Contact
>>
>>
>> 00 11 22 33
>>
>>
>>
>>
>>
>> I got HTTP/1.1 207 Multi-Status but unfortunately fields are empty, I
>> need to verify if it is a problem on Exchange side or on my application
>> side.. Response:
>>
>> HTTP/1.1 207 Multi-Status
>> Date: Thu, 26 Jul 2007 07:35:59 GMT
>> Server: Microsoft-IIS/6.0
>> X-Powered-By: ASP.NET
>> MS-Exchange-Permanent-URL: url...[changed]
>> Repl-UID:
>> Content-Type: text/xml
>> Content-Length: 445
>> ResourceTag:
>>
>> MS-WebStorage: 6.5.7638
>>
>> >> xmlns:a="DAV:"
>> xmlns:b="urn:schemas:contacts"
>> xmlns:c="http://schemas.microsoft.com/exchange/">
>>
>>
>>
>> http://myHost/exchange/user1/Contacts/contact1.eml
>>
>>
>> HTTP/1.1 201 Created
>>
>>
>>
>> HTTP/1.1 200 OK
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Is there any way to verify if this problem appears on Exchange?
>> Cheers, szpulek.
>>
>>
>>
>> Użytkownik "Glen Scales [MVP]" napisał w
>> wiadomości news:%23PrPkfyzHHA.5160@TK2MSFTNGP05.phx.gbl...
>>> Try something like this instead
>>>
>>>
>>>
>>>
>>>
>>> givenName
>>> sn
>>> 00 11 22 33
>>> email1@insert.com
>>>
>>>
>>>
>>>
>>> Cheers
>>> Glen
>>>
>>> "szpulek" wrote in message
>>> $de9$1@news.onet.pl...
>>>> Hello All,
>>>>
>>>> I am trying to create a contact in user's contacts folder using webdav
>>>> and java. I wrote something similar to:
>>>> http://support.microsoft.com/kb/296126 but I get: HTTP/1.1 400 Bad
>>>> Request. I don't know if I understand properly xml schema used in
>>>> webdav. Please take a look on my request:
>>>>
>>>> PROPPATCH /exchange/user1/Contacts/contact1 HTTP/1.1
>>>> Content-Type: text/xml
>>>> Translate: f
>>>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>>>> Host: myHost
>>>> Content-Length: 412
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> givenName
>>>>
>>>>
>>>> sn
>>>>
>>>>
>>>> 00 11 22 33
>>>>
>>>>
>>>> email1@insert.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Is there something wrong with its syntax?
>>>> Cheers, szpulek.
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Back to top
View user's profile Send private message
Glen Scales [MVP]



Joined: 05 Aug 2007
Posts: 92

PostPosted: Mon Jul 30, 2007 2:38 pm    Post subject: Re: PROPPATCH method - webdav again.. Reply with quote

You will probably find that this is actually the security negotiation
process eg the browser will try using different authentication mechanisms
before giving up and telling the user a request failed. This shouldn't
affect the end result though

There's a good sample with all the properties you can set on
http://msdn2.microsoft.com/en-us/library/ms878636.aspx I would say a basic
minimum would be

xmlns:f="http://schemas.microsoft.com/exchange/"
xmlns:e="urn:schemas:contacts:"
xmlns:mapi="http://schemas.microsoft.com/mapi/"
xmlns:mail="urn:schemas:httpmail:">
IPM.Contact
urn:content-classes:person
Fred
Smith
00 11 2222 33
Fred Smith
1
SMTP
email2@insert.com
Fred Smith
Fred Smith




Cheers
Glen



"szpulek" wrote in message $6tn$1@news.onet.pl...
> Hi Glen,
>
> My goal is to create a new contact in specified contacts folder.
>
> I thought that my application somehow don't send proper xml to Exchange. I
> checked it with Ethereal and I noticed strange Exchange behaviour. My xml
> is ok and whole request also. But then Exchange answers two times with
> HTTP/1.1 401 Unathorized and then third time with response which I
> recently presented (HTTP/1.1 207 Multi-Status) with status OK and empty
> fields. Perhaps those 401s are the reason?
>
> You wrote also that there might be required fields. Can you give me some
> hints which are required? In my xml I use only fields which I want to
> create with specified value.
>
> Cheers, szpulek.
>
>
> Użytkownik "Glen Scales [MVP]" napisał w
> wiadomości news:%23FBlBY%23zHHA.5772@TK2MSFTNGP02.phx.gbl...
>> Unfortunately there is very little logging you can do with davex.dll If
>> the request is succeeding but you aren't seeing changes what might be
>> happening is your actually creating new properties because of the way you
>> are formatting your request. Have a look at the item in question using
>> Exchange Explorer or a Mapi editor like Outlook Spy this should allow you
>> to see if any new properties are getting created.
>>
>> You XML looks okay though but what are you actually trying to do ? you
>> are not setting enough properties to create a contact that would only
>> really work in the context of updating those specific properties.
>>
>> Cheers
>> Glen
>>
>>
>>
>> "szpulek" wrote in message
>> $ec4$1@news.onet.pl...
>>> Hi Glen,
>>> thank you very much. This solution works fine, I got response 207. With
>>> my method I can only make request like this:
>>>
>>> PROPPATCH /exchange/user1/Contacts/contact1.eml HTTP/1.1
>>> Content-Type: text/xml
>>> Translate: f
>>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>>> Host: myHost
>>> Content-Length: 491
>>>
>>>
>>>
>>>
>>>
>>> sn
>>>
>>>
>>> givenName
>>>
>>>
>>> email1@insert.com
>>>
>>> >>> xmlns:e="http://schemas.microsoft.com/exchange/">
>>> IPM.Contact
>>>
>>>
>>> 00 11 22 33
>>>
>>>
>>>
>>>
>>>
>>> I got HTTP/1.1 207 Multi-Status but unfortunately fields are empty, I
>>> need to verify if it is a problem on Exchange side or on my application
>>> side.. Response:
>>>
>>> HTTP/1.1 207 Multi-Status
>>> Date: Thu, 26 Jul 2007 07:35:59 GMT
>>> Server: Microsoft-IIS/6.0
>>> X-Powered-By: ASP.NET
>>> MS-Exchange-Permanent-URL: url...[changed]
>>> Repl-UID:
>>> Content-Type: text/xml
>>> Content-Length: 445
>>> ResourceTag:
>>>
>>> MS-WebStorage: 6.5.7638
>>>
>>> >>> xmlns:a="DAV:"
>>> xmlns:b="urn:schemas:contacts"
>>> xmlns:c="http://schemas.microsoft.com/exchange/">
>>>
>>>
>>>
>>> http://myHost/exchange/user1/Contacts/contact1.eml
>>>
>>>
>>> HTTP/1.1 201 Created
>>>
>>>
>>>
>>> HTTP/1.1 200 OK
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Is there any way to verify if this problem appears on Exchange?
>>> Cheers, szpulek.
>>>
>>>
>>>
>>> Użytkownik "Glen Scales [MVP]" napisał w
>>> wiadomości news:%23PrPkfyzHHA.5160@TK2MSFTNGP05.phx.gbl...
>>>> Try something like this instead
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> givenName
>>>> sn
>>>> 00 11 22 33
>>>> email1@insert.com
>>>>
>>>>
>>>>
>>>>
>>>> Cheers
>>>> Glen
>>>>
>>>> "szpulek" wrote in message
>>>> $de9$1@news.onet.pl...
>>>>> Hello All,
>>>>>
>>>>> I am trying to create a contact in user's contacts folder using webdav
>>>>> and java. I wrote something similar to:
>>>>> http://support.microsoft.com/kb/296126 but I get: HTTP/1.1 400 Bad
>>>>> Request. I don't know if I understand properly xml schema used in
>>>>> webdav. Please take a look on my request:
>>>>>
>>>>> PROPPATCH /exchange/user1/Contacts/contact1 HTTP/1.1
>>>>> Content-Type: text/xml
>>>>> Translate: f
>>>>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>>>>> Host: myHost
>>>>> Content-Length: 412
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> givenName
>>>>>
>>>>>
>>>>> sn
>>>>>
>>>>>
>>>>> 00 11 22 33
>>>>>
>>>>>
>>>>> email1@insert.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Is there something wrong with its syntax?
>>>>> Cheers, szpulek.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Back to top
View user's profile Send private message
szpulek



Joined: 06 Aug 2007
Posts: 4

PostPosted: Mon Jul 30, 2007 2:42 pm    Post subject: Re: PROPPATCH method - webdav again.. Reply with quote

He Glen,

Thanks a lot for your help! Your sample works fine and I can finally add a
new contact from my java application Smile I found also my bug (stupid one), it
was in namespace.. I had xmlns:e="urn:schemas:contacts:" without last ":".

I have one more question. I am wondering if there is a field where I can
write something like "contact creator" - I want put there my application
info. Of course it is not neccessary but it would be nice to have something
like this Smile

Cheers, szpulek.



Użytkownik "Glen Scales [MVP]" napisał w
wiadomości @TK2MSFTNGP05.phx.gbl...
> You will probably find that this is actually the security negotiation
> process eg the browser will try using different authentication mechanisms
> before giving up and telling the user a request failed. This shouldn't
> affect the end result though
>
> There's a good sample with all the properties you can set on
> http://msdn2.microsoft.com/en-us/library/ms878636.aspx I would say a basic
> minimum would be
>
> > xmlns:f="http://schemas.microsoft.com/exchange/"
> xmlns:e="urn:schemas:contacts:"
> xmlns:mapi="http://schemas.microsoft.com/mapi/"
> xmlns:mail="urn:schemas:httpmail:">
> IPM.Contact
> urn:content-classes:person
> Fred
> Smith
> 00 11 2222 33
> Fred Smith
> 1
> SMTP
> email2@insert.com
> Fred
> Smith
> Fred Smith
>
>
>
>
> Cheers
> Glen
>
>
>
> "szpulek" wrote in message
> $6tn$1@news.onet.pl...
>> Hi Glen,
>>
>> My goal is to create a new contact in specified contacts folder.
>>
>> I thought that my application somehow don't send proper xml to Exchange.
>> I checked it with Ethereal and I noticed strange Exchange behaviour. My
>> xml is ok and whole request also. But then Exchange answers two times
>> with HTTP/1.1 401 Unathorized and then third time with response which I
>> recently presented (HTTP/1.1 207 Multi-Status) with status OK and empty
>> fields. Perhaps those 401s are the reason?
>>
>> You wrote also that there might be required fields. Can you give me some
>> hints which are required? In my xml I use only fields which I want to
>> create with specified value.
>>
>> Cheers, szpulek.
>>
>>
>> Użytkownik "Glen Scales [MVP]" napisał w
>> wiadomości news:%23FBlBY%23zHHA.5772@TK2MSFTNGP02.phx.gbl...
>>> Unfortunately there is very little logging you can do with davex.dll If
>>> the request is succeeding but you aren't seeing changes what might be
>>> happening is your actually creating new properties because of the way
>>> you are formatting your request. Have a look at the item in question
>>> using Exchange Explorer or a Mapi editor like Outlook Spy this should
>>> allow you to see if any new properties are getting created.
>>>
>>> You XML looks okay though but what are you actually trying to do ? you
>>> are not setting enough properties to create a contact that would only
>>> really work in the context of updating those specific properties.
>>>
>>> Cheers
>>> Glen
>>>
>>>
>>>
>>> "szpulek" wrote in message
>>> $ec4$1@news.onet.pl...
>>>> Hi Glen,
>>>> thank you very much. This solution works fine, I got response 207. With
>>>> my method I can only make request like this:
>>>>
>>>> PROPPATCH /exchange/user1/Contacts/contact1.eml HTTP/1.1
>>>> Content-Type: text/xml
>>>> Translate: f
>>>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>>>> Host: myHost
>>>> Content-Length: 491
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> sn
>>>>
>>>>
>>>> givenName
>>>>
>>>>
>>>> email1@insert.com
>>>>
>>>> >>>> xmlns:e="http://schemas.microsoft.com/exchange/">
>>>> IPM.Contact
>>>>
>>>>
>>>> 00 11 22 33
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I got HTTP/1.1 207 Multi-Status but unfortunately fields are empty, I
>>>> need to verify if it is a problem on Exchange side or on my application
>>>> side.. Response:
>>>>
>>>> HTTP/1.1 207 Multi-Status
>>>> Date: Thu, 26 Jul 2007 07:35:59 GMT
>>>> Server: Microsoft-IIS/6.0
>>>> X-Powered-By: ASP.NET
>>>> MS-Exchange-Permanent-URL: url...[changed]
>>>> Repl-UID:
>>>> Content-Type: text/xml
>>>> Content-Length: 445
>>>> ResourceTag:
>>>>
>>>> MS-WebStorage: 6.5.7638
>>>>
>>>> >>>> xmlns:a="DAV:"
>>>> xmlns:b="urn:schemas:contacts"
>>>> xmlns:c="http://schemas.microsoft.com/exchange/">
>>>>
>>>>
>>>>
>>>> http://myHost/exchange/user1/Contacts/contact1.eml
>>>>
>>>>
>>>> HTTP/1.1 201 Created
>>>>
>>>>
>>>>
>>>> HTTP/1.1 200 OK
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Is there any way to verify if this problem appears on Exchange?
>>>> Cheers, szpulek.
>>>>
>>>>
>>>>
>>>> Użytkownik "Glen Scales [MVP]" napisał w
>>>> wiadomości news:%23PrPkfyzHHA.5160@TK2MSFTNGP05.phx.gbl...
>>>>> Try something like this instead
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> givenName
>>>>> sn
>>>>> 00 11 22 33
>>>>> email1@insert.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Cheers
>>>>> Glen
>>>>>
>>>>> "szpulek" wrote in message
>>>>> $de9$1@news.onet.pl...
>>>>>> Hello All,
>>>>>>
>>>>>> I am trying to create a contact in user's contacts folder using
>>>>>> webdav and java. I wrote something similar to:
>>>>>> http://support.microsoft.com/kb/296126 but I get: HTTP/1.1 400 Bad
>>>>>> Request. I don't know if I understand properly xml schema used in
>>>>>> webdav. Please take a look on my request:
>>>>>>
>>>>>> PROPPATCH /exchange/user1/Contacts/contact1 HTTP/1.1
>>>>>> Content-Type: text/xml
>>>>>> Translate: f
>>>>>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>>>>>> Host: myHost
>>>>>> Content-Length: 412
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> givenName
>>>>>>
>>>>>>
>>>>>> sn
>>>>>>
>>>>>>
>>>>>> 00 11 22 33
>>>>>>
>>>>>>
>>>>>> email1@insert.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Is there something wrong with its syntax?
>>>>>> Cheers, szpulek.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Back to top
View user's profile Send private message
Glen Scales [MVP]



Joined: 05 Aug 2007
Posts: 92

PostPosted: Tue Jul 31, 2007 9:07 pm    Post subject: Re: PROPPATCH method - webdav again.. Reply with quote

What you can do is actually add your own custom property to the object in
question see http://msdn2.microsoft.com/en-US/library/ms879316.aspx. I do
this all the time

Cheers
Glen

"szpulek" wrote in message $ls2$1@news.onet.pl...
> He Glen,
>
> Thanks a lot for your help! Your sample works fine and I can finally add a
> new contact from my java application Smile I found also my bug (stupid one),
> it was in namespace.. I had xmlns:e="urn:schemas:contacts:" without last
> ":".
>
> I have one more question. I am wondering if there is a field where I can
> write something like "contact creator" - I want put there my application
> info. Of course it is not neccessary but it would be nice to have
> something like this Smile
>
> Cheers, szpulek.
>
>
>
> Użytkownik "Glen Scales [MVP]" napisał w
> wiadomości @TK2MSFTNGP05.phx.gbl...
>> You will probably find that this is actually the security negotiation
>> process eg the browser will try using different authentication mechanisms
>> before giving up and telling the user a request failed. This shouldn't
>> affect the end result though
>>
>> There's a good sample with all the properties you can set on
>> http://msdn2.microsoft.com/en-us/library/ms878636.aspx I would say a
>> basic minimum would be
>>
>> >> xmlns:f="http://schemas.microsoft.com/exchange/"
>> xmlns:e="urn:schemas:contacts:"
>> xmlns:mapi="http://schemas.microsoft.com/mapi/"
>> xmlns:mail="urn:schemas:httpmail:">
>> IPM.Contact
>> urn:content-classes:person
>> Fred
>> Smith
>> 00 11 2222 33
>> Fred Smith
>> 1
>> SMTP
>> email2@insert.com
>> Fred
>> Smith
>> Fred Smith
>>
>>
>>
>>
>> Cheers
>> Glen
>>
>>
>>
>> "szpulek" wrote in message
>> $6tn$1@news.onet.pl...
>>> Hi Glen,
>>>
>>> My goal is to create a new contact in specified contacts folder.
>>>
>>> I thought that my application somehow don't send proper xml to Exchange.
>>> I checked it with Ethereal and I noticed strange Exchange behaviour. My
>>> xml is ok and whole request also. But then Exchange answers two times
>>> with HTTP/1.1 401 Unathorized and then third time with response which I
>>> recently presented (HTTP/1.1 207 Multi-Status) with status OK and empty
>>> fields. Perhaps those 401s are the reason?
>>>
>>> You wrote also that there might be required fields. Can you give me some
>>> hints which are required? In my xml I use only fields which I want to
>>> create with specified value.
>>>
>>> Cheers, szpulek.
>>>
>>>
>>> Użytkownik "Glen Scales [MVP]" napisał w
>>> wiadomości news:%23FBlBY%23zHHA.5772@TK2MSFTNGP02.phx.gbl...
>>>> Unfortunately there is very little logging you can do with davex.dll If
>>>> the request is succeeding but you aren't seeing changes what might be
>>>> happening is your actually creating new properties because of the way
>>>> you are formatting your request. Have a look at the item in question
>>>> using Exchange Explorer or a Mapi editor like Outlook Spy this should
>>>> allow you to see if any new properties are getting created.
>>>>
>>>> You XML looks okay though but what are you actually trying to do ? you
>>>> are not setting enough properties to create a contact that would only
>>>> really work in the context of updating those specific properties.
>>>>
>>>> Cheers
>>>> Glen
>>>>
>>>>
>>>>
>>>> "szpulek" wrote in message
>>>> $ec4$1@news.onet.pl...
>>>>> Hi Glen,
>>>>> thank you very much. This solution works fine, I got response 207.
>>>>> With my method I can only make request like this:
>>>>>
>>>>> PROPPATCH /exchange/user1/Contacts/contact1.eml HTTP/1.1
>>>>> Content-Type: text/xml
>>>>> Translate: f
>>>>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>>>>> Host: myHost
>>>>> Content-Length: 491
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> sn
>>>>>
>>>>>
>>>>> givenName
>>>>>
>>>>>
>>>>> email1@insert.com
>>>>>
>>>>> >>>>> xmlns:e="http://schemas.microsoft.com/exchange/">
>>>>> IPM.Contact
>>>>>
>>>>>
>>>>> 00 11 22 33
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I got HTTP/1.1 207 Multi-Status but unfortunately fields are empty, I
>>>>> need to verify if it is a problem on Exchange side or on my
>>>>> application side.. Response:
>>>>>
>>>>> HTTP/1.1 207 Multi-Status
>>>>> Date: Thu, 26 Jul 2007 07:35:59 GMT
>>>>> Server: Microsoft-IIS/6.0
>>>>> X-Powered-By: ASP.NET
>>>>> MS-Exchange-Permanent-URL: url...[changed]
>>>>> Repl-UID:
>>>>> Content-Type: text/xml
>>>>> Content-Length: 445
>>>>> ResourceTag:
>>>>>
>>>>> MS-WebStorage: 6.5.7638
>>>>>
>>>>> >>>>> xmlns:a="DAV:"
>>>>> xmlns:b="urn:schemas:contacts"
>>>>> xmlns:c="http://schemas.microsoft.com/exchange/">
>>>>>
>>>>>
>>>>>
>>>>> http://myHost/exchange/user1/Contacts/contact1.eml
>>>>>
>>>>>
>>>>> HTTP/1.1 201 Created
>>>>>
>>>>>
>>>>>
>>>>> HTTP/1.1 200 OK
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Is there any way to verify if this problem appears on Exchange?
>>>>> Cheers, szpulek.
>>>>>
>>>>>
>>>>>
>>>>> Użytkownik "Glen Scales [MVP]" napisał w
>>>>> wiadomości news:%23PrPkfyzHHA.5160@TK2MSFTNGP05.phx.gbl...
>>>>>> Try something like this instead
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> givenName
>>>>>> sn
>>>>>> 00 11 22 33
>>>>>> email1@insert.com
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Cheers
>>>>>> Glen
>>>>>>
>>>>>> "szpulek" wrote in message
>>>>>> $de9$1@news.onet.pl...
>>>>>>> Hello All,
>>>>>>>
>>>>>>> I am trying to create a contact in user's contacts folder using
>>>>>>> webdav and java. I wrote something similar to:
>>>>>>> http://support.microsoft.com/kb/296126 but I get: HTTP/1.1 400 Bad
>>>>>>> Request. I don't know if I understand properly xml schema used in
>>>>>>> webdav. Please take a look on my request:
>>>>>>>
>>>>>>> PROPPATCH /exchange/user1/Contacts/contact1 HTTP/1.1
>>>>>>> Content-Type: text/xml
>>>>>>> Translate: f
>>>>>>> User-Agent: Jakarta Commons-HttpClient/3.0.1
>>>>>>> Host: myHost
>>>>>>> Content-Length: 412
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> givenName
>>>>>>>
>>>>>>>
>>>>>>> sn
>>>>>>>
>>>>>>>
>>>>>>> 00 11 22 33
>>>>>>>
>>>>>>>
>>>>>>> email1@insert.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Is there something wrong with its syntax?
>>>>>>> Cheers, szpulek.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
WEBDAV: how to get a Multiline body in webdav created appoin I am using webdav to create an appointment and post it to a clanedar. When I pass a regular string with carriage returns and linefeeds to the field they do not display. If I try to pass an html formatted string in the fie

webdav = get the description of an event in Exchange Hi there, Im trying to display the description or message (subject, dtstart, dtend are all ok) of a calendar entry but I cannot find which schema it belongs to; Is it: or: or: urn:sc

Tom or Mindy? Create IPM.DistList with WebDav and VB.NET?? Hi. Would be very grateful if anyone could point me in the right direction... I am trying to create a personal distribution list in a users contacts folder with webdav (Why is this so carefully left out of the Exchange SDK?) I figured out that http://sche

How to send message with embbeeded images using WebDAV? Hello, How do i send message with embeeded images using WebDAV? In outlook i need to set the CID field of the attachemnt and than using
WebDav Authentication I'm attempting to write a WebDAV to access contacts, but it is failing when I try the I receive a WebException and conversion from string to double where indicated below I've verified the path to the DL
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange 2000 Development 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