Results 1 to 2 of 2

Thread: retrieve contacts in SOAP/XML not JSON

Hybrid View

  1. #1
    Join Date
    Jul 2008
    Posts
    7
    Rep Power
    7

    Default retrieve contacts in SOAP/XML not JSON

    Hi,
    I want to use the zimbra contacts for my application.
    To parse the contacts I need them in SOAP/XML format.
    I looked at ZMailboxUtil.java but I can't figure out how to
    get a SOAP/XML response.

    Code:
    Options opt = new Options();
    opt.setAccount("foo@bar.com");
    opt.setPassword("strongpassword");
    opt.setUri("https://bar.com/service/soap");
    opt.setResponseProtocol(SoapProtocol.Soap12);			opt.setRequestProtocol(SoapProtocol.Soap12);
    
    ZMailbox mailbox = new ZMailbox(mboxopt);
    ZSearchParams search = new ZSearchParams("Expression");
    search.setTypes("contact");
    ZSearchResult result = mailbox.search(search);
    			
    System.out.println(result);
    The output of result.toString() is in JSON format.

    Can someone please explain what the setResponseProtocol/setRequestProtocol methods are are good for ?
    And how can I I get a response in SOAP/XML format?

    The code above should basically do the same like the following command:
    Code:
    zmmailbox -a  foo@bar.com -p 'strongpassword'  -m foo@bar.com -r soap12 -d s -t contact "Expression"
    Regards,
    Ruben

  2. #2
    Join Date
    Jul 2008
    Posts
    7
    Rep Power
    7

    Default

    *bump* - anyone?

Similar Threads

  1. Replies: 5
    Last Post: 05-12-2008, 05:32 AM
  2. Importing Cardscan contacts through Outlook
    By mtense in forum Administrators
    Replies: 0
    Last Post: 03-04-2008, 06:20 PM
  3. Bulk moving of contacts
    By Myrddin in forum Users
    Replies: 0
    Last Post: 08-01-2007, 12:33 PM
  4. Cannot delete Contacts
    By zzzzsg in forum Administrators
    Replies: 5
    Last Post: 05-09-2006, 01:50 PM
  5. vbscript to convert Thunderbird contacts
    By zzzzsg in forum Administrators
    Replies: 0
    Last Post: 05-04-2006, 02:00 PM

Posting Permissions

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