1 package org.apache.axis2.wsdl.databinding; 2 3 import javax.xml.namespace.QName ; 4 import java.util.HashMap ; 5 6 23 public abstract class TypeMappingAdapter implements TypeMapper{ 24 protected static final String XSD_SCHEMA_URL = "http://www.w3.org/2001/XMLSchema"; 25 protected HashMap map = new HashMap (); 27 protected int counter=0; 29 protected static final int UPPER_PARAM_LIMIT = 1000; 31 32 36 public String getTypeMapping(QName qname) { 37 if ((qname!=null)){ 38 Object o = map.get(qname); 39 if (o!=null){ 40 return (String )o; 41 }else{ 42 return "org.apache.axis2.om.OMElement"; 43 } 44 } 45 46 return null; 47 } 48 49 52 public String getParameterName(QName qname) { 53 if (counter==UPPER_PARAM_LIMIT){ 54 counter=0; 55 } 56 return "param" + counter++; 57 } 58 59 62 public void addTypeMapping(QName qname, Object value) { 63 map.put(qname,value); 64 } 65 } 66 | Popular Tags |