Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-04-2008, 07:13 PM
Project Contributor
 
Posts: 67
Default [SOLVED] Zimlet with Soap Calls

I'm a bit stuck trying to use the local Zimbra soap service via a Zimlet .jsp.. I got as far as authenticating and constructing a soap call (CreateCalendarResourceRequest), but the response is always:

Code:
HTTP ERROR: 500

unknown document: CreateCalendarResourceRequest


If anyone has any ideas about what's going, it would be very appreciated!

Code:
       SoapProvisioning sp = new SoapProvisioning();
       sp.soapSetURI("https://127.0.0.1:7071/service/admin/soap/");
       sp.soapAdminAuthenticate("resourceadmin", "********");       
       SoapHttpTransport soapHttpTransport = new SoapHttpTransport(sp.soapGetURI());
       soapHttpTransport.setAuthToken(sp.getAuthToken());
       
       XMLElement req = new XMLElement("CreateCalendarResourceRequest");
       Element name = req.addElement("name");
       Element pass = req.addElement("password");
              
       out.println(req.toString());
       Element tagsResponse = soapHttpTransport.invoke(req);
       out.println(tagsResponse.prettyPrint());
Reply With Quote
  #2 (permalink)  
Old 05-04-2008, 10:42 PM
Project Contributor
 
Posts: 67
Arrow

Found the answer hidden away on another thread in the forums, had to add the urn:zimbraAdmin attribute to the tag :

Code:
          XMLElement req = new XMLElement("CreateCalendarResourceRequest");
          req.addAttribute("xmlns", "urn:zimbraAdmin");
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.