axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/message BodyBuilder.java EnvelopeBuilder.java MessageElement.java RPCHandler.java RPCParam.java SAXOutputter.java SOAPEnvelope.java SimpleHandlerFactory.java
Date Wed, 07 Nov 2001 19:00:42 GMT
butek       01/11/07 11:00:42

  Modified:    java/src/org/apache/axis/message BodyBuilder.java
                        EnvelopeBuilder.java MessageElement.java
                        RPCHandler.java RPCParam.java SAXOutputter.java
                        SOAPEnvelope.java SimpleHandlerFactory.java
  Log:
  Internationalized org.apache.axis.message package.
  
  Revision  Changes    Path
  1.11      +6 -6      xml-axis/java/src/org/apache/axis/message/BodyBuilder.java
  
  Index: BodyBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/BodyBuilder.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- BodyBuilder.java	2001/10/30 14:19:29	1.10
  +++ BodyBuilder.java	2001/11/07 19:00:42	1.11
  @@ -63,6 +63,7 @@
   import org.apache.axis.Constants;
   import org.apache.axis.MessageContext;
   import org.apache.axis.encoding.DeserializationContext;
  +import org.apache.axis.utils.JavaUtils;
   import org.apache.log4j.Category;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
  @@ -91,7 +92,7 @@
           throws SAXException
       {
           if (category.isDebugEnabled()) {
  -            category.debug("In BodyBuilder.onStartChild()");
  +            category.debug(JavaUtils.getMessage("enter00", "BodyBuilder.onStartChild()"));
           }
           SOAPHandler handler = null;
           
  @@ -110,8 +111,7 @@
   
           if (isRoot &&
               context.getMessageContext().getServiceHandler() == null) {
  -            category.debug( "Dispatching to body namespace '" +
  -                        namespace + "'");
  +            category.debug( JavaUtils.getMessage("dispatching00", namespace));
               context.getMessageContext().setTargetService(namespace);
           }
           
  @@ -147,7 +147,7 @@
           handler.myElement = element;
           
           if (category.isDebugEnabled()) {
  -            category.debug("Out BodyBuilder.onStartChild()");
  +            category.debug(JavaUtils.getMessage("exit00", "BodyBuilder.onStartChild()"));
           }
           return handler;
       }
  @@ -156,7 +156,7 @@
                              DeserializationContext context)
       {
           if (category.isDebugEnabled()) {
  -            category.debug("In BodyBuilder.onEndChild()");
  +            category.debug(JavaUtils.getMessage("enter00", "BodyBuilder.onEndChild()"));
           }
           
           if (element != null) {
  @@ -165,7 +165,7 @@
           }
   
           if (category.isDebugEnabled()) {
  -            category.debug("Out BodyBuilder.onEndChild()");
  +            category.debug(JavaUtils.getMessage("exit00", "BodyBuilder.onEndChild()"));
           }
       }
   }
  
  
  
  1.13      +8 -7      xml-axis/java/src/org/apache/axis/message/EnvelopeBuilder.java
  
  Index: EnvelopeBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/EnvelopeBuilder.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- EnvelopeBuilder.java	2001/10/30 14:19:29	1.12
  +++ EnvelopeBuilder.java	2001/11/07 19:00:42	1.13
  @@ -61,6 +61,7 @@
   
   import org.apache.axis.Constants;
   import org.apache.axis.encoding.DeserializationContext;
  +import org.apache.axis.utils.JavaUtils;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
   
  @@ -104,11 +105,12 @@
           throws SAXException
       {
           if (!namespace.equals(Constants.URI_SOAP_ENV))
  -            throw new SAXException("Bad envelope namespace '" + namespace +
  -                                         "'");
  +            throw new SAXException(
  +                    JavaUtils.getMessage("badNamespace00", namespace));
           
           if (!localName.equals(Constants.ELEM_ENVELOPE))
  -            throw new SAXException("Bad envelope tag " + localName);
  +            throw new SAXException(
  +                    JavaUtils.getMessage("badTag00", localName));
   
           String prefix = "";
           int idx = qName.indexOf(":");
  @@ -131,7 +133,7 @@
           QName thisQName = new QName(namespace, localName);
           if (thisQName.equals(headerQName)) {
               if (gotHeader)
  -                throw new SAXException("Only one Header element allowed!");
  +                throw new SAXException(JavaUtils.getMessage("only1Header00"));
               
               gotHeader = true;
               return new HeaderBuilder(envelope);
  @@ -139,15 +141,14 @@
           
           if (thisQName.equals(bodyQName)) {
               if (gotBody)
  -                throw new SAXException("Only one Body element allowed!");
  +                throw new SAXException(JavaUtils.getMessage("only1Body00"));
               
               gotBody = true;
               return new BodyBuilder(envelope);
           }
           
           if (!gotBody)
  -            throw new SAXException("No custom elements allowed at top level "+
  -                                   "until after the <Body>");
  +            throw new SAXException(JavaUtils.getMessage("noCustomElems00"));
   
           /*
           element = new MessageElement(namespace, localName, prefix,
  
  
  
  1.60      +9 -10     xml-axis/java/src/org/apache/axis/message/MessageElement.java
  
  Index: MessageElement.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/MessageElement.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- MessageElement.java	2001/11/06 21:38:05	1.59
  +++ MessageElement.java	2001/11/07 19:00:42	1.60
  @@ -65,6 +65,7 @@
   import org.apache.axis.encoding.SerializationContext;
   import org.apache.axis.encoding.TypeMappingRegistry;
   import org.apache.axis.utils.Mapping;
  +import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.XMLUtils;
   import org.apache.log4j.Category;
   import org.w3c.dom.Document;
  @@ -140,7 +141,7 @@
                      Attributes attributes, DeserializationContext context)
       {
           if (category.isDebugEnabled()) {
  -            category.debug("New MessageElement (" + super.toString() + ") named " + qName);
  +            category.debug(JavaUtils.getMessage("newElem00", super.toString(), "" + qName));
               for (int i = 0; attributes != null && i < attributes.getLength();
i++) {
                   category.debug("  " + attributes.getQName(i) + " = '" + attributes.getValue(i)
+ "'");
               }
  @@ -278,7 +279,7 @@
               return parent.getNamespaceURI(prefix);
   
           if (category.isDebugEnabled()) {
  -            category.debug(this + " didn't find prefix '" + prefix + "'");
  +            category.debug(JavaUtils.getMessage("noPrefix00", "" + this, prefix));
           }
   
           return null;
  @@ -287,14 +288,12 @@
       public Object getValueAsType(QName type) throws Exception
       {
           if (context == null)
  -            throw new Exception(
  -             "No deserialization context to use in getValueAsType()!");
  +            throw new Exception(JavaUtils.getMessage("noContext00"));
   
           TypeMappingRegistry tmr = context.getTypeMappingRegistry();
           Deserializer dser = tmr.getDeserializer(type);
           if (dser == null)
  -            throw new Exception("No deserializer for requested type " +
  -                                type);
  +            throw new Exception(JavaUtils.getMessage("noDeser00", "" + type));
   
           context.pushElementHandler(new EnvelopeHandler(dser));
   
  @@ -375,8 +374,8 @@
           Reader reader = new StringReader(writer.getBuffer().toString());
           Document doc = XMLUtils.newDocument(new InputSource(reader));
           if (doc == null)
  -            throw new Exception("Couldn't get DOM document: XML was \"" +
  -                                writer.getBuffer().toString() + "\"");
  +            throw new Exception(
  +                    JavaUtils.getMessage("noDoc00", writer.getBuffer().toString()));
   
           return doc.getDocumentElement();
       }
  @@ -384,7 +383,7 @@
       public void publishToHandler(ContentHandler handler) throws SAXException
       {
           if (recorder == null)
  -            throw new SAXException("No event recorder inside element");
  +            throw new SAXException(JavaUtils.getMessage("noRecorder00"));
   
           recorder.replay(startEventIndex, endEventIndex, handler);
       }
  @@ -392,7 +391,7 @@
       public void publishContents(ContentHandler handler) throws SAXException
       {
           if (recorder == null)
  -            throw new SAXException("No event recorder inside element");
  +            throw new SAXException(JavaUtils.getMessage("noRecorder00"));
   
           recorder.replay(startContentsIndex, endEventIndex-1, handler);
       }
  
  
  
  1.16      +11 -10    xml-axis/java/src/org/apache/axis/message/RPCHandler.java
  
  Index: RPCHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/RPCHandler.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- RPCHandler.java	2001/10/30 14:19:29	1.15
  +++ RPCHandler.java	2001/11/07 19:00:42	1.16
  @@ -67,6 +67,7 @@
   import org.apache.axis.encoding.Deserializer;
   import org.apache.axis.encoding.TypeMappingRegistry;
   import org.apache.axis.utils.AxisClassLoader;
  +import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.cache.JavaClass;
   import org.apache.log4j.Category;
   import org.xml.sax.Attributes;
  @@ -106,8 +107,8 @@
               Class           cls    = jc.getJavaClass();
               
               if (category.isDebugEnabled()) {
  -                category.debug("Looking up method '" + methodName +
  -                                   "' in class " + clsName);
  +                category.debug(JavaUtils.getMessage(
  +                        "lookup00", methodName, clsName));
               }
   
               // try to find the method without knowing the number of
  @@ -142,7 +143,7 @@
            * - Cache service description
            */
           if (category.isDebugEnabled()) {
  -            category.debug("In RPCHandler.onStartChild()");
  +            category.debug(JavaUtils.getMessage("enter00", "RPCHandler.onStartChild()"));
           }
           
           Vector params = call.getParams();
  @@ -157,7 +158,7 @@
                                                      localName,
                                                      attributes);
           if (category.isDebugEnabled()) {
  -            category.debug("Type from attrs was " + type);
  +            category.debug(JavaUtils.getMessage("typeFromAttr00", "" + type));
           }
           
           // xsi:type always overrides everything else
  @@ -175,7 +176,7 @@
                       if (defaultParamTypes[0]==MessageContext.class) index++;
                   type = typeMap.getTypeQName(defaultParamTypes[index]);
                   if (category.isDebugEnabled()) {
  -                    category.debug("Type from default parms was " + type);
  +                    category.debug(JavaUtils.getMessage("typeFromParms00", "" + type));
                   }
               }
           }
  @@ -188,8 +189,8 @@
           }
           
           if (dser == null) {
  -            throw new SAXException("Deserializing param '" + localName +
  -                "' : Couldn't find deserializer for type " + type);
  +            throw new SAXException(JavaUtils.getMessage(
  +                    "noDeser01", localName,"" + type));
           }
           
           String isNil = attributes.getValue(Constants.URI_2001_SCHEMA_XSI, "nil");
  @@ -200,7 +201,7 @@
           }
           
           if (category.isDebugEnabled()) {
  -            category.debug("Out RPCHandler.onStartChild()");
  +            category.debug(JavaUtils.getMessage("exit00", "RPCHandler.onStartChild()"));
           }
           return dser;
       }
  @@ -210,8 +211,8 @@
           throws SAXException
       {
           if (category.isDebugEnabled()) {
  -            category.debug("Setting MessageContext property in " +
  -                               "RPCHandler.endElement().");
  +            category.debug(JavaUtils.getMessage("setProp00",
  +                    "MessageContext", "RPCHandler.endElement()."));
           }
           context.getMessageContext().setProperty("RPC", call);
       }
  
  
  
  1.29      +3 -1      xml-axis/java/src/org/apache/axis/message/RPCParam.java
  
  Index: RPCParam.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/RPCParam.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- RPCParam.java	2001/10/30 14:19:29	1.28
  +++ RPCParam.java	2001/11/07 19:00:42	1.29
  @@ -56,6 +56,8 @@
   
   import org.apache.axis.encoding.SerializationContext;
   
  +import org.apache.axis.utils.JavaUtils;
  +
   import javax.xml.rpc.namespace.QName;
   import java.io.IOException;
   import java.lang.reflect.Field;
  @@ -79,7 +81,7 @@
           try {
               valueField = cls.getField("value");
           } catch (NoSuchFieldException e) {
  -            System.err.println("No value field for RPCParam to use?!? " + e);
  +            System.err.println(JavaUtils.getMessage("noValue00", "" + e));
               System.exit(-1);
           }
       }
  
  
  
  1.11      +4 -5      xml-axis/java/src/org/apache/axis/message/SAXOutputter.java
  
  Index: SAXOutputter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SAXOutputter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SAXOutputter.java	2001/10/30 14:19:29	1.10
  +++ SAXOutputter.java	2001/11/07 19:00:42	1.11
  @@ -80,7 +80,7 @@
       
       public void endDocument() throws SAXException {
           if (category.isDebugEnabled()) {
  -            category.debug("SAXOutputter: end document.");
  +            category.debug("SAXOutputter.endDocument");
           }
       }
       
  @@ -94,8 +94,7 @@
       
       public void characters(char[] p1, int p2, int p3) throws SAXException {
           if (category.isDebugEnabled()) {
  -            category.debug("(out) characters ['" +
  -                               new String(p1, p2, p3) + "']");
  +            category.debug("SAXOutputter.characters ['" + new String(p1, p2, p3) + "']");
           }
           try {
               context.writeChars(p1, p2, p3);
  @@ -122,7 +121,7 @@
           throws SAXException
       {
           if (category.isDebugEnabled()) {
  -            category.debug("(out) startElement ['" + namespace + "' " +
  +            category.debug("SAXOutputter.startElement ['" + namespace + "' " +
                              localName + "]");
           }
   
  @@ -137,7 +136,7 @@
           throws SAXException
       {
           if (category.isDebugEnabled()) {
  -            category.debug("(out) endElement ['" + namespace + "' " +
  +            category.debug("SAXOutputter.endElement ['" + namespace + "' " +
                              localName + "]");
           }
           
  
  
  
  1.45      +9 -7      xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java
  
  Index: SOAPEnvelope.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- SOAPEnvelope.java	2001/10/31 23:50:21	1.44
  +++ SOAPEnvelope.java	2001/11/07 19:00:42	1.45
  @@ -62,6 +62,7 @@
   import org.apache.axis.client.AxisClient;
   import org.apache.axis.encoding.DeserializationContext;
   import org.apache.axis.encoding.SerializationContext;
  +import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.Mapping;
   import org.apache.log4j.Category;
   import org.xml.sax.InputSource;
  @@ -171,7 +172,7 @@
       public void addHeader(SOAPHeader header)
       {
           if (category.isDebugEnabled())
  -            category.debug("Adding header to message...");
  +            category.debug(JavaUtils.getMessage("addHeader00"));
           header.setEnvelope(this);
           headers.addElement(header);
           _isDirty = true;
  @@ -180,7 +181,7 @@
       public void addBodyElement(SOAPBodyElement element)
       {
           if (category.isDebugEnabled())
  -            category.debug("Adding body element to message...");
  +            category.debug(JavaUtils.getMessage("addBody00"));
           element.setEnvelope(this);
           bodyElements.addElement(element);
           _isDirty = true;
  @@ -189,7 +190,7 @@
       public void removeHeader(SOAPHeader header)
       {
           if (category.isDebugEnabled())
  -            category.debug("Removing header from message...");
  +            category.debug(JavaUtils.getMessage("removeHeader00"));
           headers.removeElement(header);
           _isDirty = true;
       }
  @@ -197,7 +198,7 @@
       public void removeBodyElement(SOAPBodyElement element)
       {
           if (category.isDebugEnabled())
  -            category.debug("Removing body element from message...");
  +            category.debug(JavaUtils.getMessage("removeBody00"));
           bodyElements.removeElement(element);
           _isDirty = true;
       }
  @@ -205,7 +206,7 @@
       public void removeTrailer(MessageElement element)
       {
           if (category.isDebugEnabled())
  -            category.debug("Removing trailer from message...");
  +            category.debug(JavaUtils.getMessage("removeTrailer00"));
           trailers.removeElement(element);
           _isDirty = true;
       }
  @@ -220,7 +221,7 @@
       public void addTrailer(MessageElement element)
       {
           if (category.isDebugEnabled())
  -            category.debug("Adding trailer to message...");
  +            category.debug(JavaUtils.getMessage("removeTrailer00"));
           element.setEnvelope(this);
           trailers.addElement(element);
           _isDirty = true;
  @@ -313,7 +314,8 @@
                                          Constants.ELEM_ENVELOPE), attrs);
           
           if (category.isDebugEnabled())
  -            category.debug(headers.size() + " headers");
  +            category.debug(headers.size() + " "
  +                    + JavaUtils.getMessage("headers00"));
           
           if (!headers.isEmpty()) {
               // Output <SOAP-ENV:Header>
  
  
  
  1.8       +5 -2      xml-axis/java/src/org/apache/axis/message/SimpleHandlerFactory.java
  
  Index: SimpleHandlerFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SimpleHandlerFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SimpleHandlerFactory.java	2001/10/30 14:19:29	1.7
  +++ SimpleHandlerFactory.java	2001/11/07 19:00:42	1.8
  @@ -60,6 +60,7 @@
    * @author Glen Daniels (gdaniels@allaire.com)
    */
   import org.apache.axis.encoding.DeserializationContext;
  +import org.apache.axis.utils.JavaUtils;
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
   
  @@ -100,7 +101,8 @@
               try {
                   handler = (SOAPHandler)cls.newInstance();
               } catch (Exception e) {
  -                throw new SAXException("Coudldn't create class " + cls.getName());
  +                throw new SAXException(
  +                        JavaUtils.getMessage("noClass00", cls.getName()));
               }
           }
           
  @@ -108,7 +110,8 @@
               handler = defaultHandler;
           
           if (handler == null)
  -            throw new SAXException("No handler for QName " + qName);
  +            throw new SAXException(
  +                    JavaUtils.getMessage("noHandler00", "" + qName));
           return handler;
       }
   }
  
  
  

Mime
View raw message