JBossWS SVN: r18643 - in container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices: webserviceref and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-14 07:01:01 -0400 (Wed, 14 May 2014)
New Revision: 18643
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXRPC_EJB.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefAnnotationProcessor.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java
Log:
[JBWS-3793] Changes to use latest jbossws-spi
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java 2014-05-14 11:00:15 UTC (rev 18642)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java 2014-05-14 11:01:01 UTC (rev 18643)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -51,12 +51,12 @@
*/
final EJBArchiveMetaData create(final Deployment dep) {
ROOT_LOGGER.creatingEjbDeployment(dep.getSimpleName());
- final EJBArchiveMetaData ejbArchiveMD = new EJBArchiveMetaData();
+ final EJBArchiveMetaData.Builder ejbArchiveMDBuilder = new EJBArchiveMetaData.Builder();
- this.buildEnterpriseBeansMetaData(dep, ejbArchiveMD);
- this.buildWebservicesMetaData(dep, ejbArchiveMD);
+ this.buildEnterpriseBeansMetaData(dep, ejbArchiveMDBuilder);
+ this.buildWebservicesMetaData(dep, ejbArchiveMDBuilder);
- return ejbArchiveMD;
+ return ejbArchiveMDBuilder.build();
}
/**
@@ -67,7 +67,7 @@
* @param ejbMetaData
* universal EJB meta data model
*/
- protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData ejbMetaData);
+ protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData.Builder ejbMetaDataBuilder);
/**
* Builds webservices meta data. This methods sets:
@@ -81,7 +81,7 @@
* @param dep webservice deployment
* @param ejbArchiveMD universal EJB meta data model
*/
- private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
+ private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder)
{
final JBossWebservicesMetaData webservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
@@ -89,23 +89,23 @@
// set context root
final String contextRoot = webservicesMD.getContextRoot();
- ejbArchiveMD.setWebServiceContextRoot(contextRoot);
+ ejbArchiveMDBuilder.setWebServiceContextRoot(contextRoot);
ROOT_LOGGER.settingContextRoot(contextRoot);
// set config name
final String configName = webservicesMD.getConfigName();
- ejbArchiveMD.setConfigName(configName);
+ ejbArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
// set config file
final String configFile = webservicesMD.getConfigFile();
- ejbArchiveMD.setConfigFile(configFile);
+ ejbArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
// set wsdl location resolver
final JBossWebserviceDescriptionMetaData[] wsDescriptionsMD = webservicesMD.getWebserviceDescriptions();
final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
- ejbArchiveMD.setPublishLocationAdapter(resolver);
+ ejbArchiveMDBuilder.setPublishLocationAdapter(resolver);
}
protected JBossPortComponentMetaData getPortComponent(final String ejbName, final JBossWebservicesMetaData jbossWebservicesMD) {
@@ -125,37 +125,29 @@
* jboss agnostic EJBs meta data
*/
protected void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final EJBEndpoint ejbEndpoint, final JBossWebservicesMetaData jbossWebservicesMD) {
- final EJBMetaData wsEjbMD = new SLSBMetaData();
+ final SLSBMetaData.Builder wsEjbMDBuilder = new SLSBMetaData.Builder();
// set EJB name and class
- wsEjbMD.setEjbName(ejbEndpoint.getName());
- wsEjbMD.setEjbClass(ejbEndpoint.getClassName());
+ wsEjbMDBuilder.setEjbName(ejbEndpoint.getName());
+ wsEjbMDBuilder.setEjbClass(ejbEndpoint.getClassName());
final JBossPortComponentMetaData portComponentMD = getPortComponent(ejbEndpoint.getName(), jbossWebservicesMD);
if (portComponentMD != null) {
// set port component meta data
- wsEjbMD.setPortComponentName(portComponentMD.getPortComponentName());
- wsEjbMD.setPortComponentURI(portComponentMD.getPortComponentURI());
+ wsEjbMDBuilder.setPortComponentName(portComponentMD.getPortComponentName());
+ wsEjbMDBuilder.setPortComponentURI(portComponentMD.getPortComponentURI());
}
// set security meta data
- buildSecurityMetaData(wsEjbMD, ejbEndpoint, portComponentMD);
-
- wsEjbsMD.add(wsEjbMD);
- }
-
- private static void buildSecurityMetaData(final EJBMetaData wsEjbMD, final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
- final EJBSecurityMetaData smd = new EJBSecurityMetaData();
// auth method
final String authMethod = getAuthMethod(ejbEndpoint, portComponentMD);
- smd.setAuthMethod(authMethod);
// transport guarantee
final String transportGuarantee = getTransportGuarantee(ejbEndpoint, portComponentMD);
- smd.setTransportGuarantee(transportGuarantee);
// secure wsdl access
final boolean secureWsdlAccess = isSecureWsdlAccess(ejbEndpoint, portComponentMD);
- smd.setSecureWSDLAccess(secureWsdlAccess);
// propagate
- wsEjbMD.setSecurityMetaData(smd);
+ wsEjbMDBuilder.setSecurityMetaData(new EJBSecurityMetaData(authMethod, transportGuarantee, secureWsdlAccess));
+
+ wsEjbsMD.add(wsEjbMDBuilder.build());
}
private static String getAuthMethod(final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java 2014-05-14 11:00:15 UTC (rev 18642)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java 2014-05-14 11:01:01 UTC (rev 18643)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -38,13 +38,11 @@
import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
import org.jboss.metadata.web.spec.ServletMappingMetaData;
import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
import org.jboss.ws.common.integration.WSConstants;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
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;
@@ -72,40 +70,40 @@
final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
final List<POJOEndpoint> pojoEndpoints = getPojoEndpoints(unit);
- final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();
+ final JSEArchiveMetaData.Builder jseArchiveMDBuilder = new JSEArchiveMetaData.Builder();
// set context root
final String contextRoot = getContextRoot(dep, jbossWebMD);
- jseArchiveMD.setContextRoot(contextRoot);
+ jseArchiveMDBuilder.setContextRoot(contextRoot);
ROOT_LOGGER.settingContextRoot(contextRoot);
// set servlet url patterns mappings
final Map<String, String> servletMappings = getServletUrlPatternsMappings(jbossWebMD, pojoEndpoints);
- jseArchiveMD.setServletMappings(servletMappings);
+ jseArchiveMDBuilder.setServletMappings(servletMappings);
// set servlet class names mappings
final Map<String, String> servletClassNamesMappings = getServletClassMappings(jbossWebMD, pojoEndpoints);
- jseArchiveMD.setServletClassNames(servletClassNamesMappings);
+ jseArchiveMDBuilder.setServletClassNames(servletClassNamesMappings);
// set security domain
final String securityDomain = jbossWebMD.getSecurityDomain();
- jseArchiveMD.setSecurityDomain(securityDomain);
+ jseArchiveMDBuilder.setSecurityDomain(securityDomain);
// set wsdl location resolver
final JBossWebservicesMetaData jbossWebservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
if (jbossWebservicesMD != null) {
final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(jbossWebservicesMD.getWebserviceDescriptions());
- jseArchiveMD.setPublishLocationAdapter(resolver);
+ jseArchiveMDBuilder.setPublishLocationAdapter(resolver);
}
// set security meta data
final List<JSESecurityMetaData> jseSecurityMDs = getSecurityMetaData(jbossWebMD.getSecurityConstraints());
- jseArchiveMD.setSecurityMetaData(jseSecurityMDs);
+ jseArchiveMDBuilder.setSecurityMetaData(jseSecurityMDs);
// set config name and file
- setConfigNameAndFile(jseArchiveMD, jbossWebMD, jbossWebservicesMD);
+ setConfigNameAndFile(jseArchiveMDBuilder, jbossWebMD, jbossWebservicesMD);
- return jseArchiveMD;
+ return jseArchiveMDBuilder.build();
}
protected abstract List<POJOEndpoint> getPojoEndpoints(final DeploymentUnit unit);
@@ -116,14 +114,14 @@
* @param jseArchiveMD universal JSE meta data model
* @param jbossWebMD jboss web meta data
*/
- private void setConfigNameAndFile(final JSEArchiveMetaData jseArchiveMD, final JBossWebMetaData jbossWebMD, final JBossWebservicesMetaData jbossWebservicesMD) {
+ private void setConfigNameAndFile(final JSEArchiveMetaData.Builder jseArchiveMDBuilder, final JBossWebMetaData jbossWebMD, final JBossWebservicesMetaData jbossWebservicesMD) {
if (jbossWebservicesMD != null) {
if (jbossWebservicesMD.getConfigName() != null) {
final String configName = jbossWebservicesMD.getConfigName();
- jseArchiveMD.setConfigName(configName);
+ jseArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
final String configFile = jbossWebservicesMD.getConfigFile();
- jseArchiveMD.setConfigFile(configFile);
+ jseArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
// ensure higher priority against web.xml context parameters
@@ -136,12 +134,12 @@
for (final ParamValueMetaData contextParam : contextParams) {
if (WSConstants.JBOSSWS_CONFIG_NAME.equals(contextParam.getParamName())) {
final String configName = contextParam.getParamValue();
- jseArchiveMD.setConfigName(configName);
+ jseArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
}
if (WSConstants.JBOSSWS_CONFIG_FILE.equals(contextParam.getParamName())) {
final String configFile = contextParam.getParamValue();
- jseArchiveMD.setConfigFile(configFile);
+ jseArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
}
}
@@ -159,15 +157,17 @@
if (securityConstraintsMD != null) {
for (final SecurityConstraintMetaData securityConstraintMD : securityConstraintsMD) {
- final JSESecurityMetaData jseSecurityMD = new JSESecurityMetaData();
+ final JSESecurityMetaData.Builder jseSecurityMDBuilder = new JSESecurityMetaData.Builder();
// transport guarantee
- jseSecurityMD.setTransportGuarantee(securityConstraintMD.getTransportGuarantee().name());
-
+ jseSecurityMDBuilder.setTransportGuarantee(securityConstraintMD.getTransportGuarantee().name());
+
// web resources
- this.setWebResources(jseSecurityMD, securityConstraintMD);
+ for (final WebResourceCollectionMetaData webResourceMD : securityConstraintMD.getResourceCollections()) {
+ jseSecurityMDBuilder.addWebResource(webResourceMD.getName(), webResourceMD.getUrlPatterns());
+ }
- jseSecurityMDs.add(jseSecurityMD);
+ jseSecurityMDs.add(jseSecurityMDBuilder.build());
}
}
@@ -175,24 +175,6 @@
}
/**
- * Sets web resources in universal meta data model.
- *
- * @param jseSecurityMD universal JSE security meta data model
- * @param securityConstraintMD security constraint meta data
- */
- private void setWebResources(final JSESecurityMetaData jseSecurityMD, final SecurityConstraintMetaData securityConstraintMD) {
- final WebResourceCollectionsMetaData webResources = securityConstraintMD.getResourceCollections();
-
- for (final WebResourceCollectionMetaData webResourceMD : webResources) {
- final JSEResourceCollection jseResource = jseSecurityMD.addWebResource(webResourceMD.getName());
-
- for (final String webResourceUrlPatterns : webResourceMD.getUrlPatterns()) {
- jseResource.addPattern(webResourceUrlPatterns);
- }
- }
- }
-
- /**
* Returns servlet name to url pattern mappings.
*
* @param jbossWebMD jboss web meta data
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXRPC_EJB.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXRPC_EJB.java 2014-05-14 11:00:15 UTC (rev 18642)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXRPC_EJB.java 2014-05-14 11:01:01 UTC (rev 18643)
@@ -39,7 +39,7 @@
final class MetaDataBuilderJAXRPC_EJB extends AbstractMetaDataBuilderEJB {
@Override
- protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD) {
+ protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder) {
final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
final JBossWebservicesMetaData jbossWebservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
final JAXRPCDeployment jaxrpcDeployment = WSHelper.getRequiredAttachment(dep, JAXRPCDeployment.class);
@@ -48,7 +48,7 @@
buildEnterpriseBeanMetaData(wsEjbsMD, ejbEndpoint, jbossWebservicesMD);
}
- ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
+ ejbArchiveMDBuilder.setEnterpriseBeans(wsEjbsMD);
}
}
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java 2014-05-14 11:00:15 UTC (rev 18642)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java 2014-05-14 11:01:01 UTC (rev 18643)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -42,14 +42,14 @@
final class MetaDataBuilderJAXWS_EJB extends AbstractMetaDataBuilderEJB {
@Override
- protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD) {
+ protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder) {
if (!WSHelper.isJaxwsJseDeployment(dep)) { // [AS7-1605] support
final JBossWebMetaData jbossWebMD = WSHelper.getOptionalAttachment(dep, JBossWebMetaData.class);
final String contextRoot = getContextRoot(dep, jbossWebMD);
if (contextRoot != null) {
- final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();
- jseArchiveMD.setContextRoot(contextRoot);
- dep.addAttachment(JSEArchiveMetaData.class, jseArchiveMD);
+ final JSEArchiveMetaData.Builder jseArchiveMDBuilder = new JSEArchiveMetaData.Builder();
+ jseArchiveMDBuilder.setContextRoot(contextRoot);
+ dep.addAttachment(JSEArchiveMetaData.class, jseArchiveMDBuilder.build());
}
}
@@ -61,7 +61,7 @@
buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD, jbossWebservicesMD);
}
- ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
+ ejbArchiveMDBuilder.setEnterpriseBeans(wsEjbsMD);
}
}
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefAnnotationProcessor.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefAnnotationProcessor.java 2014-05-14 11:00:15 UTC (rev 18642)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefAnnotationProcessor.java 2014-05-14 11:01:01 UTC (rev 18643)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -28,7 +28,6 @@
import static org.jboss.as.webservices.util.DotNames.WEB_SERVICE_REFS_ANNOTATION;
import static org.jboss.as.webservices.util.DotNames.WEB_SERVICE_REF_ANNOTATION;
import static org.jboss.as.webservices.webserviceref.WSRefUtils.processAnnotatedElement;
-import static org.jboss.as.webservices.webserviceref.WSRefUtils.processType;
import java.lang.reflect.AccessibleObject;
import java.util.List;
@@ -63,6 +62,8 @@
import org.jboss.modules.Module;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaDataBuilder;
+import org.jboss.wsf.spi.serviceref.ServiceRefType;
/**
* @WebServiceRef annotation processor.
@@ -195,8 +196,10 @@
final String cacheKey = getCacheKey(componentDescription, serviceRefName);
UnifiedServiceRefMetaData serviceRefUMDM = wsRefRegistry.get(cacheKey);
if (serviceRefUMDM == null) {
- serviceRefUMDM = new UnifiedServiceRefMetaData(getUnifiedVirtualFile(unit));
- serviceRefUMDM.setServiceRefName(serviceRefName);
+ UnifiedServiceRefMetaDataBuilder builder = new UnifiedServiceRefMetaDataBuilder();
+ builder.setVfsRoot(getUnifiedVirtualFile(unit));
+ builder.setServiceRefName(serviceRefName);
+ serviceRefUMDM = builder.build();
wsRefRegistry.add(cacheKey, serviceRefUMDM);
}
return serviceRefUMDM;
@@ -253,7 +256,8 @@
serviceRefUMDM.setServiceInterface(Service.class.getName());
}
// ref type
- processType(serviceRefUMDM);
+// processType(serviceRefUMDM);
+ serviceRefUMDM.setType(ServiceRefType.JAXWS);
return serviceRefUMDM;
}
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java 2014-05-14 11:00:15 UTC (rev 18642)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java 2014-05-14 11:01:01 UTC (rev 18643)
@@ -82,8 +82,8 @@
private static UnifiedServiceRefMetaData getServiceRef(final DeploymentUnit unit, final ComponentDescription componentDescription, final ServiceReferenceMetaData serviceRefMD) throws DeploymentUnitProcessingException {
// construct service ref
- final UnifiedServiceRefMetaData serviceRefUMDM = new UnifiedServiceRefMetaData(getUnifiedVirtualFile(unit));
- translate(serviceRefMD, serviceRefUMDM);
+ final UnifiedServiceRefMetaData serviceRefUMDM = translate(serviceRefMD);
+ serviceRefUMDM.setVfsRoot(getUnifiedVirtualFile(unit));
processWSFeatures(unit, serviceRefMD.getInjectionTargets(), serviceRefUMDM);
// register it
final WSReferences wsRefRegistry = getWSRefRegistry(unit);
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java 2014-05-14 11:00:15 UTC (rev 18642)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java 2014-05-14 11:01:01 UTC (rev 18643)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -53,12 +53,17 @@
import org.jboss.metadata.javaee.spec.ServiceReferenceHandlerChainsMetaData;
import org.jboss.metadata.javaee.spec.ServiceReferenceHandlerMetaData;
import org.jboss.metadata.javaee.spec.ServiceReferenceMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.AddressingMetadata;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.MTOMMetadata;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.RespectBindingMetadata;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaDataBuilder;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaDataBuilder;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
import org.jboss.wsf.spi.serviceref.ServiceRefType;
@@ -72,22 +77,22 @@
private WSRefUtils() {
}
- static UnifiedServiceRefMetaData translate(final ServiceReferenceMetaData serviceRefMD, final UnifiedServiceRefMetaData serviceRefUMDM) {
- serviceRefUMDM.setServiceRefName(serviceRefMD.getName());
- serviceRefUMDM.setServiceRefType(serviceRefMD.getServiceRefType());
- serviceRefUMDM.setServiceInterface(serviceRefMD.getServiceInterface());
- serviceRefUMDM.setWsdlFile(serviceRefMD.getWsdlFile());
- serviceRefUMDM.setMappingFile(serviceRefMD.getJaxrpcMappingFile());
- serviceRefUMDM.setServiceQName(serviceRefMD.getServiceQname());
+ static UnifiedServiceRefMetaData translate(final ServiceReferenceMetaData serviceRefMD) {
+ UnifiedServiceRefMetaDataBuilder builder = new UnifiedServiceRefMetaDataBuilder();
+ builder.setServiceRefName(serviceRefMD.getName());
+ builder.setServiceRefType(serviceRefMD.getServiceRefType());
+ builder.setServiceInterface(serviceRefMD.getServiceInterface());
+ builder.setWsdlFile(serviceRefMD.getWsdlFile());
+ builder.setMappingFile(serviceRefMD.getJaxrpcMappingFile());
+ builder.setServiceQName(serviceRefMD.getServiceQname());
// propagate port components
final Collection<? extends PortComponentRef> portComponentsMD = serviceRefMD.getPortComponentRef();
if (portComponentsMD != null) {
for (final PortComponentRef portComponentMD : portComponentsMD) {
- final UnifiedPortComponentRefMetaData portComponentUMDM = getUnifiedPortComponentRefMetaData(serviceRefUMDM,
- portComponentMD);
+ final UnifiedPortComponentRefMetaData portComponentUMDM = getUnifiedPortComponentRefMetaData(portComponentMD);
if (portComponentUMDM.getServiceEndpointInterface() != null || portComponentUMDM.getPortQName() != null) {
- serviceRefUMDM.addPortComponentRef(portComponentUMDM);
+ builder.addPortComponentRef(portComponentUMDM);
} else {
ROOT_LOGGER.ignoringPortComponentRef(portComponentUMDM);
}
@@ -99,7 +104,7 @@
if (handlersMD != null) {
for (final ServiceReferenceHandlerMetaData handlerMD : handlersMD) {
final UnifiedHandlerMetaData handlerUMDM = getUnifiedHandlerMetaData(handlerMD);
- serviceRefUMDM.addHandler(handlerUMDM);
+ builder.addHandler(handlerUMDM);
}
}
@@ -107,82 +112,75 @@
ServiceReferenceHandlerChainsMetaData handlerChainsMD = serviceRefMD.getHandlerChains();
if (handlerChainsMD != null) {
final UnifiedHandlerChainsMetaData handlerChainsUMDM = getUnifiedHandlerChainsMetaData(handlerChainsMD);
- serviceRefUMDM.setHandlerChains(handlerChainsUMDM);
+ builder.setHandlerChains(handlerChainsUMDM);
}
// propagate jboss specific MD
if (serviceRefMD instanceof JBossServiceReferenceMetaData) {
- processUnifiedJBossServiceRefMetaData(serviceRefUMDM, serviceRefMD);
+ final JBossServiceReferenceMetaData jbossServiceRefMD = (JBossServiceReferenceMetaData) serviceRefMD;
+ builder.setServiceImplClass(jbossServiceRefMD.getServiceClass());
+ builder.setConfigName(jbossServiceRefMD.getConfigName());
+ builder.setConfigFile(jbossServiceRefMD.getConfigFile());
+ builder.setWsdlOverride(jbossServiceRefMD.getWsdlOverride());
+ builder.setHandlerChain(jbossServiceRefMD.getHandlerChain());
}
// detect JAXWS or JAXRPC type
- processType(serviceRefUMDM);
+ final boolean isJAXRPC = serviceRefMD.getJaxrpcMappingFile() != null || "javax.xml.rpc.Service".equals(serviceRefMD.getServiceInterface());
+ builder.setType(isJAXRPC ? ServiceRefType.JAXRPC : ServiceRefType.JAXWS);
- return serviceRefUMDM;
+ return builder.build();
}
- private static void processUnifiedJBossServiceRefMetaData(final UnifiedServiceRefMetaData serviceRefUMDM, final ServiceReferenceMetaData serviceRefMD) {
- final JBossServiceReferenceMetaData jbossServiceRefMD = (JBossServiceReferenceMetaData) serviceRefMD;
- serviceRefUMDM.setServiceImplClass(jbossServiceRefMD.getServiceClass());
- serviceRefUMDM.setConfigName(jbossServiceRefMD.getConfigName());
- serviceRefUMDM.setConfigFile(jbossServiceRefMD.getConfigFile());
- serviceRefUMDM.setWsdlOverride(jbossServiceRefMD.getWsdlOverride());
- serviceRefUMDM.setHandlerChain(jbossServiceRefMD.getHandlerChain());
- }
+ private static UnifiedPortComponentRefMetaData getUnifiedPortComponentRefMetaData(final PortComponentRef portComponentMD) {
+ final UnifiedPortComponentRefMetaDataBuilder builder = new UnifiedPortComponentRefMetaDataBuilder();
- private static UnifiedPortComponentRefMetaData getUnifiedPortComponentRefMetaData(final UnifiedServiceRefMetaData serviceRefUMDM, final PortComponentRef portComponentMD) {
- final UnifiedPortComponentRefMetaData portComponentUMDM = new UnifiedPortComponentRefMetaData(serviceRefUMDM);
-
// propagate service endpoint interface
- portComponentUMDM.setServiceEndpointInterface(portComponentMD.getServiceEndpointInterface());
+ builder.setServiceEndpointInterface(portComponentMD.getServiceEndpointInterface());
// propagate MTOM properties
- portComponentUMDM.setMtomEnabled(portComponentMD.isEnableMtom());
- portComponentUMDM.setMtomThreshold(portComponentMD.getMtomThreshold());
+ builder.setMtomEnabled(portComponentMD.isEnableMtom());
+ builder.setMtomThreshold(portComponentMD.getMtomThreshold());
// propagate addressing properties
final Addressing addressingMD = portComponentMD.getAddressing();
if (addressingMD != null) {
- portComponentUMDM.setAddressingAnnotationSpecified(true);
- portComponentUMDM.setAddressingEnabled(addressingMD.isEnabled());
- portComponentUMDM.setAddressingRequired(addressingMD.isRequired());
- portComponentUMDM.setAddressingResponses(addressingMD.getResponses());
+ builder.setAddressingAnnotationSpecified(true);
+ builder.setAddressingEnabled(addressingMD.isEnabled());
+ builder.setAddressingRequired(addressingMD.isRequired());
+ builder.setAddressingResponses(addressingMD.getResponses());
}
// propagate respect binding properties
if (portComponentMD.getRespectBinding() != null) {
- portComponentUMDM.setRespectBindingAnnotationSpecified(true);
- portComponentUMDM.setRespectBindingEnabled(true);
+ builder.setRespectBindingAnnotationSpecified(true);
+ builder.setRespectBindingEnabled(true);
}
// propagate link
- portComponentUMDM.setPortComponentLink(portComponentMD.getPortComponentLink());
+ builder.setPortComponentLink(portComponentMD.getPortComponentLink());
// propagate jboss specific MD
if (portComponentMD instanceof JBossPortComponentRef) {
- processUnifiedJBossPortComponentRefMetaData(portComponentUMDM, portComponentMD);
- }
+ final JBossPortComponentRef jbossPortComponentMD = (JBossPortComponentRef) portComponentMD;
- return portComponentUMDM;
- }
+ // propagate port QName
+ builder.setPortQName(jbossPortComponentMD.getPortQname());
- private static void processUnifiedJBossPortComponentRefMetaData(final UnifiedPortComponentRefMetaData portComponentUMDM, final PortComponentRef portComponentMD) {
- final JBossPortComponentRef jbossPortComponentMD = (JBossPortComponentRef) portComponentMD;
+ // propagate configuration properties
+ builder.setConfigName(jbossPortComponentMD.getConfigName());
+ builder.setConfigFile(jbossPortComponentMD.getConfigFile());
- // propagate port QName
- portComponentUMDM.setPortQName(jbossPortComponentMD.getPortQname());
-
- // propagate configuration properties
- portComponentUMDM.setConfigName(jbossPortComponentMD.getConfigName());
- portComponentUMDM.setConfigFile(jbossPortComponentMD.getConfigFile());
-
- // propagate stub properties
- final List<StubPropertyMetaData> stubPropertiesMD = jbossPortComponentMD.getStubProperties();
- if (stubPropertiesMD != null) {
- for (final StubPropertyMetaData stubPropertyMD : stubPropertiesMD) {
- portComponentUMDM.addStubProperty(new UnifiedStubPropertyMetaData(stubPropertyMD.getPropName(), stubPropertyMD.getPropValue()));
+ // propagate stub properties
+ final List<StubPropertyMetaData> stubPropertiesMD = jbossPortComponentMD.getStubProperties();
+ if (stubPropertiesMD != null) {
+ for (final StubPropertyMetaData stubPropertyMD : stubPropertiesMD) {
+ builder.addStubProperty(new UnifiedStubPropertyMetaData(stubPropertyMD.getPropName(), stubPropertyMD.getPropValue()));
+ }
}
}
+
+ return builder.build();
}
private static UnifiedHandlerMetaData getUnifiedHandlerMetaData(ServiceReferenceHandlerMetaData srhmd) {
@@ -217,11 +215,6 @@
return new UnifiedHandlerChainsMetaData(uhcmds);
}
- static void processType(final UnifiedServiceRefMetaData serviceRefUMDM) {
- final boolean isJAXRPC = serviceRefUMDM.getMappingFile() != null || "javax.xml.rpc.Service".equals(serviceRefUMDM.getServiceInterface());
- serviceRefUMDM.setType(isJAXRPC ? ServiceRefType.JAXRPC : ServiceRefType.JAXWS);
- }
-
static void processAnnotatedElement(final AnnotatedElement anElement, final UnifiedServiceRefMetaData serviceRefUMDM) {
processAddressingAnnotation(anElement, serviceRefUMDM);
processMTOMAnnotation(anElement, serviceRefUMDM);
@@ -234,10 +227,10 @@
final javax.xml.ws.soap.Addressing addressingAnnotation = getAnnotation(anElement, javax.xml.ws.soap.Addressing.class);
if (addressingAnnotation != null) {
- serviceRefUMDM.setAddressingAnnotationSpecified(true);
- serviceRefUMDM.setAddressingEnabled(addressingAnnotation.enabled());
- serviceRefUMDM.setAddressingRequired(addressingAnnotation.required());
- serviceRefUMDM.setAddressingResponses(addressingAnnotation.responses().toString());
+ serviceRefUMDM.setAddressingMedadata(new AddressingMetadata(true,
+ addressingAnnotation.enabled(),
+ addressingAnnotation.required(),
+ addressingAnnotation.responses().toString()));
}
}
@@ -245,9 +238,7 @@
final MTOM mtomAnnotation = getAnnotation(anElement, MTOM.class);
if (mtomAnnotation != null) {
- serviceRefUMDM.setMtomAnnotationSpecified(true);
- serviceRefUMDM.setMtomEnabled(mtomAnnotation.enabled());
- serviceRefUMDM.setMtomThreshold(mtomAnnotation.threshold());
+ serviceRefUMDM.setMTOMMetadata(new MTOMMetadata(true, mtomAnnotation.enabled(), mtomAnnotation.threshold()));
}
}
@@ -255,8 +246,7 @@
final javax.xml.ws.RespectBinding respectBindingAnnotation = getAnnotation(anElement, javax.xml.ws.RespectBinding.class);
if (respectBindingAnnotation != null) {
- serviceRefUMDM.setRespectBindingAnnotationSpecified(true);
- serviceRefUMDM.setRespectBindingEnabled(respectBindingAnnotation.enabled());
+ serviceRefUMDM.setRespectBindingMetadata(new RespectBindingMetadata(true, respectBindingAnnotation.enabled()));
}
}
10 years, 7 months
JBossWS SVN: r18642 - in container/jboss72/branches/jbossws-jboss720: server-integration and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-14 07:00:15 -0400 (Wed, 14 May 2014)
New Revision: 18642
Modified:
container/jboss72/branches/jbossws-jboss720/pom.xml
container/jboss72/branches/jbossws-jboss720/server-integration/pom.xml
container/jboss72/branches/jbossws-jboss720/tests-integration/pom.xml
Log:
Build to 5.0.0-SNAPSHOT
Modified: container/jboss72/branches/jbossws-jboss720/pom.xml
===================================================================
--- container/jboss72/branches/jbossws-jboss720/pom.xml 2014-05-14 10:05:07 UTC (rev 18641)
+++ container/jboss72/branches/jbossws-jboss720/pom.xml 2014-05-14 11:00:15 UTC (rev 18642)
@@ -35,7 +35,7 @@
<description>JBossWS JBoss AS 7.2.0.Final Integration Parent</description>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-jboss720-parent</artifactId>
- <version>4.3.1-SNAPSHOT</version>
+ <version>5.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<scm>
@@ -51,8 +51,8 @@
<properties>
<jbossws.api.version>1.0.2.Final</jbossws.api.version>
- <jbossws.spi.version>2.3.1-SNAPSHOT</jbossws.spi.version>
- <jbossws.common.version>2.3.1-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>3.0.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>3.0.0-SNAPSHOT</jbossws.common.version>
<jboss.msc.version>1.0.4.GA</jboss.msc.version>
<jboss.version>7.2.0.Final</jboss.version>
<jboss.jaxws.api.version>2.0.2.Final</jboss.jaxws.api.version>
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/pom.xml
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/pom.xml 2014-05-14 10:05:07 UTC (rev 18641)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/pom.xml 2014-05-14 11:00:15 UTC (rev 18642)
@@ -29,7 +29,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-jboss720-parent</artifactId>
- <version>4.3.1-SNAPSHOT</version>
+ <version>5.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: container/jboss72/branches/jbossws-jboss720/tests-integration/pom.xml
===================================================================
--- container/jboss72/branches/jbossws-jboss720/tests-integration/pom.xml 2014-05-14 10:05:07 UTC (rev 18641)
+++ container/jboss72/branches/jbossws-jboss720/tests-integration/pom.xml 2014-05-14 11:00:15 UTC (rev 18642)
@@ -29,7 +29,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-jboss720-parent</artifactId>
- <version>4.3.1-SNAPSHOT</version>
+ <version>5.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
10 years, 7 months
JBossWS SVN: r18641 - projects/wsi-bp-test/trunk.
by jbossws-commits@lists.jboss.org
Author: rsvoboda(a)redhat.com
Date: 2014-05-14 06:05:07 -0400 (Wed, 14 May 2014)
New Revision: 18641
Modified:
projects/wsi-bp-test/trunk/pom.xml
Log:
Ensure that log4j-over-slf4j is not pulled in by jbossws-cxf-client - preventring issues like BZ 1097558
Modified: projects/wsi-bp-test/trunk/pom.xml
===================================================================
--- projects/wsi-bp-test/trunk/pom.xml 2014-05-13 20:42:40 UTC (rev 18640)
+++ projects/wsi-bp-test/trunk/pom.xml 2014-05-14 10:05:07 UTC (rev 18641)
@@ -586,6 +586,12 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>log4j-over-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
10 years, 7 months
JBossWS SVN: r18640 - spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-13 16:42:40 -0400 (Tue, 13 May 2014)
New Revision: 18640
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java
Log:
[JBWS-3793] Fix
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2014-05-13 20:21:06 UTC (rev 18639)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2014-05-13 20:42:40 UTC (rev 18640)
@@ -115,7 +115,7 @@
public EJBArchiveMetaData(List<EJBMetaData> beans, String configName, String configFile,
String webServiceContextRoot, String securityDomain, PublishLocationAdapter publishLocationAdapter)
{
- if (beans != null) {
+ if (beans != null && !beans.isEmpty()) {
this.beans = Collections.unmodifiableList(beans);
} else {
this.beans = Collections.emptyList();
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2014-05-13 20:21:06 UTC (rev 18639)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2014-05-13 20:42:40 UTC (rev 18640)
@@ -139,12 +139,12 @@
PublishLocationAdapter publishLocationAdapter, List<JSESecurityMetaData> securityMetaData)
{
this.contextRoot = contextRoot;
- if (servletMappings != null) {
+ if (servletMappings != null && !servletMappings.isEmpty()) {
this.servletMappings = Collections.unmodifiableMap(servletMappings);
} else {
this.servletMappings = Collections.emptyMap();
}
- if (servletClassNames != null) {
+ if (servletClassNames != null && !servletClassNames.isEmpty()) {
this.servletClassNames = Collections.unmodifiableMap(servletClassNames);
} else {
this.servletClassNames = Collections.emptyMap();
@@ -153,7 +153,7 @@
this.configFile = configFile;
this.securityDomain = securityDomain;
this.publishLocationAdapter = publishLocationAdapter;
- if (securityMetaData != null) {
+ if (securityMetaData != null && !securityMetaData.isEmpty()) {
this.securityMetaData = Collections.unmodifiableList(securityMetaData);
} else {
this.securityMetaData = Collections.emptyList();
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java 2014-05-13 20:21:06 UTC (rev 18639)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java 2014-05-13 20:42:40 UTC (rev 18640)
@@ -87,7 +87,7 @@
public JSEResourceCollection(final String name, Collection<String> urlPatterns)
{
this.name = name;
- if (urlPatterns != null) {
+ if (urlPatterns != null && !urlPatterns.isEmpty()) {
this.urlPatterns = Collections.unmodifiableSet(new HashSet<String>(urlPatterns));
} else {
this.urlPatterns = Collections.emptySet();
10 years, 7 months
JBossWS SVN: r18639 - container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-13 16:21:06 -0400 (Tue, 13 May 2014)
New Revision: 18639
Modified:
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java
Log:
[JBWS-3793] Changes to use latest jbossws-spi
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java 2014-05-13 20:20:00 UTC (rev 18638)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java 2014-05-13 20:21:06 UTC (rev 18639)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -51,12 +51,12 @@
*/
final EJBArchiveMetaData create(final Deployment dep) {
ROOT_LOGGER.creatingEjbDeployment(dep.getSimpleName());
- final EJBArchiveMetaData ejbArchiveMD = new EJBArchiveMetaData();
+ final EJBArchiveMetaData.Builder ejbArchiveMDBuilder = new EJBArchiveMetaData.Builder();
- this.buildEnterpriseBeansMetaData(dep, ejbArchiveMD);
- this.buildWebservicesMetaData(dep, ejbArchiveMD);
+ this.buildEnterpriseBeansMetaData(dep, ejbArchiveMDBuilder);
+ this.buildWebservicesMetaData(dep, ejbArchiveMDBuilder);
- return ejbArchiveMD;
+ return ejbArchiveMDBuilder.build();
}
/**
@@ -67,7 +67,7 @@
* @param ejbMetaData
* universal EJB meta data model
*/
- protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData ejbMetaData);
+ protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData.Builder ejbMetaDataBuilder);
/**
* Builds webservices meta data. This methods sets:
@@ -81,7 +81,7 @@
* @param dep webservice deployment
* @param ejbArchiveMD universal EJB meta data model
*/
- private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
+ private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder)
{
final JBossWebservicesMetaData webservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
@@ -89,23 +89,23 @@
// set context root
final String contextRoot = webservicesMD.getContextRoot();
- ejbArchiveMD.setWebServiceContextRoot(contextRoot);
+ ejbArchiveMDBuilder.setWebServiceContextRoot(contextRoot);
ROOT_LOGGER.settingContextRoot(contextRoot);
// set config name
final String configName = webservicesMD.getConfigName();
- ejbArchiveMD.setConfigName(configName);
+ ejbArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
// set config file
final String configFile = webservicesMD.getConfigFile();
- ejbArchiveMD.setConfigFile(configFile);
+ ejbArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
// set wsdl location resolver
final JBossWebserviceDescriptionMetaData[] wsDescriptionsMD = webservicesMD.getWebserviceDescriptions();
final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
- ejbArchiveMD.setPublishLocationAdapter(resolver);
+ ejbArchiveMDBuilder.setPublishLocationAdapter(resolver);
}
protected JBossPortComponentMetaData getPortComponent(final String ejbName, final JBossWebservicesMetaData jbossWebservicesMD) {
@@ -125,25 +125,19 @@
* jboss agnostic EJBs meta data
*/
protected void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final EJBEndpoint ejbEndpoint, final JBossWebservicesMetaData jbossWebservicesMD) {
- final EJBMetaData wsEjbMD = new SLSBMetaData();
+ final SLSBMetaData.Builder wsEjbMDBuilder = new SLSBMetaData.Builder();
// set EJB name and class
- wsEjbMD.setEjbName(ejbEndpoint.getName());
- wsEjbMD.setEjbClass(ejbEndpoint.getClassName());
+ wsEjbMDBuilder.setEjbName(ejbEndpoint.getName());
+ wsEjbMDBuilder.setEjbClass(ejbEndpoint.getClassName());
final JBossPortComponentMetaData portComponentMD = getPortComponent(ejbEndpoint.getName(), jbossWebservicesMD);
if (portComponentMD != null) {
// set port component meta data
- wsEjbMD.setPortComponentName(portComponentMD.getPortComponentName());
- wsEjbMD.setPortComponentURI(portComponentMD.getPortComponentURI());
+ wsEjbMDBuilder.setPortComponentName(portComponentMD.getPortComponentName());
+ wsEjbMDBuilder.setPortComponentURI(portComponentMD.getPortComponentURI());
}
// set security meta data
- buildSecurityMetaData(wsEjbMD, ejbEndpoint, portComponentMD);
-
- wsEjbsMD.add(wsEjbMD);
- }
-
- private static void buildSecurityMetaData(final EJBMetaData wsEjbMD, final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
// auth method
final String authMethod = getAuthMethod(ejbEndpoint, portComponentMD);
// transport guarantee
@@ -151,7 +145,9 @@
// secure wsdl access
final boolean secureWsdlAccess = isSecureWsdlAccess(ejbEndpoint, portComponentMD);
// propagate
- wsEjbMD.setSecurityMetaData(new EJBSecurityMetaData(authMethod, transportGuarantee, secureWsdlAccess));
+ wsEjbMDBuilder.setSecurityMetaData(new EJBSecurityMetaData(authMethod, transportGuarantee, secureWsdlAccess));
+
+ wsEjbsMD.add(wsEjbMDBuilder.build());
}
private static String getAuthMethod(final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java 2014-05-13 20:20:00 UTC (rev 18638)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderPOJO.java 2014-05-13 20:21:06 UTC (rev 18639)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -38,13 +38,11 @@
import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
import org.jboss.metadata.web.spec.ServletMappingMetaData;
import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
import org.jboss.ws.common.integration.WSConstants;
import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
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;
@@ -72,40 +70,40 @@
final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
final List<POJOEndpoint> pojoEndpoints = getPojoEndpoints(unit);
- final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();
+ final JSEArchiveMetaData.Builder jseArchiveMDBuilder = new JSEArchiveMetaData.Builder();
// set context root
final String contextRoot = getContextRoot(dep, jbossWebMD);
- jseArchiveMD.setContextRoot(contextRoot);
+ jseArchiveMDBuilder.setContextRoot(contextRoot);
ROOT_LOGGER.settingContextRoot(contextRoot);
// set servlet url patterns mappings
final Map<String, String> servletMappings = getServletUrlPatternsMappings(jbossWebMD, pojoEndpoints);
- jseArchiveMD.setServletMappings(servletMappings);
+ jseArchiveMDBuilder.setServletMappings(servletMappings);
// set servlet class names mappings
final Map<String, String> servletClassNamesMappings = getServletClassMappings(jbossWebMD, pojoEndpoints);
- jseArchiveMD.setServletClassNames(servletClassNamesMappings);
+ jseArchiveMDBuilder.setServletClassNames(servletClassNamesMappings);
// set security domain
final String securityDomain = jbossWebMD.getSecurityDomain();
- jseArchiveMD.setSecurityDomain(securityDomain);
+ jseArchiveMDBuilder.setSecurityDomain(securityDomain);
// set wsdl location resolver
final JBossWebservicesMetaData jbossWebservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);
if (jbossWebservicesMD != null) {
final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(jbossWebservicesMD.getWebserviceDescriptions());
- jseArchiveMD.setPublishLocationAdapter(resolver);
+ jseArchiveMDBuilder.setPublishLocationAdapter(resolver);
}
// set security meta data
final List<JSESecurityMetaData> jseSecurityMDs = getSecurityMetaData(jbossWebMD.getSecurityConstraints());
- jseArchiveMD.setSecurityMetaData(jseSecurityMDs);
+ jseArchiveMDBuilder.setSecurityMetaData(jseSecurityMDs);
// set config name and file
- setConfigNameAndFile(jseArchiveMD, jbossWebMD, jbossWebservicesMD);
+ setConfigNameAndFile(jseArchiveMDBuilder, jbossWebMD, jbossWebservicesMD);
- return jseArchiveMD;
+ return jseArchiveMDBuilder.build();
}
protected abstract List<POJOEndpoint> getPojoEndpoints(final DeploymentUnit unit);
@@ -116,14 +114,14 @@
* @param jseArchiveMD universal JSE meta data model
* @param jbossWebMD jboss web meta data
*/
- private void setConfigNameAndFile(final JSEArchiveMetaData jseArchiveMD, final JBossWebMetaData jbossWebMD, final JBossWebservicesMetaData jbossWebservicesMD) {
+ private void setConfigNameAndFile(final JSEArchiveMetaData.Builder jseArchiveMDBuilder, final JBossWebMetaData jbossWebMD, final JBossWebservicesMetaData jbossWebservicesMD) {
if (jbossWebservicesMD != null) {
if (jbossWebservicesMD.getConfigName() != null) {
final String configName = jbossWebservicesMD.getConfigName();
- jseArchiveMD.setConfigName(configName);
+ jseArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
final String configFile = jbossWebservicesMD.getConfigFile();
- jseArchiveMD.setConfigFile(configFile);
+ jseArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
// ensure higher priority against web.xml context parameters
@@ -136,12 +134,12 @@
for (final ParamValueMetaData contextParam : contextParams) {
if (WSConstants.JBOSSWS_CONFIG_NAME.equals(contextParam.getParamName())) {
final String configName = contextParam.getParamValue();
- jseArchiveMD.setConfigName(configName);
+ jseArchiveMDBuilder.setConfigName(configName);
ROOT_LOGGER.settingConfigName(configName);
}
if (WSConstants.JBOSSWS_CONFIG_FILE.equals(contextParam.getParamName())) {
final String configFile = contextParam.getParamValue();
- jseArchiveMD.setConfigFile(configFile);
+ jseArchiveMDBuilder.setConfigFile(configFile);
ROOT_LOGGER.settingConfigFile(configFile);
}
}
@@ -159,15 +157,17 @@
if (securityConstraintsMD != null) {
for (final SecurityConstraintMetaData securityConstraintMD : securityConstraintsMD) {
- final JSESecurityMetaData jseSecurityMD = new JSESecurityMetaData();
+ final JSESecurityMetaData.Builder jseSecurityMDBuilder = new JSESecurityMetaData.Builder();
// transport guarantee
- jseSecurityMD.setTransportGuarantee(securityConstraintMD.getTransportGuarantee().name());
-
+ jseSecurityMDBuilder.setTransportGuarantee(securityConstraintMD.getTransportGuarantee().name());
+
// web resources
- this.setWebResources(jseSecurityMD, securityConstraintMD);
+ for (final WebResourceCollectionMetaData webResourceMD : securityConstraintMD.getResourceCollections()) {
+ jseSecurityMDBuilder.addWebResource(webResourceMD.getName(), webResourceMD.getUrlPatterns());
+ }
- jseSecurityMDs.add(jseSecurityMD);
+ jseSecurityMDs.add(jseSecurityMDBuilder.build());
}
}
@@ -175,24 +175,6 @@
}
/**
- * Sets web resources in universal meta data model.
- *
- * @param jseSecurityMD universal JSE security meta data model
- * @param securityConstraintMD security constraint meta data
- */
- private void setWebResources(final JSESecurityMetaData jseSecurityMD, final SecurityConstraintMetaData securityConstraintMD) {
- final WebResourceCollectionsMetaData webResources = securityConstraintMD.getResourceCollections();
-
- for (final WebResourceCollectionMetaData webResourceMD : webResources) {
- final JSEResourceCollection jseResource = jseSecurityMD.addWebResource(webResourceMD.getName());
-
- for (final String webResourceUrlPatterns : webResourceMD.getUrlPatterns()) {
- jseResource.addPattern(webResourceUrlPatterns);
- }
- }
- }
-
- /**
* Returns servlet name to url pattern mappings.
*
* @param jbossWebMD jboss web meta data
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java 2014-05-13 20:20:00 UTC (rev 18638)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/MetaDataBuilderJAXWS_EJB.java 2014-05-13 20:21:06 UTC (rev 18639)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -42,14 +42,14 @@
final class MetaDataBuilderJAXWS_EJB extends AbstractMetaDataBuilderEJB {
@Override
- protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD) {
+ protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData.Builder ejbArchiveMDBuilder) {
if (!WSHelper.isJaxwsJseDeployment(dep)) { // [AS7-1605] support
final JBossWebMetaData jbossWebMD = WSHelper.getOptionalAttachment(dep, JBossWebMetaData.class);
final String contextRoot = getContextRoot(dep, jbossWebMD);
if (contextRoot != null) {
- final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();
- jseArchiveMD.setContextRoot(contextRoot);
- dep.addAttachment(JSEArchiveMetaData.class, jseArchiveMD);
+ final JSEArchiveMetaData.Builder jseArchiveMDBuilder = new JSEArchiveMetaData.Builder();
+ jseArchiveMDBuilder.setContextRoot(contextRoot);
+ dep.addAttachment(JSEArchiveMetaData.class, jseArchiveMDBuilder.build());
}
}
@@ -61,7 +61,7 @@
buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD, jbossWebservicesMD);
}
- ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
+ ejbArchiveMDBuilder.setEnterpriseBeans(wsEjbsMD);
}
}
10 years, 7 months
JBossWS SVN: r18638 - in spi/trunk/src/main/java/org/jboss/wsf/spi/metadata: webservices and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-13 16:20:00 -0400 (Tue, 13 May 2014)
New Revision: 18638
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/SLSBMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java
Log:
[JBWS-3793] More changes to j2ee metadata
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2014-05-13 20:17:08 UTC (rev 18637)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2014-05-13 20:20:00 UTC (rev 18638)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -34,17 +34,98 @@
public class EJBArchiveMetaData
{
/** ArrayList<BeanMetaData> for the ejbs */
- private List<EJBMetaData> beans = Collections.emptyList();
+ private final List<EJBMetaData> beans;
/** The optional JBossWS config-name */
- private String configName;
+ private final String configName;
/** The optional JBossWS config-file */
- private String configFile;
+ private final String configFile;
/** The web context root to use for web services */
- private String webServiceContextRoot;
+ private final String webServiceContextRoot;
/** The security-domain value assigned to the application */
- private String securityDomain;
+ private final String securityDomain;
/** A HashMap<String, String> for webservice description publish locations */
- private PublishLocationAdapter publishLocationAdapter;
+ private final PublishLocationAdapter publishLocationAdapter;
+
+ public static class Builder
+ {
+ private List<EJBMetaData> beans = Collections.emptyList();
+ private String configName;
+ private String configFile;
+ private String webServiceContextRoot;
+ private String securityDomain;
+ private PublishLocationAdapter publishLocationAdapter;
+
+ public EJBArchiveMetaData build()
+ {
+ return new EJBArchiveMetaData(beans, configName, configFile, webServiceContextRoot, securityDomain,
+ publishLocationAdapter);
+ }
+
+ public List<EJBMetaData> getEnterpriseBeans()
+ {
+ return beans;
+ }
+ public void setEnterpriseBeans(List<EJBMetaData> beans)
+ {
+ this.beans = beans;
+ }
+ public String getConfigName()
+ {
+ return configName;
+ }
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+ public String getWebServiceContextRoot()
+ {
+ return webServiceContextRoot;
+ }
+ public void setWebServiceContextRoot(String webServiceContextRoot)
+ {
+ this.webServiceContextRoot = webServiceContextRoot;
+ }
+ public String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+ public void setSecurityDomain(String securityDomain)
+ {
+ this.securityDomain = securityDomain;
+ }
+ public PublishLocationAdapter getPublishLocationAdapter()
+ {
+ return publishLocationAdapter;
+ }
+ public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
+ {
+ this.publishLocationAdapter = publishLocationAdapter;
+ }
+
+ }
+
+ public EJBArchiveMetaData(List<EJBMetaData> beans, String configName, String configFile,
+ String webServiceContextRoot, String securityDomain, PublishLocationAdapter publishLocationAdapter)
+ {
+ if (beans != null) {
+ this.beans = Collections.unmodifiableList(beans);
+ } else {
+ this.beans = Collections.emptyList();
+ }
+ this.configName = configName;
+ this.configFile = configFile;
+ this.webServiceContextRoot = webServiceContextRoot;
+ this.securityDomain = securityDomain;
+ this.publishLocationAdapter = publishLocationAdapter;
+ }
public EJBMetaData getBeanByEjbName(String ejbName)
{
@@ -63,56 +144,26 @@
return beans.iterator();
}
- public void setEnterpriseBeans(List<EJBMetaData> beans)
- {
- this.beans = beans;
- }
-
public String getConfigName()
{
return configName;
}
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
public String getConfigFile()
{
return configFile;
}
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
public String getWebServiceContextRoot()
{
return webServiceContextRoot;
}
- public void setWebServiceContextRoot(String contextRoot)
- {
- this.webServiceContextRoot = contextRoot;
- }
-
public String getSecurityDomain()
{
return securityDomain;
}
- public void setSecurityDomain(String securityDomain)
- {
- this.securityDomain = securityDomain;
- }
-
- public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
- {
- this.publishLocationAdapter = publishLocationAdapter;
- }
-
public String getWsdlPublishLocationByName(String name)
{
if (this.publishLocationAdapter != null)
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java 2014-05-13 20:17:08 UTC (rev 18637)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java 2014-05-13 20:20:00 UTC (rev 18638)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -30,34 +30,45 @@
public abstract class EJBMetaData
{
// The ejb-name element specifies an enterprise bean's name.
- private String ejbName;
+ private final String ejbName;
// The ejb-class element contains the fully-qualified name of the enterprise bean's class.
- private String ejbClass;
+ private final String ejbClass;
// The home element contains the fully-qualified name of the enterprise bean's home interface. */
- private String homeClass;
+ private final String homeClass;
// The local-home element contains the fully-qualified name of the enterprise bean's local home interface.
- private String localHomeClass;
+ private final String localHomeClass;
// The service-endpoint element contains the fully-qualified name of the beans service endpoint interface (SEI)
- private String seiName;
+ private final String seiName;
// The JNDI name under with the home interface should be bound
- private String jndiName;
+ private final String jndiName;
// The JNDI name under with the local home interface should be bound
- private String localJndiName;
+ private final String localJndiName;
// The optional port-component-name
- private String portComponentName;
+ private final String portComponentName;
// The optional port-component-uri
- private String portComponentURI;
+ private final String portComponentURI;
// The optional security meta data
- private EJBSecurityMetaData securityMetaData;
+ private final EJBSecurityMetaData securityMetaData;
- public String getEjbName()
+ protected EJBMetaData(String ejbName, String ejbClass, String homeClass, String localHomeClass, String seiName,
+ String jndiName, String localJndiName, String portComponentName, String portComponentURI,
+ EJBSecurityMetaData securityMetaData)
{
- return ejbName;
+ this.ejbName = ejbName;
+ this.ejbClass = ejbClass;
+ this.homeClass = homeClass;
+ this.localHomeClass = localHomeClass;
+ this.seiName = seiName;
+ this.jndiName = jndiName;
+ this.localJndiName = localJndiName;
+ this.portComponentName = portComponentName;
+ this.portComponentURI = portComponentURI;
+ this.securityMetaData = securityMetaData;
}
- public void setEjbName(String ejbName)
+ public String getEjbName()
{
- this.ejbName = ejbName;
+ return ejbName;
}
public String getEjbClass()
@@ -65,21 +76,11 @@
return ejbClass;
}
- public void setEjbClass(String ejbClass)
- {
- this.ejbClass = ejbClass;
- }
-
public String getServiceEndpointInterface()
{
return seiName;
}
- public void setServiceEndpointInterface(String seiName)
- {
- this.seiName = seiName;
- }
-
public String getContainerObjectNameJndiName()
{
return getHome() != null ? getJndiName() : getLocalJndiName();
@@ -90,68 +91,34 @@
return homeClass;
}
- public void setHome(String homeClass)
- {
- this.homeClass = homeClass;
- }
-
public String getJndiName()
{
return jndiName;
}
- public void setJndiName(String jndiName)
- {
- this.jndiName = jndiName;
- }
-
public String getLocalHome()
{
return localHomeClass;
}
- public void setLocalHome(String localHomeClass)
- {
- this.localHomeClass = localHomeClass;
- }
-
public String getLocalJndiName()
{
return localJndiName;
}
- public void setLocalJndiName(String localJndiName)
- {
- this.localJndiName = localJndiName;
- }
-
public String getPortComponentName()
{
return portComponentName;
}
- public void setPortComponentName(String portComponentName)
- {
- this.portComponentName = portComponentName;
- }
-
public String getPortComponentURI()
{
return portComponentURI;
}
- public void setPortComponentURI(String portComponentURI)
- {
- this.portComponentURI = portComponentURI;
- }
-
public EJBSecurityMetaData getSecurityMetaData()
{
return securityMetaData;
}
- public void setSecurityMetaData(EJBSecurityMetaData securityMetaData)
- {
- this.securityMetaData = securityMetaData;
- }
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2014-05-13 20:17:08 UTC (rev 18637)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2014-05-13 20:20:00 UTC (rev 18638)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.spi.metadata.j2ee;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -34,40 +35,139 @@
public class JSEArchiveMetaData
{
// The war context root as specified at the jboss-web.xml descriptor level.
- private String contextRoot;
+ private final String contextRoot;
// The servlet-mapping <servlet-name, url-pattern>
- private Map<String, String> servletMappings = new HashMap<String, String>();
+ private final Map<String, String> servletMappings;
// The servlet <servlet-name, servlet-class>
- private Map<String, String> servletClassNames = new HashMap<String, String>();
+ private final Map<String, String> servletClassNames;
// The optional JBossWS config-name
- private String configName;
+ private final String configName;
// The optional JBossWS config-file
- private String configFile;
+ private final String configFile;
// The security-domain value assigned to the application
- private String securityDomain;
+ private final String securityDomain;
// A HashMap<String, String> for webservice description publish locations
- private PublishLocationAdapter publishLocationAdapter;
+ private final PublishLocationAdapter publishLocationAdapter;
// web.xml security-constraints
- private List<JSESecurityMetaData> securityMetaData;
-
- public String getContextRoot()
+ private final List<JSESecurityMetaData> securityMetaData;
+
+ public static class Builder
{
- return contextRoot;
+ private String contextRoot;
+ private Map<String, String> servletMappings = new HashMap<String, String>();
+ private Map<String, String> servletClassNames = new HashMap<String, String>();
+ private String configName;
+ private String configFile;
+ private String securityDomain;
+ private PublishLocationAdapter publishLocationAdapter;
+ private List<JSESecurityMetaData> securityMetaData;
+
+ public JSEArchiveMetaData build()
+ {
+ return new JSEArchiveMetaData(contextRoot, servletMappings, servletClassNames, configName, configFile,
+ securityDomain, publishLocationAdapter, securityMetaData);
+ }
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+ public void setContextRoot(String contextRoot)
+ {
+ this.contextRoot = contextRoot;
+ }
+ public Map<String, String> getServletMappings()
+ {
+ return servletMappings;
+ }
+ public void setServletMappings(Map<String, String> servletMappings)
+ {
+ this.servletMappings = servletMappings;
+ }
+ public Map<String, String> getServletClassNames()
+ {
+ return servletClassNames;
+ }
+ public void setServletClassNames(Map<String, String> servletClassNames)
+ {
+ this.servletClassNames = servletClassNames;
+ }
+ public String getConfigName()
+ {
+ return configName;
+ }
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+ public String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+ public void setSecurityDomain(String securityDomain)
+ {
+ this.securityDomain = securityDomain;
+ }
+ public PublishLocationAdapter getPublishLocationAdapter()
+ {
+ return publishLocationAdapter;
+ }
+ public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
+ {
+ this.publishLocationAdapter = publishLocationAdapter;
+ }
+ public List<JSESecurityMetaData> getSecurityMetaData()
+ {
+ return securityMetaData;
+ }
+ public void setSecurityMetaData(List<JSESecurityMetaData> securityMetaData)
+ {
+ this.securityMetaData = securityMetaData;
+ }
}
-
- public void setContextRoot(String contextRoot)
+
+ protected JSEArchiveMetaData(String contextRoot, Map<String, String> servletMappings,
+ Map<String, String> servletClassNames, String configName, String configFile, String securityDomain,
+ PublishLocationAdapter publishLocationAdapter, List<JSESecurityMetaData> securityMetaData)
{
this.contextRoot = contextRoot;
+ if (servletMappings != null) {
+ this.servletMappings = Collections.unmodifiableMap(servletMappings);
+ } else {
+ this.servletMappings = Collections.emptyMap();
+ }
+ if (servletClassNames != null) {
+ this.servletClassNames = Collections.unmodifiableMap(servletClassNames);
+ } else {
+ this.servletClassNames = Collections.emptyMap();
+ }
+ this.configName = configName;
+ this.configFile = configFile;
+ this.securityDomain = securityDomain;
+ this.publishLocationAdapter = publishLocationAdapter;
+ if (securityMetaData != null) {
+ this.securityMetaData = Collections.unmodifiableList(securityMetaData);
+ } else {
+ this.securityMetaData = Collections.emptyList();
+ }
}
- public Map<String, String> getServletMappings()
+ public String getContextRoot()
{
- return servletMappings;
+ return contextRoot;
}
- public void setServletMappings(Map<String, String> servletMappings)
+ public Map<String, String> getServletMappings()
{
- this.servletMappings = servletMappings;
+ return servletMappings;
}
public Map<String, String> getServletClassNames()
@@ -75,56 +175,26 @@
return servletClassNames;
}
- public void setServletClassNames(Map<String, String> servletClassNames)
- {
- this.servletClassNames = servletClassNames;
- }
-
public String getConfigName()
{
return configName;
}
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
public String getConfigFile()
{
return configFile;
}
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
public String getSecurityDomain()
{
return securityDomain;
}
- public void setSecurityDomain(String securityDomain)
- {
- this.securityDomain = securityDomain;
- }
-
public List<JSESecurityMetaData> getSecurityMetaData()
{
return securityMetaData;
}
- public void setSecurityMetaData(List<JSESecurityMetaData> securityMetaData)
- {
- this.securityMetaData = securityMetaData;
- }
-
- public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
- {
- this.publishLocationAdapter = publishLocationAdapter;
- }
-
public String getWsdlPublishLocationByName(String name)
{
if (this.publishLocationAdapter != null)
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java 2014-05-13 20:17:08 UTC (rev 18637)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java 2014-05-13 20:20:00 UTC (rev 18638)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -22,8 +22,11 @@
package org.jboss.wsf.spi.metadata.j2ee;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
/**
*
@@ -33,16 +36,38 @@
public class JSESecurityMetaData
{
// The optional security-constraint/user-data-constraint/transport-guarantee
- private String transportGuarantee;
- // The HashMap for the security-constraint/web-resource-collection elements.
- private HashMap<String, JSEResourceCollection> webResources = new HashMap<String, JSEResourceCollection>();
+ private final String transportGuarantee;
+ // The Map for the security-constraint/web-resource-collection elements.
+ private final Map<String, JSEResourceCollection> webResources;
- public JSEResourceCollection addWebResource(final String name)
+ public static class Builder
{
- JSEResourceCollection wrc = new JSEResourceCollection(name);
- webResources.put(name, wrc);
- return wrc;
+ private String transportGuarantee;
+ // The HashMap for the security-constraint/web-resource-collection elements.
+ private HashMap<String, JSEResourceCollection> webResources = new HashMap<String, JSEResourceCollection>();
+
+ public JSESecurityMetaData build()
+ {
+ return new JSESecurityMetaData(transportGuarantee, webResources);
+ }
+
+ public void addWebResource(final String name, final Collection<String> urlPatterns)
+ {
+ JSEResourceCollection wrc = new JSEResourceCollection(name, urlPatterns);
+ webResources.put(name, wrc);
+ }
+
+ public void setTransportGuarantee(final String transportGuarantee)
+ {
+ this.transportGuarantee = transportGuarantee;
+ }
}
+
+ protected JSESecurityMetaData(String transportGuarantee, HashMap<String, JSEResourceCollection> webResources)
+ {
+ this.transportGuarantee = transportGuarantee;
+ this.webResources = webResources;
+ }
public Collection<JSEResourceCollection> getWebResources()
{
@@ -54,19 +79,19 @@
return transportGuarantee;
}
- public void setTransportGuarantee(String transportGuarantee)
- {
- this.transportGuarantee = transportGuarantee;
- }
-
public static class JSEResourceCollection
{
- private String name;
- private HashSet<String> urlPatterns = new HashSet<String>();
+ private final String name;
+ private final Set<String> urlPatterns;
- public JSEResourceCollection(final String name)
+ public JSEResourceCollection(final String name, Collection<String> urlPatterns)
{
this.name = name;
+ if (urlPatterns != null) {
+ this.urlPatterns = Collections.unmodifiableSet(new HashSet<String>(urlPatterns));
+ } else {
+ this.urlPatterns = Collections.emptySet();
+ }
}
public String getName()
@@ -74,13 +99,8 @@
return name;
}
- public void addPattern(String pattern)
+ public Set<String> getUrlPatterns()
{
- urlPatterns.add(pattern);
- }
-
- public HashSet<String> getUrlPatterns()
- {
return urlPatterns;
}
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/SLSBMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/SLSBMetaData.java 2014-05-13 20:17:08 UTC (rev 18637)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/SLSBMetaData.java 2014-05-13 20:20:00 UTC (rev 18638)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -30,4 +30,110 @@
public class SLSBMetaData extends EJBMetaData
{
+ protected SLSBMetaData(String ejbName, String ejbClass, String homeClass, String localHomeClass, String seiName,
+ String jndiName, String localJndiName, String portComponentName, String portComponentURI,
+ EJBSecurityMetaData securityMetaData)
+ {
+ super(ejbName, ejbClass, homeClass, localHomeClass, seiName, jndiName, localJndiName, portComponentName,
+ portComponentURI, securityMetaData);
+ }
+
+ public static class Builder {
+ private String ejbName;
+ private String ejbClass;
+ private String homeClass;
+ private String localHomeClass;
+ private String seiName;
+ private String jndiName;
+ private String localJndiName;
+ private String portComponentName;
+ private String portComponentURI;
+ private EJBSecurityMetaData securityMetaData;
+
+ public SLSBMetaData build()
+ {
+ return new SLSBMetaData(ejbName, ejbClass, homeClass, localHomeClass, seiName, jndiName, localJndiName, portComponentName, portComponentURI, securityMetaData);
+ }
+
+ public String getEjbName()
+ {
+ return ejbName;
+ }
+ public void setEjbName(String ejbName)
+ {
+ this.ejbName = ejbName;
+ }
+ public String getEjbClass()
+ {
+ return ejbClass;
+ }
+ public void setEjbClass(String ejbClass)
+ {
+ this.ejbClass = ejbClass;
+ }
+ public String getHomeClass()
+ {
+ return homeClass;
+ }
+ public void setHomeClass(String homeClass)
+ {
+ this.homeClass = homeClass;
+ }
+ public String getLocalHomeClass()
+ {
+ return localHomeClass;
+ }
+ public void setLocalHomeClass(String localHomeClass)
+ {
+ this.localHomeClass = localHomeClass;
+ }
+ public String getSeiName()
+ {
+ return seiName;
+ }
+ public void setSeiName(String seiName)
+ {
+ this.seiName = seiName;
+ }
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+ public String getLocalJndiName()
+ {
+ return localJndiName;
+ }
+ public void setLocalJndiName(String localJndiName)
+ {
+ this.localJndiName = localJndiName;
+ }
+ public String getPortComponentName()
+ {
+ return portComponentName;
+ }
+ public void setPortComponentName(String portComponentName)
+ {
+ this.portComponentName = portComponentName;
+ }
+ public String getPortComponentURI()
+ {
+ return portComponentURI;
+ }
+ public void setPortComponentURI(String portComponentURI)
+ {
+ this.portComponentURI = portComponentURI;
+ }
+ public EJBSecurityMetaData getSecurityMetaData()
+ {
+ return securityMetaData;
+ }
+ public void setSecurityMetaData(EJBSecurityMetaData securityMetaData)
+ {
+ this.securityMetaData = securityMetaData;
+ }
+ }
}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java 2014-05-13 20:17:08 UTC (rev 18637)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebserviceDescriptionMetaData.java 2014-05-13 20:20:00 UTC (rev 18638)
@@ -52,7 +52,7 @@
// The required <jaxrpc-mapping-file> element
private final String jaxrpcMappingFile;
// The required <port-component> elements
- private final List<PortComponentMetaData> portComponents; // = new ArrayList<PortComponentMetaData>();
+ private final List<PortComponentMetaData> portComponents;
public WebserviceDescriptionMetaData(String webserviceDescriptionName,
String wsdlFile, String jaxrpcMappingFile, PortComponentMetaData... portComponents)
10 years, 7 months
JBossWS SVN: r18637 - common/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-13 16:17:08 -0400 (Tue, 13 May 2014)
New Revision: 18637
Modified:
common/trunk/pom.xml
Log:
Build to 3.0.0-SNAPSHOT
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2014-05-13 20:16:37 UTC (rev 18636)
+++ common/trunk/pom.xml 2014-05-13 20:17:08 UTC (rev 18637)
@@ -9,7 +9,7 @@
<packaging>jar</packaging>
<description>JBossWS Common</description>
- <version>2.3.1-SNAPSHOT</version>
+ <version>3.0.0-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -27,7 +27,7 @@
<!-- Properties -->
<properties>
- <jbossws.spi.version>2.3.1-SNAPSHOT</jbossws.spi.version>
+ <jbossws.spi.version>3.0.0-SNAPSHOT</jbossws.spi.version>
<jboss.jaxbintros.version>1.0.2.GA</jboss.jaxbintros.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
<jboss-logging.version>3.1.2.GA</jboss-logging.version>
10 years, 7 months
JBossWS SVN: r18636 - common/branches.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-13 16:16:37 -0400 (Tue, 13 May 2014)
New Revision: 18636
Added:
common/branches/jbossws-common-2.3.x/
Log:
Branching for 2.3.x maintenance
10 years, 7 months
JBossWS SVN: r18635 - in container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices: webserviceref and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-12 13:49:46 -0400 (Mon, 12 May 2014)
New Revision: 18635
Modified:
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java
container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WebServiceReferences.java
Log:
[JBWS-3793] changes to use latest spi
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java 2014-05-12 17:49:01 UTC (rev 18634)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/metadata/AbstractMetaDataBuilderEJB.java 2014-05-12 17:49:46 UTC (rev 18635)
@@ -144,18 +144,14 @@
}
private static void buildSecurityMetaData(final EJBMetaData wsEjbMD, final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
- final EJBSecurityMetaData smd = new EJBSecurityMetaData();
// auth method
final String authMethod = getAuthMethod(ejbEndpoint, portComponentMD);
- smd.setAuthMethod(authMethod);
// transport guarantee
final String transportGuarantee = getTransportGuarantee(ejbEndpoint, portComponentMD);
- smd.setTransportGuarantee(transportGuarantee);
// secure wsdl access
final boolean secureWsdlAccess = isSecureWsdlAccess(ejbEndpoint, portComponentMD);
- smd.setSecureWSDLAccess(secureWsdlAccess);
// propagate
- wsEjbMD.setSecurityMetaData(smd);
+ wsEjbMD.setSecurityMetaData(new EJBSecurityMetaData(authMethod, transportGuarantee, secureWsdlAccess));
}
private static String getAuthMethod(final EJBEndpoint ejbEndpoint, final JBossPortComponentMetaData portComponentMD) {
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java 2014-05-12 17:49:01 UTC (rev 18634)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefDDProcessor.java 2014-05-12 17:49:46 UTC (rev 18635)
@@ -89,8 +89,8 @@
throw MESSAGES.jaxRpcNotSupported();
}
// construct service ref
- final UnifiedServiceRefMetaData serviceRefUMDM = new UnifiedServiceRefMetaData(getUnifiedVirtualFile(unit));
- translate(serviceRefMD, serviceRefUMDM);
+ final UnifiedServiceRefMetaData serviceRefUMDM = translate(serviceRefMD);
+ serviceRefUMDM.setVfsRoot(getUnifiedVirtualFile(unit));
processWSFeatures(unit, serviceRefMD.getInjectionTargets(), serviceRefUMDM);
final WSRefRegistry wsRefRegistry = ASHelper.getWSRefRegistry(unit);
wsRefRegistry.add(getCacheKey(componentDescription, serviceRefUMDM), serviceRefUMDM);
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java 2014-05-12 17:49:01 UTC (rev 18634)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSRefUtils.java 2014-05-12 17:49:46 UTC (rev 18635)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
+ * Copyright 2014, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -53,12 +53,17 @@
import org.jboss.metadata.javaee.spec.ServiceReferenceHandlerChainsMetaData;
import org.jboss.metadata.javaee.spec.ServiceReferenceHandlerMetaData;
import org.jboss.metadata.javaee.spec.ServiceReferenceMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.AddressingMetadata;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.MTOMMetadata;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.RespectBindingMetadata;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaDataBuilder;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaDataBuilder;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
import org.jboss.wsf.spi.serviceref.ServiceRefType;
@@ -74,22 +79,22 @@
private WSRefUtils() {
}
- static UnifiedServiceRefMetaData translate(final ServiceReferenceMetaData serviceRefMD, final UnifiedServiceRefMetaData serviceRefUMDM) {
- serviceRefUMDM.setServiceRefName(serviceRefMD.getName());
- serviceRefUMDM.setServiceRefType(serviceRefMD.getServiceRefType());
- serviceRefUMDM.setServiceInterface(serviceRefMD.getServiceInterface());
- serviceRefUMDM.setWsdlFile(serviceRefMD.getWsdlFile());
- serviceRefUMDM.setMappingFile(serviceRefMD.getJaxrpcMappingFile());
- serviceRefUMDM.setServiceQName(serviceRefMD.getServiceQname());
+ static UnifiedServiceRefMetaData translate(final ServiceReferenceMetaData serviceRefMD) {
+ UnifiedServiceRefMetaDataBuilder builder = new UnifiedServiceRefMetaDataBuilder();
+ builder.setServiceRefName(serviceRefMD.getName());
+ builder.setServiceRefType(serviceRefMD.getServiceRefType());
+ builder.setServiceInterface(serviceRefMD.getServiceInterface());
+ builder.setWsdlFile(serviceRefMD.getWsdlFile());
+ builder.setMappingFile(serviceRefMD.getJaxrpcMappingFile());
+ builder.setServiceQName(serviceRefMD.getServiceQname());
// propagate port components
final Collection<? extends PortComponentRef> portComponentsMD = serviceRefMD.getPortComponentRef();
if (portComponentsMD != null) {
for (final PortComponentRef portComponentMD : portComponentsMD) {
- final UnifiedPortComponentRefMetaData portComponentUMDM = getUnifiedPortComponentRefMetaData(serviceRefUMDM,
- portComponentMD);
+ final UnifiedPortComponentRefMetaData portComponentUMDM = getUnifiedPortComponentRefMetaData(portComponentMD);
if (portComponentUMDM.getServiceEndpointInterface() != null || portComponentUMDM.getPortQName() != null) {
- serviceRefUMDM.addPortComponentRef(portComponentUMDM);
+ builder.addPortComponentRef(portComponentUMDM);
} else {
ROOT_LOGGER.ignoringPortComponentRef(portComponentUMDM);
}
@@ -101,7 +106,7 @@
if (handlersMD != null) {
for (final ServiceReferenceHandlerMetaData handlerMD : handlersMD) {
final UnifiedHandlerMetaData handlerUMDM = getUnifiedHandlerMetaData(handlerMD);
- serviceRefUMDM.addHandler(handlerUMDM);
+ builder.addHandler(handlerUMDM);
}
}
@@ -109,81 +114,73 @@
ServiceReferenceHandlerChainsMetaData handlerChainsMD = serviceRefMD.getHandlerChains();
if (handlerChainsMD != null) {
final UnifiedHandlerChainsMetaData handlerChainsUMDM = getUnifiedHandlerChainsMetaData(handlerChainsMD);
- serviceRefUMDM.setHandlerChains(handlerChainsUMDM);
+ builder.setHandlerChains(handlerChainsUMDM);
}
// propagate jboss specific MD
if (serviceRefMD instanceof JBossServiceReferenceMetaData) {
- processUnifiedJBossServiceRefMetaData(serviceRefUMDM, serviceRefMD);
+ final JBossServiceReferenceMetaData jbossServiceRefMD = (JBossServiceReferenceMetaData) serviceRefMD;
+ builder.setServiceImplClass(jbossServiceRefMD.getServiceClass());
+ builder.setConfigName(jbossServiceRefMD.getConfigName());
+ builder.setConfigFile(jbossServiceRefMD.getConfigFile());
+ builder.setWsdlOverride(jbossServiceRefMD.getWsdlOverride());
+ builder.setHandlerChain(jbossServiceRefMD.getHandlerChain());
}
- serviceRefUMDM.setType(ServiceRefType.JAXWS);
+ builder.setType(ServiceRefType.JAXWS);
- return serviceRefUMDM;
+ return builder.build();
}
- private static void processUnifiedJBossServiceRefMetaData(final UnifiedServiceRefMetaData serviceRefUMDM, final ServiceReferenceMetaData serviceRefMD) {
- final JBossServiceReferenceMetaData jbossServiceRefMD = (JBossServiceReferenceMetaData) serviceRefMD;
- serviceRefUMDM.setServiceImplClass(jbossServiceRefMD.getServiceClass());
- serviceRefUMDM.setConfigName(jbossServiceRefMD.getConfigName());
- serviceRefUMDM.setConfigFile(jbossServiceRefMD.getConfigFile());
- serviceRefUMDM.setWsdlOverride(jbossServiceRefMD.getWsdlOverride());
- serviceRefUMDM.setHandlerChain(jbossServiceRefMD.getHandlerChain());
- }
+ private static UnifiedPortComponentRefMetaData getUnifiedPortComponentRefMetaData(final PortComponentRef portComponentMD) {
+ final UnifiedPortComponentRefMetaDataBuilder builder = new UnifiedPortComponentRefMetaDataBuilder();
- private static UnifiedPortComponentRefMetaData getUnifiedPortComponentRefMetaData(final UnifiedServiceRefMetaData serviceRefUMDM, final PortComponentRef portComponentMD) {
- final UnifiedPortComponentRefMetaData portComponentUMDM = new UnifiedPortComponentRefMetaData(serviceRefUMDM);
-
// propagate service endpoint interface
- portComponentUMDM.setServiceEndpointInterface(portComponentMD.getServiceEndpointInterface());
+ builder.setServiceEndpointInterface(portComponentMD.getServiceEndpointInterface());
// propagate MTOM properties
- portComponentUMDM.setMtomEnabled(portComponentMD.isEnableMtom());
- portComponentUMDM.setMtomThreshold(portComponentMD.getMtomThreshold());
+ builder.setMtomEnabled(portComponentMD.isEnableMtom());
+ builder.setMtomThreshold(portComponentMD.getMtomThreshold());
// propagate addressing properties
final Addressing addressingMD = portComponentMD.getAddressing();
if (addressingMD != null) {
- portComponentUMDM.setAddressingAnnotationSpecified(true);
- portComponentUMDM.setAddressingEnabled(addressingMD.isEnabled());
- portComponentUMDM.setAddressingRequired(addressingMD.isRequired());
- portComponentUMDM.setAddressingResponses(addressingMD.getResponses());
+ builder.setAddressingAnnotationSpecified(true);
+ builder.setAddressingEnabled(addressingMD.isEnabled());
+ builder.setAddressingRequired(addressingMD.isRequired());
+ builder.setAddressingResponses(addressingMD.getResponses());
}
// propagate respect binding properties
if (portComponentMD.getRespectBinding() != null) {
- portComponentUMDM.setRespectBindingAnnotationSpecified(true);
- portComponentUMDM.setRespectBindingEnabled(true);
+ builder.setRespectBindingAnnotationSpecified(true);
+ builder.setRespectBindingEnabled(true);
}
// propagate link
- portComponentUMDM.setPortComponentLink(portComponentMD.getPortComponentLink());
+ builder.setPortComponentLink(portComponentMD.getPortComponentLink());
// propagate jboss specific MD
if (portComponentMD instanceof JBossPortComponentRef) {
- processUnifiedJBossPortComponentRefMetaData(portComponentUMDM, portComponentMD);
- }
+ final JBossPortComponentRef jbossPortComponentMD = (JBossPortComponentRef) portComponentMD;
- return portComponentUMDM;
- }
+ // propagate port QName
+ builder.setPortQName(jbossPortComponentMD.getPortQname());
- private static void processUnifiedJBossPortComponentRefMetaData(final UnifiedPortComponentRefMetaData portComponentUMDM, final PortComponentRef portComponentMD) {
- final JBossPortComponentRef jbossPortComponentMD = (JBossPortComponentRef) portComponentMD;
+ // propagate configuration properties
+ builder.setConfigName(jbossPortComponentMD.getConfigName());
+ builder.setConfigFile(jbossPortComponentMD.getConfigFile());
- // propagate port QName
- portComponentUMDM.setPortQName(jbossPortComponentMD.getPortQname());
-
- // propagate configuration properties
- portComponentUMDM.setConfigName(jbossPortComponentMD.getConfigName());
- portComponentUMDM.setConfigFile(jbossPortComponentMD.getConfigFile());
-
- // propagate stub properties
- final List<StubPropertyMetaData> stubPropertiesMD = jbossPortComponentMD.getStubProperties();
- if (stubPropertiesMD != null) {
- for (final StubPropertyMetaData stubPropertyMD : stubPropertiesMD) {
- portComponentUMDM.addStubProperty(new UnifiedStubPropertyMetaData(stubPropertyMD.getPropName(), stubPropertyMD.getPropValue()));
+ // propagate stub properties
+ final List<StubPropertyMetaData> stubPropertiesMD = jbossPortComponentMD.getStubProperties();
+ if (stubPropertiesMD != null) {
+ for (final StubPropertyMetaData stubPropertyMD : stubPropertiesMD) {
+ builder.addStubProperty(new UnifiedStubPropertyMetaData(stubPropertyMD.getPropName(), stubPropertyMD.getPropValue()));
+ }
}
}
+
+ return builder.build();
}
private static UnifiedHandlerMetaData getUnifiedHandlerMetaData(ServiceReferenceHandlerMetaData srhmd) {
@@ -230,10 +227,10 @@
final javax.xml.ws.soap.Addressing addressingAnnotation = getAnnotation(anElement, javax.xml.ws.soap.Addressing.class);
if (addressingAnnotation != null) {
- serviceRefUMDM.setAddressingAnnotationSpecified(true);
- serviceRefUMDM.setAddressingEnabled(addressingAnnotation.enabled());
- serviceRefUMDM.setAddressingRequired(addressingAnnotation.required());
- serviceRefUMDM.setAddressingResponses(addressingAnnotation.responses().toString());
+ serviceRefUMDM.setAddressingMedadata(new AddressingMetadata(true,
+ addressingAnnotation.enabled(),
+ addressingAnnotation.required(),
+ addressingAnnotation.responses().toString()));
}
}
@@ -241,9 +238,7 @@
final MTOM mtomAnnotation = getAnnotation(anElement, MTOM.class);
if (mtomAnnotation != null) {
- serviceRefUMDM.setMtomAnnotationSpecified(true);
- serviceRefUMDM.setMtomEnabled(mtomAnnotation.enabled());
- serviceRefUMDM.setMtomThreshold(mtomAnnotation.threshold());
+ serviceRefUMDM.setMTOMMetadata(new MTOMMetadata(true, mtomAnnotation.enabled(), mtomAnnotation.threshold()));
}
}
@@ -251,8 +246,7 @@
final javax.xml.ws.RespectBinding respectBindingAnnotation = getAnnotation(anElement, javax.xml.ws.RespectBinding.class);
if (respectBindingAnnotation != null) {
- serviceRefUMDM.setRespectBindingAnnotationSpecified(true);
- serviceRefUMDM.setRespectBindingEnabled(respectBindingAnnotation.enabled());
+ serviceRefUMDM.setRespectBindingMetadata(new RespectBindingMetadata(true, respectBindingAnnotation.enabled()));
}
}
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WebServiceReferences.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WebServiceReferences.java 2014-05-12 17:49:01 UTC (rev 18634)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WebServiceReferences.java 2014-05-12 17:49:46 UTC (rev 18635)
@@ -45,8 +45,7 @@
final WSRefRegistry wsRefRegistry = ASHelper.getWSRefRegistry(unit);
UnifiedServiceRefMetaData serviceRefUMDM = wsRefRegistry.get(refKey);
if (serviceRefUMDM == null) {
- serviceRefUMDM = new UnifiedServiceRefMetaData(getUnifiedVirtualFile(unit));
- serviceRefUMDM.setServiceRefName(bindingName);
+ serviceRefUMDM = new UnifiedServiceRefMetaData(getUnifiedVirtualFile(unit), bindingName);
wsRefRegistry.add(refKey, serviceRefUMDM);
}
initServiceRef(unit, serviceRefUMDM, type, annotation);
10 years, 7 months
JBossWS SVN: r18634 - in container/wildfly80/branches/jbossws-wildfly800: server-integration and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-05-12 13:49:01 -0400 (Mon, 12 May 2014)
New Revision: 18634
Modified:
container/wildfly80/branches/jbossws-wildfly800/pom.xml
container/wildfly80/branches/jbossws-wildfly800/server-integration/pom.xml
container/wildfly80/branches/jbossws-wildfly800/tests-integration/pom.xml
Log:
Build to 5.0.0-SNAPSHOT
Modified: container/wildfly80/branches/jbossws-wildfly800/pom.xml
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/pom.xml 2014-05-12 17:48:00 UTC (rev 18633)
+++ container/wildfly80/branches/jbossws-wildfly800/pom.xml 2014-05-12 17:49:01 UTC (rev 18634)
@@ -35,7 +35,7 @@
<description>JBossWS WildFly 8.0.0.Final Integration Parent</description>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-wildfly800-parent</artifactId>
- <version>4.3.1-SNAPSHOT</version>
+ <version>5.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<scm>
@@ -51,8 +51,8 @@
<properties>
<jbossws.api.version>1.0.2.Final</jbossws.api.version>
- <jbossws.spi.version>2.3.1-SNAPSHOT</jbossws.spi.version>
- <jbossws.common.version>2.3.1-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>3.0.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.3.0.Final</jbossws.common.version>
<jboss.msc.version>1.2.0.Final</jboss.msc.version>
<wildfly.version>8.0.0.Final</wildfly.version>
<wildfly.security-manager.version>1.0.0.Final</wildfly.security-manager.version>
Modified: container/wildfly80/branches/jbossws-wildfly800/server-integration/pom.xml
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/server-integration/pom.xml 2014-05-12 17:48:00 UTC (rev 18633)
+++ container/wildfly80/branches/jbossws-wildfly800/server-integration/pom.xml 2014-05-12 17:49:01 UTC (rev 18634)
@@ -29,7 +29,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-wildfly800-parent</artifactId>
- <version>4.3.1-SNAPSHOT</version>
+ <version>5.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: container/wildfly80/branches/jbossws-wildfly800/tests-integration/pom.xml
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800/tests-integration/pom.xml 2014-05-12 17:48:00 UTC (rev 18633)
+++ container/wildfly80/branches/jbossws-wildfly800/tests-integration/pom.xml 2014-05-12 17:49:01 UTC (rev 18634)
@@ -29,7 +29,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-wildfly800-parent</artifactId>
- <version>4.3.1-SNAPSHOT</version>
+ <version>5.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
10 years, 7 months