You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2001/11/06 15:09:07 UTC
cvs commit: xml-axis/java/src/org/apache/axis SOAPPart.java SimpleTargetedChain.java SimpleChain.java SerializationException.java FaultableHandler.java AxisEngine.java
butek 01/11/06 06:09:07
Modified: java/src/org/apache/axis SOAPPart.java
SimpleTargetedChain.java SimpleChain.java
SerializationException.java FaultableHandler.java
AxisEngine.java
Log:
Internationalized org.apache.axis package.
Revision Changes Path
1.2 +21 -23 xml-axis/java/src/org/apache/axis/SOAPPart.java
Index: SOAPPart.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SOAPPart.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SOAPPart.java 2001/11/02 03:07:40 1.1
+++ SOAPPart.java 2001/11/06 14:09:07 1.2
@@ -59,6 +59,7 @@
import org.apache.axis.encoding.SerializationContext;
import org.apache.axis.message.InputStreamBody;
import org.apache.axis.message.SOAPEnvelope;
+import org.apache.axis.utils.JavaUtils;
import org.apache.log4j.Category;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -132,7 +133,7 @@
form = FORM_FAULT;
}
if (category.isDebugEnabled()) {
- category.debug( "Enter SOAPPart ctor ("+formNames[form]+")" );
+ category.debug(JavaUtils.getMessage("enter00", "SOAPPart ctor (" + formNames[form] + ")"));
}
setCurrentMessage(initialContents, form);
}
@@ -198,9 +199,7 @@
*/
private void setCurrentMessage(Object currMsg, int form) {
if (category.isDebugEnabled()) {
- category.debug( "Setting current message form to: " +
- formNames[form] +" (currentMessage is now " +
- currMsg + ")" );
+ category.debug(JavaUtils.getMessage("setCurrMsg00", formNames[form], currMsg.toString()));
}
currentMessage = currMsg ;
currentForm = form ;
@@ -211,9 +210,9 @@
* array. This will force buffering of the message.
*/
public byte[] getAsBytes() {
- category.debug( "Enter: SOAPPart::getAsBytes" );
+ category.debug(JavaUtils.getMessage("enter00", "SOAPPart::getAsBytes"));
if ( currentForm == FORM_BYTES ) {
- category.debug( "Exit: SOAPPart::getAsBytes" );
+ category.debug(JavaUtils.getMessage("exit00", "SOAPPart::getAsBytes"));
return( (byte[]) currentMessage );
}
@@ -221,7 +220,7 @@
try {
getAsSOAPEnvelope();
} catch (Exception e) {
- category.fatal("Couldn't make envelope", e);
+ category.fatal(JavaUtils.getMessage("makeEnvFail00"), e);
return null;
}
}
@@ -240,13 +239,13 @@
// byte[] buf = new byte[ len ];
// inp.read( buf );
setCurrentMessage( buf, FORM_BYTES );
- category.debug( "Exit: SOAPPart::getAsByes" );
+ category.debug(JavaUtils.getMessage("exit00", "SOAPPart::getAsByes"));
return( (byte[]) currentMessage );
}
catch( Exception e ) {
e.printStackTrace( System.err );
}
- category.debug( "Exit: SOAPPart::getAsByes" );
+ category.debug(JavaUtils.getMessage("exit00", "SOAPPart::getAsByes"));
return( null );
}
@@ -257,12 +256,12 @@
if ( currentForm == FORM_STRING ) {
setCurrentMessage( ((String)currentMessage).getBytes(),
FORM_BYTES );
- category.debug( "Exit: SOAPPart::getAsBytes" );
+ category.debug(JavaUtils.getMessage("exit00", "SOAPPart::getAsByes"));
return( (byte[]) currentMessage );
}
- System.err.println("Can't convert " + currentForm + " to Bytes" );
- category.debug( "Exit: SOAPPart::getAsBytes" );
+ System.err.println(JavaUtils.getMessage("cantConvert00", "" + currentForm));
+ category.debug(JavaUtils.getMessage("exit00", "SOAPPart::getAsByes"));
return( null );
}
@@ -271,10 +270,10 @@
* This will force buffering of the message.
*/
public String getAsString() {
- category.debug( "Enter: SOAPPart::getAsString" );
+ category.debug(JavaUtils.getMessage("enter00", "SOAPPart::getAsString") );
if ( currentForm == FORM_STRING ) {
- category.debug( "Exit: SOAPPart::getAsString, currentMessage is "+
- currentMessage );
+ category.debug( JavaUtils.getMessage("exit00", "SOAPPart::getAsString, currentMessage = " +
+ currentMessage) );
return( (String) currentMessage );
}
@@ -287,8 +286,8 @@
if ( currentForm == FORM_BYTES ) {
setCurrentMessage( new String((byte[]) currentMessage),
FORM_STRING );
- category.debug( "Exit: SOAPPart::getAsString, currentMessage is "+
- currentMessage );
+ category.debug( JavaUtils.getMessage("exit00", "SOAPPart::getAsString, currentMessage = " +
+ currentMessage) );
return( (String) currentMessage );
}
@@ -318,9 +317,8 @@
return (String)currentMessage;
}
- System.err.println("Can't convert form " + currentForm +
- " to String" );
- category.debug( "Exit: SOAPPart::getAsString" );
+ System.err.println(JavaUtils.getMessage("cantConvert01", "" + currentForm));
+ category.debug(JavaUtils.getMessage("exit00", "SOAPPart::getAsString"));
return( null );
}
@@ -332,8 +330,8 @@
public SOAPEnvelope getAsSOAPEnvelope()
throws AxisFault
{
- category.debug( "Enter: SOAPPart::getAsSOAPEnvelope; currentForm is "+
- formNames[currentForm] );
+ category.debug( JavaUtils.getMessage("enter00", "SOAPPart::getAsSOAPEnvelope, currentForm = " +
+ formNames[currentForm]) );
if ( currentForm == FORM_SOAPENVELOPE )
return( (SOAPEnvelope) currentMessage );
@@ -367,7 +365,7 @@
}
setCurrentMessage(dser.getEnvelope(), FORM_SOAPENVELOPE);
- category.debug( "Exit: SOAPPart::getAsSOAPEnvelope" );
+ category.debug( JavaUtils.getMessage("exit00", "SOAPPart::getAsSOAPEnvelope") );
return( (SOAPEnvelope) currentMessage );
}
1.30 +9 -8 xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java
Index: SimpleTargetedChain.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SimpleTargetedChain.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- SimpleTargetedChain.java 2001/10/30 16:46:34 1.29
+++ SimpleTargetedChain.java 2001/11/06 14:09:07 1.30
@@ -56,6 +56,7 @@
package org.apache.axis ;
import org.apache.axis.handlers.BasicHandler;
+import org.apache.axis.utils.JavaUtils;
import org.apache.log4j.Category;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -94,7 +95,7 @@
* that has been successfully invoked and then rethrow the fault.
*/
public void invoke(MessageContext msgContext) throws AxisFault {
- category.debug("Enter: SimpleTargetedChain::invoke" );
+ category.debug(JavaUtils.getMessage("enter00", "SimpleTargetedChain::invoke") );
if ( requestHandler != null ) requestHandler.invoke( msgContext );
try {
if ( pivotHandler != null ) pivotHandler.invoke( msgContext );
@@ -121,11 +122,11 @@
requestHandler.undo( msgContext );
throw (AxisFault) e ;
}
- category.debug("Exit: SimpleTargetedChain::invoke" );
+ category.debug(JavaUtils.getMessage("exit00", "SimpleTargetedChain::invoke") );
}
public void generateWSDL(MessageContext msgContext) throws AxisFault {
- category.debug("Enter: SimpleTargetedChain::editWSDL" );
+ category.debug(JavaUtils.getMessage("enter00", "SimpleTargetedChain::editWSDL") );
if ( requestHandler != null ) requestHandler.generateWSDL( msgContext );
try {
if ( pivotHandler != null ) pivotHandler.generateWSDL( msgContext );
@@ -149,18 +150,18 @@
e = new AxisFault( e );
throw (AxisFault) e ;
}
- category.debug("Exit: SimpleTargetedChain::editWSDL" );
+ category.debug(JavaUtils.getMessage("exit00", "SimpleTargetedChain::editWSDL") );
}
/**
* Undo all of the work - in reverse order.
*/
public void undo(MessageContext msgContext) {
- category.debug("Enter: SimpleTargetedChain::undo" );
+ category.debug(JavaUtils.getMessage("enter00", "SimpleTargetedChain::undo") );
if ( responseHandler != null ) responseHandler.undo( msgContext );
if ( pivotHandler != null ) pivotHandler.undo( msgContext );
if ( requestHandler != null ) requestHandler.undo( msgContext );
- category.debug("Exit: SimpleTargetedChain::undo" );
+ category.debug(JavaUtils.getMessage("exit00", "SimpleTargetedChain::undo") );
}
public boolean canHandleBlock(QName qname) {
@@ -198,12 +199,12 @@
}
public Element getDeploymentData(Document doc) {
- category.debug("Enter: SimpleTargetedChain::getDeploymentData" );
+ category.debug(JavaUtils.getMessage("enter00", "SimpleTargetedChain::getDeploymentData") );
Element root = doc.createElementNS("", "chain");
fillInDeploymentData(root);
- category.debug("Exit: SimpleTargetedChain::getDeploymentData" );
+ category.debug(JavaUtils.getMessage("exit00", "SimpleTargetedChain::getDeploymentData") );
return( root );
}
1.32 +8 -8 xml-axis/java/src/org/apache/axis/SimpleChain.java
Index: SimpleChain.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SimpleChain.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- SimpleChain.java 2001/10/30 16:46:34 1.31
+++ SimpleChain.java 2001/11/06 14:09:07 1.32
@@ -58,6 +58,7 @@
import org.apache.axis.handlers.BasicHandler;
import org.apache.axis.strategies.InvocationStrategy;
import org.apache.axis.strategies.WSDLGenStrategy;
+import org.apache.axis.utils.JavaUtils;
import org.apache.log4j.Category;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -110,7 +111,7 @@
private void doVisiting(MessageContext msgContext,
HandlerIterationStrategy visitor) throws AxisFault {
- category.debug("Enter: SimpleChain::invoke" );
+ category.debug(JavaUtils.getMessage("enter00", "SimpleChain::invoke"));
int i = 0 ;
try {
Vector localHandlers;
@@ -130,7 +131,7 @@
((Handler) handlers.elementAt( i )).undo( msgContext );
throw (AxisFault) e ;
}
- category.debug("Exit: SimpleChain::invoke" );
+ category.debug(JavaUtils.getMessage("exit00", "SimpleChain::invoke"));
}
/**
@@ -138,10 +139,10 @@
* later on has faulted - in reverse order.
*/
public void undo(MessageContext msgContext) {
- category.debug("Enter: SimpleChain::undo" );
+ category.debug(JavaUtils.getMessage("enter00", "SimpleChain::undo"));
for ( int i = handlers.size()-1 ; i >= 0 ; i-- )
((Handler) handlers.elementAt( i )).undo( msgContext );
- category.debug("Exit: SimpleChain::undo" );
+ category.debug(JavaUtils.getMessage("exit00", "SimpleChain::undo"));
}
public boolean canHandleBlock(QName qname) {
@@ -153,8 +154,7 @@
public void addHandler(Handler handler) {
if (handler == null)
- throw new NullPointerException(
- "SimpleChain.addHandler: Null handler!");
+ throw new NullPointerException(JavaUtils.getMessage("exception01"));
if ( handlers == null ) handlers = new Vector();
handlers.add( handler );
@@ -182,7 +182,7 @@
}
public Element getDeploymentData(Document doc) {
- category.debug("Enter: SimpleChain::getDeploymentData" );
+ category.debug( JavaUtils.getMessage("enter00","SimpleChain::getDeploymentData") );
Element root = doc.createElementNS("", "chain" );
@@ -210,7 +210,7 @@
}
}
- category.debug("Exit: SimpleChain::getDeploymentData" );
+ category.debug(JavaUtils.getMessage("exit00", "SimpleChain::getDeploymentData") );
return( root );
}
};
1.4 +3 -1 xml-axis/java/src/org/apache/axis/SerializationException.java
Index: SerializationException.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SerializationException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SerializationException.java 2001/10/30 16:46:34 1.3
+++ SerializationException.java 2001/11/06 14:09:07 1.4
@@ -54,6 +54,8 @@
*/
package org.apache.axis;
+import org.apache.axis.utils.JavaUtils;
+
/**
* @author Russell Butek (butek@us.ibm.com)
*/
@@ -62,6 +64,6 @@
public SerializationException (String type, Throwable t)
{
// This string must be internationalized.
- super ("Exception configuring bean serialization for " + type, t);
+ super (JavaUtils.getMessage("exception00", type), t);
} // ctor
} // class SerializationException
1.27 +5 -4 xml-axis/java/src/org/apache/axis/FaultableHandler.java
Index: FaultableHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/FaultableHandler.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- FaultableHandler.java 2001/10/31 23:50:19 1.26
+++ FaultableHandler.java 2001/11/06 14:09:07 1.27
@@ -57,6 +57,7 @@
import org.apache.axis.handlers.BasicHandler;
import org.apache.axis.registries.HandlerRegistry;
+import org.apache.axis.utils.JavaUtils;
import org.apache.log4j.Category;
import javax.xml.rpc.namespace.QName;
@@ -101,7 +102,7 @@
* and already processed it's undo logic - as needed.
*/
public void invoke(MessageContext msgContext) throws AxisFault {
- category.debug("Enter: FaultableHandler::invoke" );
+ category.debug(JavaUtils.getMessage("enter00", "FaultableHandler::invoke"));
try {
workHandler.invoke( msgContext );
}
@@ -150,16 +151,16 @@
throw (AxisFault) e ;
}
}
- category.debug("Exit: FaultableHandler::invoke" );
+ category.debug(JavaUtils.getMessage("exit00", "FaultableHandler::invoke"));
}
/**
* Some handler later on has faulted so we need to undo our work.
*/
public void undo(MessageContext msgContext) {
- category.debug("Enter: FaultableHandler::undo" );
+ category.debug(JavaUtils.getMessage("enter00", "FaultableHandler::undo"));
workHandler.undo( msgContext );
- category.debug("Exit: FaultableHandler::undo" );
+ category.debug(JavaUtils.getMessage("exit00", "FaultableHandler::undo"));
};
public boolean canHandleBlock(QName qname) {
1.43 +9 -8 xml-axis/java/src/org/apache/axis/AxisEngine.java
Index: AxisEngine.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisEngine.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- AxisEngine.java 2001/10/31 23:50:19 1.42
+++ AxisEngine.java 2001/11/06 14:09:07 1.43
@@ -70,6 +70,7 @@
import org.apache.axis.registries.SupplierRegistry;
import org.apache.axis.session.Session;
import org.apache.axis.session.SimpleSession;
+import org.apache.axis.utils.JavaUtils;
import org.apache.log4j.Category;
import javax.xml.rpc.namespace.QName;
@@ -124,7 +125,7 @@
// !!! Set up default configuration?
init();
- category.debug("Exit: AxisEngine no-arg constructor");
+ category.debug(JavaUtils.getMessage("exit01", "AxisEngine"));
}
public AxisEngine(ConfigurationProvider configProvider)
@@ -137,7 +138,7 @@
* (re)initialize - What should really go in here???
*/
public void init() {
- category.debug("Enter: AxisEngine::init" );
+ category.debug(JavaUtils.getMessage("enter00", "AxisEngine::init"));
getTypeMappingRegistry().setParent(SOAPTypeMappingRegistry.getSingleton());
@@ -145,10 +146,10 @@
configProvider.configureEngine(this);
} catch (Exception e) {
e.printStackTrace();
- throw new NullPointerException("Problem deploying!");
+ throw new NullPointerException(JavaUtils.getMessage("problemDeploying00"));
}
- category.debug("Exit: AxisEngine::init" );
+ category.debug(JavaUtils.getMessage("exit00", "AxisEngine::init"));
}
/**
@@ -206,7 +207,7 @@
try {
configProvider.writeEngineConfig(this);
} catch (Exception e) {
- System.err.println("Coudn't write engine config!");
+ System.err.println(JavaUtils.getMessage("saveConfigFail00"));
e.printStackTrace();
}
}
@@ -300,8 +301,8 @@
DeserializerFactory deserFactory,
Serializer serializer)
{
- category.info("Registering type mapping " + qName + " -> " +
- cls.getName());
+ category.info(JavaUtils.getMessage("registerTypeMap00",
+ qName.toString(), cls.getName()));
if (deserFactory != null)
getTypeMappingRegistry().addDeserializerFactory(qName,
cls,
@@ -353,7 +354,7 @@
public void deployService(String key, SOAPService service)
throws DeploymentException
{
- category.info("Deploying service '" + key + "' into " + this);
+ category.info(JavaUtils.getMessage("deployService00", key, this.toString()));
service.setName(key);
service.setEngine(this);