View Single Post
  #4 (permalink)  
Old 03-13-2009, 07:30 PM
ab5602 ab5602 is offline
Project Contributor
 
Posts: 67
Default

Sure, this should get you going do a SOAP ADMIN call via JSP in a Zimlet on the server side:

Code:
String adminuser = "adminuser@zimbra.my.org";
String adminpassword = "mypassword";

// Standard SOAP URL on the local host
String soapurl = "https://127.0.0.1/service/soap/";
// Admin SOAP URL on the local host
String adminsoapurl = "https://127.0.0.1:7071/service/admin/soap/";

// Authenticate as the admin user
SoapProvisioning sp = new SoapProvisioning();
sp.soapSetURI(adminsoapurl);                      
sp.soapAdminAuthenticate(adminuser,adminpassword);       
SoapHttpTransport soapHttpTransport = new SoapHttpTransport(sp.soapGetURI());
soapHttpTransport.setAuthToken(sp.getAuthToken());
BTW: there are many examples of how to do the proxy call to an external service in the Zimlet code provided w/ Zimbra.

Last edited by ab5602; 03-13-2009 at 07:39 PM..
Reply With Quote