juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svi...@apache.org
Subject cvs commit: ws-juddi/src/java/org/apache/juddi/registry RegistryServlet.java
Date Tue, 08 Mar 2005 16:51:19 GMT
sviens      2005/03/08 08:51:19

  Modified:    src/java/org/apache/juddi/registry RegistryServlet.java
  Log:
  
  
  Revision  Changes    Path
  1.15      +10 -4     ws-juddi/src/java/org/apache/juddi/registry/RegistryServlet.java
  
  Index: RegistryServlet.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/registry/RegistryServlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- RegistryServlet.java	3 Mar 2005 12:58:48 -0000	1.14
  +++ RegistryServlet.java	8 Mar 2005 16:51:19 -0000	1.15
  @@ -17,6 +17,8 @@
   
   import java.io.IOException;
   import java.io.InputStream;
  +import java.io.OutputStream;
  +import java.io.OutputStreamWriter;
   import java.util.Properties;
   import java.util.Vector;
   
  @@ -205,8 +207,8 @@
     public void doPost(HttpServletRequest req, HttpServletResponse res)
       throws ServletException, IOException
     {
  -    res.setContentType("text/xml; charset=utf-8");
  -      
  +    res.setContentType("text/xml; charset=utf-8");        
  +
       SOAPMessage soapReq = null;
       SOAPMessage soapRes = null;
   
  @@ -439,8 +441,12 @@
       }
       finally 
       {
  -      try {               
  -        soapRes.writeTo(res.getOutputStream());     
  +      try {  
  +        OutputStream stream = res.getOutputStream();        
  +        OutputStreamWriter writer = new OutputStreamWriter(stream); 
  +        writer.write("<?xml version='1.0' encoding='UTF-8'?>");
  +        writer.flush();        
  +        soapRes.writeTo(stream); 
         }
         catch(SOAPException sex) {
           log.error(sex);
  
  
  

Mime
View raw message