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

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 (11) Thread Tools Display Modes
  #31 (permalink)  
Old 11-22-2007, 11:08 PM
Active Member
 
Posts: 37
Default

Hi Jgao,

I am new to pre-auth. I want to know where we put the jsp URL and how to insert into our Third-Party web page...?

Also we are giving only one username in the file. If another user login to third-party application and click the link means, privacy is broken know,, So please give me basic and detailed guidline to use pre-auth for me.

I look at the Wiki page, but i get more confused like, where to use the URL and how to apply to all users, etc...

So please clear me......

Expecting your reply..

Thanks!...
Reply With Quote
  #32 (permalink)  
Old 11-23-2007, 04:08 AM
Starter Member
 
Posts: 1
Default Cant get authToken

Hello Everyone,
For some reason, I cant seem to get the auth Token from /service/soap. (I get a java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:7070/service/soap)
I can get all the other JSON responses from the server normally. When I login as user1 into Zimbra(in debug mode), I can see the auth token in the Zimbra SOAP Request/Response window. So it's only through my code that auth_token isn't being returned.
Could there be something wrong with my LDAP ?

Thanks,
-Linux/Java newbie


My Code... (Which Doesn't work)

Code:
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page  language="java" %>
<%@ page  import="java.io.*" %>
<%@ page  import="java.net.*" %>

String GetAuthTokenSOAPString = "<soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'>";
	 GetAuthTokenSOAPString = "<soap:Header>";
	 GetAuthTokenSOAPString = "<context xmlns='urn:zimbra'>";
	 GetAuthTokenSOAPString = "<format type='js'/>";
	 GetAuthTokenSOAPString = "</context>";
	 GetAuthTokenSOAPString = "</soap:Header>";
	 GetAuthTokenSOAPString = "<soap:Body>";
	 GetAuthTokenSOAPString = "<AuthRequest xmlns='urn:zimbraAccount'>";
	 GetAuthTokenSOAPString = "<account by='name'>user1</account>";
	 GetAuthTokenSOAPString = "<password>test123</password>";
	 GetAuthTokenSOAPString = "</AuthRequest>";
	 GetAuthTokenSOAPString = "</soap:Body>";
	 GetAuthTokenSOAPString = "</soap:Envelope>";
		 
	 	 
	try
 	{
 	  	  
	  URL url = new URL("http://localhost:7070/service/soap");
	  URLConnection connection = url.openConnection();
	  connection.setDoOutput(true);
	  
	  OutputStreamWriter out1 = new OutputStreamWriter(
              connection.getOutputStream());
	  out1.write(GetAuthTokenSOAPString);
	  out1.close();
		
		BufferedReader in = new BufferedReader(
		new InputStreamReader(
		connection.getInputStream()));
		
		String decodedString;
		while ((decodedString = in.readLine()) != null) {
		out.println(decodedString);
		}
		in.close();
 	}
	catch (Exception e)
	{
			out.println(e);
	}
	%>
My Code for Batch Request... (Which works)
Code:
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page  language="java" %>
<%@ page  import="java.io.*" %>
<%@ page  import="java.net.*" %>
 
 
 <%  
	 String SOAPstring = "<soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'>\r\n";
	 SOAPstring += "<soap:Header> ";
	 SOAPstring += "<context xmlns='urn:zimbra'>";
	 SOAPstring += "<userAgent name='ZimbraWebClient - FF1.5 (Linux)' version='0.0'/>";
	 SOAPstring += "<sessionId id='8'/>";
	 SOAPstring += "<change token='199' type='new'/>";
	 SOAPstring += "<authToken>0_fda5351a0674d8d0eff356353d20f0c049d05c6c_69643d33363a33616563316263302d646133352d343631652d396438652d3030653538326465353562353b6578703d31333a313139353937383434313439353b</authToken>";
	 SOAPstring += "<format type='js'/>";
	 SOAPstring += "</context>";
	 SOAPstring += "</soap:Header>";
	 SOAPstring += "<soap:Body>";
	 //SOAPstring += "<BatchRequest xmlns='urn:zimbra' onerror='continue'>";
	 //SOAPstring += "<GetApptSummariesRequest xmlns='urn:zimbraMail' s='1195709400000' e='1195792200000' l='10' id='0'/>";
	 //SOAPstring += "</BatchRequest>";
	 SOAPstring += "<GetInfoRequest xmlns='urn:zimbraAccount'/>";
	 SOAPstring += "</soap:Body>";
	 SOAPstring += "</soap:Envelope>";
	
	try
 	{
 	  	  
	  URL url = new URL("http://localhost:7070/service/soap");
	  URLConnection connection = url.openConnection();
	  connection.setDoOutput(true);
	  
	  OutputStreamWriter out1 = new OutputStreamWriter(
              connection.getOutputStream());
	  out1.write(SOAPstring);
	  out1.close();
		
		BufferedReader in = new BufferedReader(
		new InputStreamReader(
		connection.getInputStream()));
		
		String decodedString;
		while ((decodedString = in.readLine()) != null) {
		out.println(decodedString);
		}
		in.close();
 	}
	catch (Exception e)
	{
			out.println(e);
	}
	%>
Reply With Quote
  #33 (permalink)  
Old 01-27-2009, 12:25 AM
New Member
 
Posts: 3
Default

how about if im running Zimbra on Liferay portal and using it as my mail service?

thx
Reply With Quote
  #34 (permalink)  
Old 04-06-2009, 11:52 PM
Special Member
 
Posts: 159
Exclamation regarding integration of liferay and zimbra

I have the same issue,


any luck bro !!!
Regards
Adeel
Reply With Quote
Reply


Thread Tools
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.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0