axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject cvs commit: xml-axis-wsif/java/src/org/apache/wsif/util TypeSerializerInfo.java TypeSerializer.java
Date Tue, 14 Jan 2003 17:29:50 GMT
antelder    2003/01/14 09:29:50

  Modified:    java/src/org/apache/wsif/providers/soap/apacheaxis
                        WSIFOperation_ApacheAxis.java
  Added:       java/src/org/apache/wsif/util TypeSerializerInfo.java
  Removed:     java/src/org/apache/wsif/util TypeSerializer.java
  Log:
  From yesterdays start for a fix to bug 16041 change the TypeSerializer class to have a better
name
  
  Revision  Changes    Path
  1.61      +7 -7      xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFOperation_ApacheAxis.java
  
  Index: WSIFOperation_ApacheAxis.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFOperation_ApacheAxis.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- WSIFOperation_ApacheAxis.java	14 Jan 2003 14:59:54 -0000	1.60
  +++ WSIFOperation_ApacheAxis.java	14 Jan 2003 17:29:50 -0000	1.61
  @@ -124,7 +124,7 @@
   import org.apache.wsif.logging.Trc;
   import org.apache.wsif.providers.WSIFDynamicTypeMap;
   import org.apache.wsif.providers.WSIFDynamicTypeMapping;
  -import org.apache.wsif.util.TypeSerializer;
  +import org.apache.wsif.util.TypeSerializerInfo;
   import org.apache.wsif.util.WSIFUtils;
   import org.apache.wsif.util.jms.WSIFJMSDestination;
   import org.apache.wsif.wsdl.extensions.jms.JMSProperty;
  @@ -1935,7 +1935,7 @@
           List defaultMappings = (List) value;
           for (Iterator i = defaultMappings.iterator(); i.hasNext(); ) {
           	Object o = i.next();
  -        	if (!(o instanceof org.apache.wsif.util.TypeSerializer)) {
  +        	if (!(o instanceof TypeSerializerInfo)) {
             	    throw new WSIFException(
           	        "context part '"
           	        + WSIFAXISConstants.CONTEXT_DEFAULT_SOAP_TYPE_SERIALIZERS
  @@ -1943,7 +1943,7 @@
           	        + "of org.apache.wsif.util.TypeSerializer: "
           	        + value); 
           	}
  -        	TypeSerializer ts = (TypeSerializer) o;
  +        	TypeSerializerInfo ts = (TypeSerializerInfo) o;
           	
              	Class javaType = ts.getJavaType();
              	QName elementType = ts.getElementType();     
  @@ -1989,7 +1989,7 @@
   			DeserializerFactory df = null;
   			
   			// the context may override the default (de)serializer for a type
  -			TypeSerializer contextTypeSerializer = 
  +			TypeSerializerInfo contextTypeSerializer = 
   			    findContextTypeSerialzer(context, objClass, xmlType);
   			if (contextTypeSerializer != null) {
   				objClass = contextTypeSerializer.getJavaType();
  @@ -2036,7 +2036,7 @@
   		}
   	}
   
  -    private static TypeSerializer findContextTypeSerialzer(
  +    private static TypeSerializerInfo findContextTypeSerialzer(
           WSIFMessage context,
           Class clazz,
           QName xmlType)
  @@ -2062,7 +2062,7 @@
           List typeSerializers = (List) value;
           for (Iterator i = typeSerializers.iterator(); i.hasNext(); ) {
           	Object o = i.next();
  -        	if (!(o instanceof TypeSerializer)) {
  +        	if (!(o instanceof TypeSerializerInfo)) {
             	    throw new WSIFException(
           	        "context part '"
           	        + WSIFAXISConstants.CONTEXT_SOAP_TYPE_SERIALIZERS
  @@ -2070,7 +2070,7 @@
           	        + "of org.apache.wsif.util.TypeSerializer: "
           	        + value); 
           	}
  -        	TypeSerializer tm = (TypeSerializer) o;
  +        	TypeSerializerInfo tm = (TypeSerializerInfo) o;
           	    
              	Class javaType = tm.getJavaType();
              	QName elementType = tm.getElementType();     
  
  
  
  1.1                  xml-axis-wsif/java/src/org/apache/wsif/util/TypeSerializerInfo.java
  
  Index: TypeSerializerInfo.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "WSIF" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation and was
   * originally based on software copyright (c) 2001, 2002, International
   * Business Machines, Inc., http://www.apache.org.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.wsif.util;
  
  import java.io.Serializable;
  
  import javax.xml.namespace.QName;
  
  import org.apache.wsif.logging.Trc;
  
  /**
   * This class maps a element/java type with its (de)serializers 
   */
  public class TypeSerializerInfo implements Serializable {
  
  	private static final long serialVersionUID = 1L;
  
  	protected QName elementType;
  	protected Class javaType;
  	protected Object serializer;
  	protected Object deserializer;
  
  	public TypeSerializerInfo(
  		QName elementType,
  		Class javaType,
  		Object serializer,
  		Object deserializer) {
  		Trc.entry(this, elementType, javaType, serializer, deserializer);
  		this.elementType = elementType;
  		this.javaType = javaType;
  		this.serializer = serializer;
  		this.deserializer = deserializer;
  		Trc.exit();
  	}
  
  	/**
  	 * Returns the deserializer.
  	 * @return Object
  	 */
  	public Object getDeserializer() {
  		Trc.entry(this);
  		Trc.exit(deserializer);
  		return deserializer;
  	}
  
  	/**
  	 * Returns the elementType.
  	 * @return QName
  	 */
  	public QName getElementType() {
  		Trc.entry(this);
  		Trc.exit(elementType);
  		return elementType;
  	}
  
  	/**
  	 * Returns the javaType.
  	 * @return Class
  	 */
  	public Class getJavaType() {
  		Trc.entry(this);
  		Trc.exit(javaType);
  		return javaType;
  	}
  
  	/**
  	 * Returns the serializer.
  	 * @return Object
  	 */
  	public Object getSerializer() {
  		Trc.entry(this);
  		Trc.exit(serializer);
  		return serializer;
  	}
  
  	/**
  	 * Sets the deserializer.
  	 * @param deserializer The deserializer to set
  	 */
  	public void setDeserializer(Object deserializer) {
  		Trc.entry(this, deserializer);
  		this.deserializer = deserializer;
  		Trc.exit();
  	}
  
  	/**
  	 * Sets the elementType.
  	 * @param elementType The elementType to set
  	 */
  	public void setElementType(QName elementType) {
  		Trc.entry(this, elementType);
  		this.elementType = elementType;
  		Trc.exit();
  	}
  
  	/**
  	 * Sets the javaType.
  	 * @param javaType The javaType to set
  	 */
  	public void setJavaType(Class javaType) {
  		Trc.entry(this, javaType);
  		this.javaType = javaType;
  		Trc.exit();
  	}
  
  	/**
  	 * Sets the serializer.
  	 * @param serializer The serializer to set
  	 */
  	public void setSerializer(Object serializer) {
  		Trc.entry(this, serializer);
  		this.serializer = serializer;
  		Trc.exit();
  	}
  
  	public String toString() {
  		return "[TypeSerializerInfo elementType="
  			+ elementType
  			+ ", "
  			+ "javaType="
  			+ javaType
  			+ ", "
  			+ "serializer="
  			+ serializer
  			+ ", "
  			+ "deserializer="
  			+ deserializer
  			+ "]";
  	}
  
  }
  
  

Mime
View raw message