xmlocs

xml parsing error


I am writing a ocs IM client for android and now I am trying to delete a contact from contact list with the

<deleteContact rid="100"></deleteContact>
 <uri>sip:alice@contoso.com</uri>
</deleteContact>

command request to the cwa server... the command is from http://msdn.microsoft.com/en-us/library/bb969527%28v=office.12%29.aspx.

When I send the request to the ocs server I get the following error:

Error in XML document (5, 3): deleteContact was not expected

Does somebody know what could be the problem? Or at least tell me please how can I read that error: document (5, 3) ...

My original code:

<cwaRequests sid="5" xmlns="http://schemas.microsoft.com/2006/09/rtc/cwa">
  <deleteContact rid="2">
   <uri>
    sip:emil@domain.org
   </uri>
 </deleteContact>
</cwaRequests>

Thank you very much!


Solution

  • You need to get rid of the closing deleteContact tag in the first line:

    <deleteContact rid="100"></deleteContact>
     <uri>sip:alice@contoso.com</uri>
    </deleteContact>
    

    should be

    <deleteContact rid="100">
     <uri>sip:alice@contoso.com</uri>
    </deleteContact>