public <T> T getPort(EndpointReferenceType endpointReference, Class<T> type, WebServiceFeature... features) { endpointReference = EndpointReferenceUtils.resolve(endpointReference, bus); QName serviceQName = EndpointReferenceUtils.getServiceName(endpointReference, bus); String portName = EndpointReferenceUtils.getPortName(endpointReference); QName portQName = null; if (portName != null && serviceQName != null) { String ns = serviceQName.getNamespaceURI(); if (StringUtils.isEmpty(ns)) { //hack to workaround a xalan bug for (QName qn : portInfos.keySet()) { if (portName.equals(qn.getLocalPart())) { ns = qn.getNamespaceURI(); } } } if (StringUtils.isEmpty(ns) && serviceName != null) { ns = serviceName.getNamespaceURI(); } portQName = new QName(ns, portName); } return createPort(portQName, endpointReference, type, features); }
public <T> T getPort(EndpointReferenceType endpointReference, Class<T> type, WebServiceFeature... features) { endpointReference = EndpointReferenceUtils.resolve(endpointReference, bus); QName serviceQName = EndpointReferenceUtils.getServiceName(endpointReference, bus); String portName = EndpointReferenceUtils.getPortName(endpointReference); QName portQName = null; if (portName != null && serviceQName != null) { String ns = serviceQName.getNamespaceURI(); if (StringUtils.isEmpty(ns)) { //hack to workaround a xalan bug for (QName qn : portInfos.keySet()) { if (portName.equals(qn.getLocalPart())) { ns = qn.getNamespaceURI(); } } } if (StringUtils.isEmpty(ns) && serviceName != null) { ns = serviceName.getNamespaceURI(); } portQName = new QName(ns, portName); } return createPort(portQName, endpointReference, type, features); }