1 package org.objectweb.celtix.bus.management; 2 3 import javax.wsdl.Port; 4 import javax.wsdl.WSDLException; 5 6 import org.objectweb.celtix.Bus; 7 import org.objectweb.celtix.ws.addressing.EndpointReferenceType; 8 import org.objectweb.celtix.wsdl.EndpointReferenceUtils; 9 10 public class TransportInstrumentation { 11 protected Bus bus; 12 protected String objectName; 13 protected String serviceName; 14 protected String portName; 15 16 public TransportInstrumentation(Bus b) { 17 bus = b; 18 } 19 20 protected String findServiceName(EndpointReferenceType reference) { 21 return EndpointReferenceUtils.getServiceName( 22 reference).toString(); 23 } 24 25 protected String findPortName(EndpointReferenceType reference) { 26 Port port = null; 27 String name = " "; 28 try { 29 port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), reference); 30 name = port.getName(); 31 } catch (WSDLException e) { 32 } 34 return name; 35 } 36 37 protected String getPortObjectName() { 38 return ",Bus.Service=\"" + serviceName + "\"" + ",Bus.Service.Port=" + portName; 39 } 40 41 } 42 | Popular Tags |