RequestHandler reqHandler = endpoint.getRequestHandler();
try
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
reqHandler.handleWSDLRequest(endpoint, baos, null); // The context is null
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
Element root = DOMUtils.parse(bais);
Element serviceEl = DOMUtils.getFirstChildElement(root, new QName("http://schemas.xmlsoap.org/wsdl/", "service"));
String serviceName = DOMUtils.getAttributeValue(serviceEl, "name");