1 57 58 package org.apache.wsif.wsdl; 59 60 import javax.wsdl.Definition; 61 import javax.wsdl.extensions.ExtensionRegistry; 62 import javax.wsdl.factory.WSDLFactory; 63 64 import org.apache.wsif.base.WSIFServiceImpl; 65 import org.apache.wsif.logging.Trc; 66 67 import com.ibm.wsdl.DefinitionImpl; 68 import com.ibm.wsdl.xml.WSDLReaderImpl; 69 import com.ibm.wsdl.xml.WSDLWriterImpl; 70 71 75 public class WSIFWSDLFactoryImpl extends WSDLFactory { 76 77 public WSIFWSDLFactoryImpl() { 78 Trc.entry(this); 79 Trc.exit(); 80 } 81 82 public Definition newDefinition() { 83 Trc.entry(this); 84 Definition def = new DefinitionImpl(); 85 def.setExtensionRegistry(newPopulatedExtensionRegistry()); 86 Trc.exit(def); 87 return def; 88 } 89 90 public javax.wsdl.xml.WSDLReader newWSDLReader() { 91 Trc.entry(this); 92 WSDLReaderImpl reader = new WSDLReaderImpl(); 93 reader.setFactoryImplName(this.getClass().getName()); 94 reader.setExtensionRegistry(newPopulatedExtensionRegistry()); 95 Trc.exit(reader); 96 return reader; 97 } 98 99 public javax.wsdl.xml.WSDLWriter newWSDLWriter() { 100 Trc.entry(this); 101 WSDLWriterImpl writer = new WSDLWriterImpl(); 102 Trc.exit(writer); 103 return writer; 104 } 105 106 public ExtensionRegistry newPopulatedExtensionRegistry() { 107 Trc.entry(this); 108 ExtensionRegistry extReg = WSIFServiceImpl.getCompositeExtensionRegistry(); 109 if (extReg == null) { 110 extReg = new com.ibm.wsdl.extensions.PopulatedExtensionRegistry(); 111 } 112 Trc.exit(extReg); 113 return extReg; 114 } 115 } | Popular Tags |