Results 1 to 2 of 2

Thread: XML problems

  1. #1
    Join Date
    Dec 2009
    Posts
    2
    Rep Power
    6

    Default XML problems

    Hi all, newbie to this so be gentle.
    Im using python and trying to do some simple things with zimbra soap

    heres my first post
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <userAgent xmlns="" name="Jimmy code" version="1"></userAgent>
    <sessionId xmlns="" id=""></sessionId>
    <account xmlns="" by="name">test1@test-zimbra.uk.corpdata</account>
    <authToken xmlns="">

    </authToken>
    </context>
    </soap:Header>
    <soap:Body>
    <AuthRequest xmlns="urn:zimbraAccount">
    <account by="name">test1@test-zimbra.uk.corpdata</account>
    <password>thepassword</password>
    </AuthRequest></soap:Body>
    </soap:Envelope>

    this seems to work fine and i get the sessionId and authtoken from response to this

    then when i post this
    soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <userAgent xmlns="" name="Jimmy code" version="1"></userAgent>
    <sessionId xmlns="" id="197">197</sessionId>
    <account xmlns="" by="name">test1@test-zimbra.uk.corpdata</account>
    <authToken xmlns="">
    0_8c658488c28dee14e1d488f0b0080b5afabc28d4_69643d3 3363a66303831346133342d356330372d343663642d6263313 52d3731323736323339336135343b6578703d31333a3132363 03030323539353038363b747970653d363a7a696d6272613b
    </authToken>
    </context>
    </soap:Header>
    <soap:Body><NoOpRequest></NoOpRequest></soap:Body>
    </soap:Envelope>

    the mailbox.log says the the xml is formated incorrect or the xml must start and end within the same entity...I use the same function to create the xml
    so there shouldnt be any difference...Having played with it, it seems the authToken string seems to break the XML but i cant work out how.

    Any ideas folks?
    also can i use http to do these requests or does it have to be https?
    thanks
    Jim

  2. #2
    Join Date
    Dec 2009
    Posts
    2
    Rep Power
    6

    Default

    i have tried using the minidom lib in python to check and tidy my xml
    the XML now i have now is below, the message i get now is that the authtoken must have a closing </authtoken> which i have got...
    any ideas?

    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><authToken>0_4ed64c87c3cfa7a057 731a34b4bf07360f7b4e24_69643d33363a663038313461333 42d356330372d343663642d626331352d37313237363233393 36135343b6578703d31333a313236303030383733303039363 b747970653d363a7a696d6272613b</authToken><sessionId id="1144">1144</sessionId></context></soap:Header><soap:Body><GetAccountRequest xmlns="urn:zimbraAdmin"><account by="name">admin@test-zimbra.uk.corpdata</account></GetAccountRequest></soap:Body></soap:Envelope>

Similar Threads

  1. invalid XML character
    By pbruna in forum Zimbra Mobile
    Replies: 2
    Last Post: 10-30-2007, 03:00 PM
  2. Restarting and german 'umlaut' problems
    By Oswald-Kolle in forum Installation
    Replies: 3
    Last Post: 05-29-2007, 03:09 AM
  3. iSync Connector / Apple Address Book Problems
    By jrosen in forum CalDAV / CardDAV / iSync
    Replies: 11
    Last Post: 04-16-2007, 04:40 PM
  4. Replies: 3
    Last Post: 12-06-2006, 11:31 AM
  5. Xml support in AjaxTK
    By sixstone in forum Developers
    Replies: 0
    Last Post: 10-21-2005, 03:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •