}
@Override
public Deployment createDeployment(DeploymentInfo di)
{
ArchiveDeployment dep = newDeployment(di);
dep.setRootFile(new URLLoaderAdapter(di.localUrl));
dep.setRuntimeClassLoader(di.ucl);
dep.setType(getDeploymentType());
Service service = dep.getService();
ApplicationMetaData appmd = (ApplicationMetaData)di.metaData;
if (appmd == null)
throw new IllegalStateException("Deployment unit does not contain application meta data");
WebservicesMetaData wsMetaData = getWebservicesMetaData(di, null);
if (wsMetaData == null)
throw new IllegalStateException("Deployment unit does not contain webservices meta data");
// Copy the attachments
dep.addAttachment(WebservicesMetaData.class, wsMetaData);
dep.addAttachment(ApplicationMetaData.class, appmd);
for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
{
for (PortComponentMetaData pcmd : wsd.getPortComponents())
{