@Override public WebservicesMetaData parse(URL url) { return new WebservicesFactory(url).load(url); } }
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit unit = phaseContext.getDeploymentUnit(); final ResourceRoot deploymentRoot = unit.getAttachment(Attachments.DEPLOYMENT_ROOT); final URL webservicesDescriptorURL = getWebServicesDescriptorURL(deploymentRoot); if (webservicesDescriptorURL != null) { final WebservicesMetaData webservicesMD = WebservicesFactory.load(webservicesDescriptorURL); unit.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, webservicesMD); } }
/** * Load webservices.xml from <code>META-INF/webservices.xml</code> * or <code>WEB-INF/webservices.xml</code>. * * @param root virtual file root * @return WebservicesMetaData or <code>null</code> if it cannot be found */ public WebservicesMetaData loadFromVFSRoot(UnifiedVirtualFile root) { WebservicesMetaData webservices = null; UnifiedVirtualFile wsdd = root.findChildFailSafe("META-INF/webservices.xml"); // Maybe a web application deployment? if (null == wsdd) { wsdd = root.findChildFailSafe("WEB-INF/webservices.xml"); } // the descriptor is optional if (wsdd != null) { return load(wsdd.toURL()); } return webservices; }