View Javadoc

1   /**
2    * 
3    */
4   package net.sf.crispy.impl.jaxrpc;
5   
6   import java.util.Map;
7   
8   import javax.xml.namespace.QName;
9   import javax.xml.rpc.encoding.DeserializerFactory;
10  import javax.xml.rpc.encoding.SerializerFactory;
11  
12  import org.apache.axis.Constants;
13  import org.apache.axis.encoding.ser.MapDeserializerFactory;
14  import org.apache.axis.encoding.ser.MapSerializerFactory;
15  
16  /**
17   * Factory to create a TypeMapping for transfer for <code>java.util.Map</code>-object.
18   * 
19   * @author Linke
20   *
21   */
22  public class MapTypeMappingFactory implements TypeMappingFactory {
23  
24  	public void setParameter (String pvParams[]) {}
25  	
26  	/**
27  	 * @see net.sf.crispy.impl.jaxrpc.TypeMappingFactory#getJavaType()
28  	 */
29  	public Class getJavaType() { return Map.class; }
30  
31  	/**
32  	 * @see net.sf.crispy.impl.jaxrpc.TypeMappingFactory#getXmlType()
33  	 */
34  	public QName getXmlType() {	return Constants.SOAP_MAP; }
35  
36  	/**
37  	 * @see net.sf.crispy.impl.jaxrpc.TypeMappingFactory#getSerializerFactory()
38  	 */
39  	public SerializerFactory getSerializerFactory() { return new MapSerializerFactory(Map.class, Constants.SOAP_MAP); }
40  
41  	/**
42  	 * @see net.sf.crispy.impl.jaxrpc.TypeMappingFactory#getDeserializerFactory()
43  	 */
44  	public DeserializerFactory getDeserializerFactory() { return new MapDeserializerFactory(Map.class, Constants.SOAP_MAP); }
45  
46  }