1 57 58 package org.apache.wsif.naming; 59 60 import javax.naming.NamingException ; 61 import javax.naming.Reference ; 62 import javax.naming.Referenceable ; 63 import javax.naming.StringRefAddr ; 64 import org.apache.wsif.logging.Trc; 65 66 73 public class WSIFServiceStubRef implements Referenceable { 74 75 String wsdlLoc; 76 String serviceNS; 77 String serviceName; 78 String portTypeNS; 79 String portTypeName; 80 String preferredPort; 81 String className; 82 83 94 public WSIFServiceStubRef( 95 String wsdl, 96 String sNS, 97 String sName, 98 String ptNS, 99 String ptName, 100 String portName, 101 String cls) { 102 Trc.entry(this, wsdl, sNS, sName, ptNS, ptName, portName, cls); 103 104 wsdlLoc = wsdl; 105 serviceNS = sNS; 106 serviceName = sName; 107 portTypeNS = ptNS; 108 portTypeName = ptName; 109 preferredPort = portName; 110 className = cls; 111 if (Trc.ON) 112 Trc.exit(deep()); 113 } 114 115 121 public Reference getReference() throws NamingException { 122 Trc.entry(this); 123 124 Reference ref = 125 new Reference ( 126 WSIFServiceStubRef.class.getName(), 127 WSIFServiceObjectFactory.class.getName(), 128 null); 129 ref.add(new StringRefAddr ("wsdlLoc", wsdlLoc)); 130 ref.add(new StringRefAddr ("serviceNS", serviceNS)); 131 ref.add(new StringRefAddr ("serviceName", serviceName)); 132 ref.add(new StringRefAddr ("portTypeNS", portTypeNS)); 133 ref.add(new StringRefAddr ("portTypeName", portTypeName)); 134 ref.add(new StringRefAddr ("preferredPort", preferredPort)); 135 ref.add(new StringRefAddr ("className", className)); 136 137 Trc.exit(ref); 138 return ref; 139 } 140 141 public String deep() { 142 String buff = ""; 143 try { 144 buff = new String (this.toString() + "\n"); 145 buff += "wsdlLoc: " + wsdlLoc; 146 buff += " serviceNS: " + serviceNS; 147 buff += " serviceName: " + serviceName; 148 buff += " portTypeNS: " + portTypeNS; 149 buff += " portTypeName: " + portTypeName; 150 buff += " preferredPort: " + preferredPort; 151 buff += " className: " + className; 152 } catch (Exception e) { 153 Trc.exceptionInTrace(e); 154 } 155 return buff; 156 } 157 } | Popular Tags |