{
String pcLink = req.getParameter("pcLink");
if (pcLink == null)
throw new IllegalArgumentException("Cannot obtain request parameter 'pcLink'");
Endpoint endpoint = epRegistry.resolve( new PortComponentResolver(pcLink) );
if (endpoint == null)
throw new WSException("Cannot resolve port-component-link: " + pcLink);
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class);
String endpointAddress = sepMetaData.getEndpointAddress();
out.println(endpointAddress);
log.debug("Resolved " + pcLink + " to: " + endpointAddress);
out.close();