/** * Gets the WSDL definition for the provided endpoint reference. * @param manager - the WSDL manager * @param ref - the endpoint reference * @return Definition the wsdl definition * @throws WSDLException */ public static Definition getWSDLDefinition(WSDLManager manager, EndpointReferenceType ref) throws WSDLException { if (null == manager) { return null; } MetadataType metadata = ref.getMetadata(); String location = getWSDLLocation(ref); if (null != location) { //Pick up the first url to obtain the wsdl defintion return manager.getDefinition(location); } for (Object obj : metadata.getAny()) { if (obj instanceof Element) { Element el = (Element)obj; if (StringUtils.isEqualUri(el.getNamespaceURI(), WSDLConstants.NS_WSDL11) && "definitions".equals(el.getLocalName())) { return manager.getDefinition(el); } } } return null; }
/** * Gets the WSDL definition for the provided endpoint reference. * @param manager - the WSDL manager * @param ref - the endpoint reference * @return Definition the wsdl definition * @throws WSDLException */ public static Definition getWSDLDefinition(WSDLManager manager, EndpointReferenceType ref) throws WSDLException { if (null == manager) { return null; } MetadataType metadata = ref.getMetadata(); String location = getWSDLLocation(ref); if (null != location) { //Pick up the first url to obtain the wsdl defintion return manager.getDefinition(location); } for (Object obj : metadata.getAny()) { if (obj instanceof Element) { Element el = (Element)obj; if (StringUtils.isEqualUri(el.getNamespaceURI(), WSDLConstants.NS_WSDL11) && "definitions".equals(el.getLocalName())) { return manager.getDefinition(el); } } } return null; }