Commit 6e919f79 authored by Sunil Kumar's avatar Sunil Kumar
Browse files

fix for dsml defect:Not getting proper dsml response document for bogus requests.

parent fc653dd3
......@@ -17,6 +17,7 @@ package;
import com.novell.ldap.LDAPSocketFactory;
import com.novell.ldap.LDAPJSSESecureSocketFactory;
import com.novell.ldap.LDAPConnection;
import com.novell.ldap.LDAPLocalException;
import com.novell.ldap.connectionpool.PoolManager;
import com.novell.ldap.util.DSMLReader;
import com.novell.ldap.util.DSMLWriter;
......@@ -186,8 +187,23 @@ public class DsmlService extends HttpServlet
status = "Last doPost successful";
catch(Exception e)
}catch(LDAPLocalException e){
rsp.setContentType("text/xml; charset=utf-8");
// Get response PrintWriter object from HttpServletResponse so we
// can write response.
respPrtWtr = rsp.getWriter();
// Write XML version to response.
respPrtWtr.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
// Write start of soap envelope.
respPrtWtr.println("<soap-env:Envelope xmlns:soap-env=\"\">");
// Write start of soap body.
// Set response PrintWriter object into DSLMLWriter.
respDsmlWtr = new DSMLWriter(respPrtWtr);
}catch(Exception e)
if(null != respPrtWtr)respPrtWtr.flush();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment