axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manu George" <manu.t.geo...@gmail.com>
Subject Axis Questions
Date Tue, 04 Apr 2006 10:08:02 GMT
Hi,
          I have the following queries/suggestions on the Axis 1.4 codebase.

1) In the XmlUtils.java class we are creating a ThreadLocalDocumentBuilder
.So for each thread we have a separate instance of
ThreadLocalDocumentBuilder. Wouldn't it be better to have a method

    public static DocumentBuilder getDocumentBuilder() throws
ParserConfigurationException {
         DocumentBuilder db;
         synchronized (dbf) {
              db = dbf.newDocumentBuilder();
        }
        return db;
   }

This will result in fewer objects being created and also the thread safety
is maintained.

2) In UTF8Encoder.java I want to allow hex chars > 0x7F without converting
to ASCII representation. I can modify the code in my copy but is it possible
to incorporate this functionality by means of a flag in the axis distro?

3) In AxisServlet.java I need to replace
                contentType = responseMsg.getContentType(
msgContext.getSOAPConstants());
 with
                contentType = msgContext.getSOAPConstants
().getContentType();
for certain services. Currently I have modified  the code and added an if
else block

            if (msgContext.getTargetService() != null
                && (msgContext.getTargetService().equals("SrvcT1") ||
                    msgContext.getTargetService().equals("SrvcT2") ||
                    msgContext.getTargetService().equals("SrvcT3"))) {
                contentType = msgContext.getSOAPConstants
().getContentType();
            } else {
                // determine content type from message response
                contentType = responseMsg.getContentType(
msgContext.getSOAPConstants());
            }

Is there a better way to do this? i.e. without changing the axis classes.

Thanks
Manu

Mime
View raw message