public String registerCallback(EndpointReferenceType callback) {
try {
Bus bus = Bus.init();
WSDLManager manager = new WSDLManagerImpl(bus);
QName interfaceName = EndpointReferenceUtils.getInterfaceName(callback);
String wsdlLocation = EndpointReferenceUtils.getWSDLLocation(callback);
QName serviceName = EndpointReferenceUtils.getServiceName(callback);
String portString = EndpointReferenceUtils.getPortName(callback);
QName portName = new QName(serviceName.getNamespaceURI(), portString);
StringBuffer seiName = new StringBuffer();
seiName.append(JAXBUtils.namespaceURIToPackage(interfaceName.getNamespaceURI()));
seiName.append(".");
seiName.append(JAXBUtils.nameToIdentifier(interfaceName.getLocalPart(),
JAXBUtils.IdentifierType.INTERFACE));
Class<?> sei = null;
try {
sei = Class.forName(seiName.toString(),
true, manager.getClass().getClassLoader());
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
}
URL wsdlURL = new URL(wsdlLocation);