[jbossws-issues] [JBoss JIRA] Commented: (JBWS-2333) Refactor ArchiveDeployerHook.getWebservicesMetaData() to Separate Deployer
Richard Opalka (JIRA)
jira-events at lists.jboss.org
Wed Oct 1 08:14:21 EDT 2008
[ https://jira.jboss.org/jira/browse/JBWS-2333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12431940#action_12431940 ]
Richard Opalka commented on JBWS-2333:
--------------------------------------
See org.jboss.deployment.JBossWebAppParsingDeployer for example of such deployer.
> Refactor ArchiveDeployerHook.getWebservicesMetaData() to Separate Deployer
> --------------------------------------------------------------------------
>
> Key: JBWS-2333
> URL: https://jira.jboss.org/jira/browse/JBWS-2333
> Project: JBoss Web Services
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Components: jbossws-cxf, jbossws-metro, jbossws-native
> Affects Versions: jbossws-native-3.0.3, jbossws-metro-3.0.3, jbossws-cxf-3.0.3
> Reporter: Richard Opalka
> Assignee: Richard Opalka
> Fix For: jbossws-native-3.0.4, jbossws-metro-3.0.4, jbossws-cxf-3.0.4
>
>
> We do the following in <b>org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.getWebservicesMetaData(DeploymentUnit unit)</b>
> <pre>
> /** Unmrashall the webservices.xml if there is one
> */
> protected WebservicesMetaData getWebservicesMetaData(DeploymentUnit unit)
> {
> WebservicesMetaData wsMetaData = unit.getAttachment(WebservicesMetaData.class);
> UnifiedVirtualFile vfWebservices = getWebservicesFile(unit);
> if (wsMetaData == null && vfWebservices != null)
> {
> try
> {
> URL wsURL = vfWebservices.toURL();
> Element root = DOMUtils.parse(wsURL.openStream());
> String namespaceURI = root.getNamespaceURI();
> if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
> {
> Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
> ObjectModelFactory factory = new WebservicesFactory(wsURL);
> wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(wsURL.openStream(), factory, null);
> unit.addAttachment(WebservicesMetaData.class, wsMetaData);
> }
> }
> catch (Exception ex)
> {
> throw new WSFDeploymentException(ex);
> }
> }
> return wsMetaData;
> }
> </pre>
> It integrates with deployers improperly. This method should be refactored to separate deployer that does this translation job from webservices.xml -> WebservicesMetaData class
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossws-issues
mailing list