1 16 package org.apache.axis.deployment.wsdd; 17 18 import org.apache.axis.encoding.SerializationContext; 19 import org.w3c.dom.Element ; 20 import org.xml.sax.helpers.AttributesImpl ; 21 22 import javax.xml.namespace.QName ; 23 import java.io.IOException ; 24 25 26 37 public class WSDDBeanMapping 38 extends WSDDTypeMapping 39 { 40 44 public WSDDBeanMapping() 45 { 46 } 47 48 public WSDDBeanMapping(Element e) 49 throws WSDDException 50 { 51 super(e); 52 53 serializer = BEAN_SERIALIZER_FACTORY; 54 deserializer = BEAN_DESERIALIZER_FACTORY; 55 encodingStyle = null; 56 } 57 58 protected QName getElementName() { 59 return QNAME_BEANMAPPING; 60 } 61 62 public void writeToContext(SerializationContext context) throws IOException { 63 AttributesImpl attrs = new AttributesImpl (); 64 65 String typeStr = context.qName2String(typeQName); 66 attrs.addAttribute("", ATTR_LANG_SPEC_TYPE, 67 ATTR_LANG_SPEC_TYPE, "CDATA", typeStr); 68 69 String qnameStr = context.qName2String(qname); 70 attrs.addAttribute("", ATTR_QNAME, ATTR_QNAME, "CDATA", qnameStr); 71 72 context.startElement(WSDDConstants.QNAME_BEANMAPPING, attrs); 73 context.endElement(); 74 } 75 } 76 77 78 79 | Popular Tags |