default :
return;
}
ServiceRefPortInfo portInfo = null;
// If port is known, it takes precedence in lookup.
if( port != null ) {
portInfo = serviceRef.getPortInfoByPort(port);
}
if( portInfo == null ) {
portInfo = serviceRef.getPortInfoBySEI(serviceEndpointInterface);
}
if( portInfo != null ) {
Set properties = portInfo.getStubProperties();
for(Iterator iter = properties.iterator(); iter.hasNext();) {
NameValuePairDescriptor next = (NameValuePairDescriptor)
iter.next();
if( next.getName().equals
(WsUtil.CLIENT_TRANSPORT_LOG_PROPERTY) ) {
// value is a URL
wsUtil.setClientTransportLog(serviceRef, stub,
next.getValue());
} else if(next.getName().equals(ServiceEngineUtil.JBI_ENABLED)){
setJBIProperties(stub, portInfo);
} else {
stub._setProperty(next.getName(), next.getValue());
}
}
// If this port has a resolved target endpoint address due to a
// port-component-link, set it on stub. However, if the runtime
// info has an entry for target endpoint address, that takes
// precedence.
if( portInfo.hasTargetEndpointAddress() ) {
if(!portInfo.hasStubProperty(Stub.ENDPOINT_ADDRESS_PROPERTY)) {
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
portInfo.getTargetEndpointAddress());
}
}
}
}