QName serviceName = getServiceName(ref, bus);
return new QName(serviceName.getNamespaceURI(), getPortName(ref));
}
public static void setPortName(EndpointReferenceType ref, String portName) {
MetadataType metadata = ref.getMetadata();
if (metadata != null) {
for (Object obj : metadata.getAny()) {
if (obj instanceof Element) {
Element node = (Element)obj;
if (node.getNodeName().contains("ServiceName")
&& (node.getNamespaceURI().equals(JAXWSAConstants.NS_WSAW)
|| node.getNamespaceURI().equals(NS_WSAW_2005))) {