WebMetaData webMetaData = (WebMetaData)di.metaData;
if (webMetaData == null)
throw new IllegalStateException("Deployment unit does not contain web meta data");
WebservicesMetaData wsMetaData = getWebservicesMetaData(di, "WEB-INF/webservices.xml");
if (wsMetaData == null)
throw new IllegalStateException("Deployment unit does not contain webservices meta data");
// Copy the attachments
dep.addAttachment(WebservicesMetaData.class, wsMetaData);
dep.addAttachment(WebMetaData.class, webMetaData);
for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
{
for (PortComponentMetaData pcmd : wsd.getPortComponents())
{
String servletLink = pcmd.getServletLink();
if (servletLink == null)