Author: richard.opalka(a)jboss.com
Date: 2011-10-31 11:27:32 -0400 (Mon, 31 Oct 2011)
New Revision: 15176
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/JBossWebservicesDescriptorDeployer.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WebservicesDescriptorDeployer.java
Removed:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
container/jboss60/branches/jbossws-jboss610/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-3376] implemented jboss-webservices.xml parser and updated ASIL processing
accordingly
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/JBossWebservicesDescriptorDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/JBossWebservicesDescriptorDeployer.java
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/JBossWebservicesDescriptorDeployer.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.webservices.integration.deployers;
+
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesDescriptorParser;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
+
+/**
+ * jboss-webservices.xml deployer.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class JBossWebservicesDescriptorDeployer extends
AbstractDescriptorDeployer<JBossWebservicesDescriptorParser,
JBossWebservicesMetaData>
+{
+
+ /**
+ * Constructor.
+ */
+ public JBossWebservicesDescriptorDeployer()
+ {
+ super(JBossWebservicesMetaData.class);
+ }
+
+ /**
+ * MC incallback method. It will be invoked each time WebservicesDescriptorParser bean
will be installed.
+ * @param parser the parser
+ */
+ @Override
+ public void setParser(final JBossWebservicesDescriptorParser parser)
+ {
+ super.setParser(parser);
+ }
+
+}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -28,6 +28,7 @@
import org.jboss.webservices.integration.WebServiceDeployment;
import org.jboss.webservices.integration.deployers.deployment.WSDeploymentBuilder;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
/**
@@ -47,6 +48,7 @@
// inputs
this.addInput(JBossWebMetaData.class);
this.addInput(WebservicesMetaData.class);
+ this.addInput(JBossWebservicesMetaData.class);
this.addInput(WebServiceDeployment.class);
// outputs
Deleted:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.webservices.integration.deployers;
-
-import org.jboss.wsf.spi.metadata.webservices.WebservicesDescriptorParser;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-
-/**
- * webservices.xml deployer.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class WSDescriptorDeployer extends
AbstractDescriptorDeployer<WebservicesDescriptorParser, WebservicesMetaData>
-{
-
- /**
- * Constructor.
- */
- public WSDescriptorDeployer()
- {
- super(WebservicesMetaData.class);
- }
-
- /**
- * MC incallback method. It will be invoked each time WebservicesDescriptorParser bean
will be installed.
- * @param parser the parser
- */
- @Override
- public void setParser(final WebservicesDescriptorParser parser)
- {
- super.setParser(parser);
- }
-
-}
Added:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WebservicesDescriptorDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WebservicesDescriptorDeployer.java
(rev 0)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/WebservicesDescriptorDeployer.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.webservices.integration.deployers;
+
+import org.jboss.wsf.spi.metadata.webservices.WebservicesDescriptorParser;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * webservices.xml deployer.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class WebservicesDescriptorDeployer extends
AbstractDescriptorDeployer<WebservicesDescriptorParser, WebservicesMetaData>
+{
+
+ /**
+ * Constructor.
+ */
+ public WebservicesDescriptorDeployer()
+ {
+ super(WebservicesMetaData.class);
+ }
+
+ /**
+ * MC incallback method. It will be invoked each time WebservicesDescriptorParser bean
will be installed.
+ * @param parser the parser
+ */
+ @Override
+ public void setParser(final WebservicesDescriptorParser parser)
+ {
+ super.setParser(parser);
+ }
+
+}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -29,6 +29,7 @@
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.webservices.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -60,6 +61,10 @@
final JBossMetaData jbmd = this.getAndPropagateAttachment(JBossMetaData.class,
unit, dep);
final WebservicesMetaData wsMetaData =
this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
+ if (unit.isAttachmentPresent(JBossWebservicesMetaData.class))
+ {
+ this.getAndPropagateAttachment(JBossWebservicesMetaData.class, unit, dep);
+ }
this.log.debug("Creating JAXRPC EJB21 endpoints meta data model");
for (final WebserviceDescriptionMetaData webserviceDescriptionMD :
wsMetaData.getWebserviceDescriptions())
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -29,6 +29,7 @@
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -59,6 +60,10 @@
{
final JBossWebMetaData webMetaData =
this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
final WebservicesMetaData wsMetaData =
this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
+ if (unit.isAttachmentPresent(JBossWebservicesMetaData.class))
+ {
+ this.getAndPropagateAttachment(JBossWebservicesMetaData.class, unit, dep);
+ }
this.log.debug("Creating JAXRPC JSE endpoints meta data model");
for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -29,6 +29,7 @@
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.webservices.integration.WebServiceDeclaration;
import org.jboss.webservices.integration.WebServiceDeployment;
@@ -58,6 +59,10 @@
{
this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
+ if (unit.isAttachmentPresent(JBossWebservicesMetaData.class))
+ {
+ this.getAndPropagateAttachment(JBossWebservicesMetaData.class, unit, dep);
+ }
this.log.debug("Creating JAXWS EJB3 endpoints meta data model");
for (final WebServiceDeclaration container : ASHelper.getJaxwsEjbs(unit))
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -31,6 +31,7 @@
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
/**
* Creates new JAXWS JSE deployment.
@@ -57,6 +58,10 @@
protected void build(final Deployment dep, final DeploymentUnit unit)
{
this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
+ if (unit.isAttachmentPresent(JBossWebservicesMetaData.class))
+ {
+ this.getAndPropagateAttachment(JBossWebservicesMetaData.class, unit, dep);
+ }
this.log.debug("Creating JAXWS JSE endpoints meta data model");
final List<ServletMetaData> servlets = ASHelper.getJaxwsServlets(unit);
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -21,19 +21,14 @@
*/
package org.jboss.webservices.integration.metadata;
-import java.util.Iterator;
-
import org.jboss.logging.Logger;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
-import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
/**
* Common class for EJB meta data builders.
@@ -86,67 +81,41 @@
*/
private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData
ejbArchiveMD)
{
- final JBossMetaData jbossMD = WSHelper.getRequiredAttachment(dep,
JBossMetaData.class);
- final WebservicesMetaData webservicesMD = jbossMD.getWebservices();
+ final JBossWebservicesMetaData webservicesMD = WSHelper.getOptionalAttachment(dep,
JBossWebservicesMetaData.class);
- if (webservicesMD == null)
- {
- return;
- }
+ if (webservicesMD == null) return;
// set context root
- String contextRoot = webservicesMD.getContextRoot();
- final WebserviceDescriptionsMetaData wsDescriptionsMD =
webservicesMD.getWebserviceDescriptions();
-
- if (wsDescriptionsMD != null)
- {
- // set wsdl location resolver
- final PublishLocationAdapter resolver = new
PublishLocationAdapterImpl(wsDescriptionsMD);
- ejbArchiveMD.setPublishLocationAdapter(resolver);
-
- final WebserviceDescriptionMetaData wsDescriptionMD = ASHelper
- .getWebserviceDescriptionMetaData(wsDescriptionsMD);
- if (wsDescriptionMD != null)
- {
- if (contextRoot == null && !hasContextRoot(ejbArchiveMD))
- {
- contextRoot = wsDescriptionMD.getWebserviceDescriptionName(); // TCK6
fallback
- }
-
- final String configName = wsDescriptionMD.getConfigName();
- final String configFile = wsDescriptionMD.getConfigFile();
-
- // set config name
- this.log.debug("Setting config name: " + configName);
- ejbArchiveMD.setConfigName(wsDescriptionMD.getConfigName());
-
- // set config file
- this.log.debug("Setting config file: " + configFile);
- ejbArchiveMD.setConfigFile(wsDescriptionMD.getConfigFile());
- }
- }
-
+ final String contextRoot = webservicesMD.getContextRoot();
ejbArchiveMD.setWebServiceContextRoot(contextRoot);
this.log.debug("Setting context root: " + contextRoot);
+
+ // set config name
+ final String configName = webservicesMD.getConfigName();
+ this.log.debug("Setting config name: " + configName);
+ ejbArchiveMD.setConfigName(configName);
+
+ // set config file
+ final String configFile = webservicesMD.getConfigFile();
+ this.log.debug("Setting config file: " + configFile);
+ ejbArchiveMD.setConfigFile(configFile);
+
+ // set wsdl location resolver
+ final WebserviceDescriptionMetaData[] wsDescriptionsMD =
webservicesMD.getWebserviceDescriptions();
+ final PublishLocationAdapter resolver = new
PublishLocationAdapterImpl(wsDescriptionsMD);
+ ejbArchiveMD.setPublishLocationAdapter(resolver);
}
- /**
- * Returns true if has context root, false otherwise.
- *
- * @param ejbArchiveMD ejb archive MD
- * @return true if has context root, false otherwise
- */
- private boolean hasContextRoot(final EJBArchiveMetaData ejbArchiveMD)
- {
- for (final Iterator<EJBMetaData> ejbMDs = ejbArchiveMD.getEnterpriseBeans();
ejbMDs.hasNext(); )
- {
- final EJBMetaData ejbMD = ejbMDs.next();
- if (ejbMD.getPortComponentURI() != null)
- {
- return true;
- }
- }
+ protected PortComponentMetaData getPortComponent(final String ejbName, final
JBossWebservicesMetaData jbossWebservicesMD) {
+ if (jbossWebservicesMD == null) return null;
- return false;
+ PortComponentMetaData portComponentMD = null;
+ for (final WebserviceDescriptionMetaData webserviceDescriptionMD :
jbossWebservicesMD.getWebserviceDescriptions()) {
+ portComponentMD =
webserviceDescriptionMD.getPortComponentByEjbLinkName(ejbName);
+ if (portComponentMD != null) return portComponentMD;
+ }
+
+ return null;
}
+
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -27,13 +27,14 @@
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.javaee.spec.PortComponent;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
/**
* Builds container independent meta data from EJB21 container meta data.
@@ -63,10 +64,11 @@
{
final JBossMetaData jbossMetaData = WSHelper.getRequiredAttachment(dep,
JBossMetaData.class);
final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
+ final JBossWebservicesMetaData jbossWebservicesMD =
WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
for (final JBossEnterpriseBeanMetaData jbossEjbMD :
jbossMetaData.getEnterpriseBeans())
{
- this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD);
+ this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD, jbossWebservicesMD);
}
ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
@@ -83,7 +85,7 @@
* @param jbossEjbMD jboss specific EJB meta data
*/
private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD,
- final JBossEnterpriseBeanMetaData jbossEjbMD)
+ final JBossEnterpriseBeanMetaData jbossEjbMD, final JBossWebservicesMetaData
jbossWebservicesMD)
{
final EJBMetaData wsEjbMD = newEjbMetaData(jbossEjbMD);
@@ -106,19 +108,19 @@
wsEjbMD.setJndiName(sessionEjbMD.determineJndiName());
wsEjbMD.setLocalJndiName(jbossEjbMD.determineLocalJndiName());
- final PortComponent portComponentMD = sessionEjbMD.getPortComponent();
+ final PortComponentMetaData portComponentMD =
getPortComponent(jbossEjbMD.getEjbName(), jbossWebservicesMD);
if (portComponentMD != null)
{
- // set port component meta data
- wsEjbMD.setPortComponentName(portComponentMD.getPortComponentName());
- wsEjbMD.setPortComponentURI(portComponentMD.getPortComponentURI());
+ // set port component meta data
+ wsEjbMD.setPortComponentName(portComponentMD.getPortComponentName());
+ wsEjbMD.setPortComponentURI(portComponentMD.getPortComponentURI());
- // set security meta data
- final EJBSecurityMetaData smd = new EJBSecurityMetaData();
- smd.setAuthMethod(portComponentMD.getAuthMethod());
- smd.setTransportGuarantee(portComponentMD.getTransportGuarantee());
- smd.setSecureWSDLAccess(portComponentMD.getSecureWSDLAccess());
- wsEjbMD.setSecurityMetaData(smd);
+ // set security meta data
+ final EJBSecurityMetaData smd = new EJBSecurityMetaData();
+ smd.setAuthMethod(portComponentMD.getAuthMethod());
+ smd.setTransportGuarantee(portComponentMD.getTransportGuarantee());
+ smd.setSecureWSDLAccess(portComponentMD.getSecureWSDLAccess());
+ wsEjbMD.setSecurityMetaData(smd);
}
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -26,16 +26,16 @@
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.metadata.javaee.spec.PortComponent;
+import org.jboss.webservices.integration.WebServiceDeclaration;
+import org.jboss.webservices.integration.WebServiceDeployment;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.webservices.integration.WebServiceDeclaration;
-import org.jboss.webservices.integration.WebServiceDeployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
/**
* Builds container independent meta data from EJB3 container meta data.
@@ -65,12 +65,13 @@
final JBossMetaData jbossMetaData = WSHelper.getRequiredAttachment(dep,
JBossMetaData.class);
final WebServiceDeployment ejb3Deployment = WSHelper.getRequiredAttachment(dep,
WebServiceDeployment.class);
final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
+ final JBossWebservicesMetaData jbossWebservicesMD =
WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
for (final WebServiceDeclaration ejbEndpoint :
ejb3Deployment.getServiceEndpoints())
{
final String ejbName = ejbEndpoint.getComponentName();
final JBossEnterpriseBeanMetaData jbossEjbMD =
jbossMetaData.getEnterpriseBean(ejbName);
- this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD);
+ this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD, jbossWebservicesMD);
}
ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
@@ -82,7 +83,7 @@
* @param wsEjbsMD jboss agnostic EJBs meta data
* @param jbossEjbMD jboss specific EJB meta data
*/
- private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final
JBossEnterpriseBeanMetaData jbossEjbMD)
+ private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final
JBossEnterpriseBeanMetaData jbossEjbMD, final JBossWebservicesMetaData
jbossWebservicesMD)
{
log.debug("Creating JBoss agnostic EJB3 meta data for session bean: " +
jbossEjbMD.getEjbClass());
final EJBMetaData wsEjbMD = new SLSBMetaData();
@@ -91,8 +92,7 @@
if (jbossEjbMD.isSession())
{
- final JBossSessionBeanMetaData sessionEjbMD = (JBossSessionBeanMetaData)
jbossEjbMD;
- final PortComponent portComponentMD = sessionEjbMD.getPortComponent();
+ final PortComponentMetaData portComponentMD =
getPortComponent(jbossEjbMD.getEjbName(), jbossWebservicesMD);
if (portComponentMD != null)
{
// set port component meta data
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -49,6 +49,7 @@
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
/**
* Builds container independent meta data from WEB container meta data.
@@ -97,16 +98,20 @@
jseArchiveMD.setSecurityDomain(securityDomain);
// set wsdl location resolver
- final PublishLocationAdapter resolver = new
PublishLocationAdapterImpl(jbossWebMD.getWebserviceDescriptions());
- jseArchiveMD.setPublishLocationAdapter(resolver);
+ final JBossWebservicesMetaData jbossWebservicesMD =
WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
+ if (jbossWebservicesMD != null)
+ {
+ final PublishLocationAdapter resolver = new
PublishLocationAdapterImpl(jbossWebservicesMD.getWebserviceDescriptions());
+ jseArchiveMD.setPublishLocationAdapter(resolver);
+ }
+ // set config name and file
+ this.setConfigNameAndFile(jseArchiveMD, jbossWebMD, jbossWebservicesMD);
+
// set security meta data
final List<JSESecurityMetaData> jseSecurityMDs =
this.getSecurityMetaData(jbossWebMD.getSecurityConstraints());
jseArchiveMD.setSecurityMetaData(jseSecurityMDs);
- // set config name and file
- this.setConfigNameAndFile(jseArchiveMD, jbossWebMD);
-
return jseArchiveMD;
}
@@ -116,16 +121,14 @@
* @param jseArchiveMD universal JSE meta data model
* @param jbossWebMD jboss web meta data
*/
- private void setConfigNameAndFile(final JSEArchiveMetaData jseArchiveMD, final
JBossWebMetaData jbossWebMD)
+ private void setConfigNameAndFile(final JSEArchiveMetaData jseArchiveMD, final
JBossWebMetaData jbossWebMD, final JBossWebservicesMetaData jbossWebservicesMD)
{
- final WebserviceDescriptionsMetaData wsDescriptionsMD =
jbossWebMD.getWebserviceDescriptions();
- final WebserviceDescriptionMetaData wsDescriptionMD =
ASHelper.getWebserviceDescriptionMetaData(wsDescriptionsMD);
- if (wsDescriptionMD != null)
+ if (jbossWebservicesMD != null)
{
- if (wsDescriptionMD.getConfigName() != null)
+ if (jbossWebservicesMD.getConfigName() != null)
{
- jseArchiveMD.setConfigName(wsDescriptionMD.getConfigName());
- jseArchiveMD.setConfigFile(wsDescriptionMD.getConfigFile());
+ jseArchiveMD.setConfigName(jbossWebservicesMD.getConfigName());
+ jseArchiveMD.setConfigFile(jbossWebservicesMD.getConfigFile());
// ensure higher priority against web.xml context parameters
return;
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java 2011-10-31
15:27:32 UTC (rev 15176)
@@ -21,9 +21,8 @@
*/
package org.jboss.webservices.integration.metadata;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
/**
* Publish location adapter implementation.
@@ -34,17 +33,15 @@
final class PublishLocationAdapterImpl implements PublishLocationAdapter
{
/** Webservice descriptions meta data. */
- private final WebserviceDescriptionsMetaData wsDescriptionsMD;
+ private final WebserviceDescriptionMetaData[] wsDescriptionsMD;
/**
* Constructor.
*
* @param wsDescriptionsMD webservice descriptions meta data
*/
- PublishLocationAdapterImpl(final WebserviceDescriptionsMetaData wsDescriptionsMD)
+ PublishLocationAdapterImpl(final WebserviceDescriptionMetaData[] wsDescriptionsMD)
{
- super();
-
this.wsDescriptionsMD = wsDescriptionsMD;
}
@@ -56,13 +53,12 @@
*/
public String getWsdlPublishLocationByName(final String endpointName)
{
- if (this.wsDescriptionsMD != null)
+ if (wsDescriptionsMD != null)
{
- final WebserviceDescriptionMetaData endpointMD =
this.wsDescriptionsMD.get(endpointName);
-
- if (endpointMD != null)
+ for (final WebserviceDescriptionMetaData wsDescriptionMD : wsDescriptionsMD)
{
- return endpointMD.getWsdlPublishLocation();
+ if (endpointName.equals(wsDescriptionMD.getWebserviceDescriptionName()))
+ return wsDescriptionMD.getWsdlPublishLocation();
}
}
Modified:
container/jboss60/branches/jbossws-jboss610/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
---
container/jboss60/branches/jbossws-jboss610/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2011-10-31
15:26:50 UTC (rev 15175)
+++
container/jboss60/branches/jbossws-jboss610/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2011-10-31
15:27:32 UTC (rev 15176)
@@ -54,9 +54,12 @@
</bean>
<!-- deployers -->
- <bean name="WSDescriptorDeployer"
class="org.jboss.webservices.integration.deployers.WSDescriptorDeployer">
+ <bean name="WSWebservicesDescriptorDeployer"
class="org.jboss.webservices.integration.deployers.WebservicesDescriptorDeployer">
<incallback method="setParser"/>
</bean>
+ <bean name="WSJBossWebservicesDescriptorDeployer"
class="org.jboss.webservices.integration.deployers.JBossWebservicesDescriptorDeployer">
+ <incallback method="setParser"/>
+ </bean>
<bean name="WSEJBAdapterDeployer"
class="org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer"/>