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 WSIFServiceRef implements Referenceable { 74 75 String wsdlLoc; 76 String serviceNS; 77 String serviceName; 78 String portTypeNS; 79 String portTypeName; 80 81 90 public WSIFServiceRef( 91 String wsdl, 92 String sNS, 93 String sName, 94 String ptNS, 95 String ptName) { 96 Trc.entry(this, wsdl, sNS, sName, ptNS, ptName); 97 98 wsdlLoc = wsdl; 99 serviceNS = sNS; 100 serviceName = sName; 101 portTypeNS = ptNS; 102 portTypeName = ptName; 103 if (Trc.ON) 104 Trc.exit(deep()); 105 } 106 107 113 public Reference getReference() throws NamingException { 114 Trc.entry(this); 115 116 Reference ref = 117 new Reference ( 118 WSIFServiceRef.class.getName(), 119 WSIFServiceObjectFactory.class.getName(), 120 null); 121 ref.add(new StringRefAddr ("wsdlLoc", wsdlLoc)); 122 ref.add(new StringRefAddr ("serviceNS", serviceNS)); 123 ref.add(new StringRefAddr ("serviceName", serviceName)); 124 ref.add(new StringRefAddr ("portTypeNS", portTypeNS)); 125 ref.add(new StringRefAddr ("portTypeName", portTypeName)); 126 127 Trc.exit(ref); 128 return ref; 129 } 130 131 public String deep() { 132 String buff = ""; 133 try { 134 buff = new String (this.toString() + "\n"); 135 buff += "wsdlLoc: " + wsdlLoc; 136 buff += " serviceNS: " + serviceNS; 137 buff += " serviceName: " + serviceName; 138 buff += " portTypeNS: " + portTypeNS; 139 buff += " portTypeName: " + portTypeName; 140 } catch (Exception e) { 141 Trc.exceptionInTrace(e); 142 } 143 return buff; 144 } 145 } | Popular Tags |