Author: jim.ma
Date: 2013-04-08 05:14:02 -0400 (Mon, 08 Apr 2013)
New Revision: 17466
Modified:
container/jboss72/branches/jbossws-jboss720/pom.xml
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/publish/WSEndpointDeploymentUnit.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java
Log:
[JBWS-3611]:fix the ASIL and upgrade the spi and common
Modified: container/jboss72/branches/jbossws-jboss720/pom.xml
===================================================================
--- container/jboss72/branches/jbossws-jboss720/pom.xml 2013-04-08 09:10:21 UTC (rev
17465)
+++ container/jboss72/branches/jbossws-jboss720/pom.xml 2013-04-08 09:14:02 UTC (rev
17466)
@@ -51,8 +51,8 @@
<properties>
<jbossws.api.version>1.0.1.Final</jbossws.api.version>
- <jbossws.spi.version>2.1.1.Final</jbossws.spi.version>
- <jbossws.common.version>2.1.1.Final</jbossws.common.version>
+ <jbossws.spi.version>2.2.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.2.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.1.Final</jboss.jaxws.api.version>
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java
===================================================================
---
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java 2013-04-08
09:10:21 UTC (rev 17465)
+++
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java 2013-04-08
09:14:02 UTC (rev 17466)
@@ -60,6 +60,7 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointState;
import org.jboss.wsf.spi.deployment.WSFServlet;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
import org.jboss.wsf.spi.publish.Context;
import org.jboss.wsf.spi.publish.EndpointPublisher;
@@ -87,18 +88,24 @@
@Override
public Context publish(String context, ClassLoader loader, Map<String, String>
urlPatternToClassNameMap) throws Exception {
- return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap, null,
null);
+ return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap, null,
null, null);
}
@Override
public Context publish(String context, ClassLoader loader, Map<String, String>
urlPatternToClassNameMap, WebservicesMetaData metadata) throws Exception {
- return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap, null,
metadata);
+ return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap, null,
metadata, null);
}
+ @Override
+ public Context publish(String context, ClassLoader loader, Map<String, String>
urlPatternToClassNameMap,
+ WebservicesMetaData metadata, JBossWebservicesMetaData jbwsMetadata) throws
Exception {
+ return publish(getBaseTarget(), context, loader, urlPatternToClassNameMap, null,
metadata, jbwsMetadata);
+ }
+
public Context publish(ServiceTarget target, String context, ClassLoader loader,
- Map<String, String> urlPatternToClassNameMap, JBossWebMetaData jbwmd,
WebservicesMetaData metadata)
+ Map<String, String> urlPatternToClassNameMap, JBossWebMetaData jbwmd,
WebservicesMetaData metadata, JBossWebservicesMetaData jbwsMetadata)
throws Exception {
- WSEndpointDeploymentUnit unit = new WSEndpointDeploymentUnit(loader, context,
urlPatternToClassNameMap, jbwmd, metadata);
+ WSEndpointDeploymentUnit unit = new WSEndpointDeploymentUnit(loader, context,
urlPatternToClassNameMap, jbwmd, metadata, jbwsMetadata);
return new Context(context, publish(target, unit));
}
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/publish/WSEndpointDeploymentUnit.java
===================================================================
---
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/publish/WSEndpointDeploymentUnit.java 2013-04-08
09:10:21 UTC (rev 17465)
+++
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/publish/WSEndpointDeploymentUnit.java 2013-04-08
09:14:02 UTC (rev 17466)
@@ -35,6 +35,7 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.ServiceRegistry;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
public class WSEndpointDeploymentUnit extends SimpleAttachable implements DeploymentUnit
{
@@ -42,32 +43,35 @@
private String deploymentName;
public WSEndpointDeploymentUnit(ClassLoader loader, String context,
Map<String,String> urlPatternToClassName, WebservicesMetaData metadata) {
- this(loader, context, urlPatternToClassName, new JBossWebMetaData(), metadata);
- }
+ this(loader, context, urlPatternToClassName, new JBossWebMetaData(), metadata,
null);
+ }
- public WSEndpointDeploymentUnit(ClassLoader loader, String context, Map<String,
String> urlPatternToClassName,
- JBossWebMetaData jbossWebMetaData, WebservicesMetaData metadata) {
- this.deploymentName = context + ".deployment";
+ public WSEndpointDeploymentUnit(ClassLoader loader, String context, Map<String,
String> urlPatternToClassName,
+ JBossWebMetaData jbossWebMetaData, WebservicesMetaData metadata,
JBossWebservicesMetaData jbwsMetaData) {
+ this.deploymentName = context + ".deployment";
- JAXWSDeployment jaxwsDeployment = new JAXWSDeployment();
- if (jbossWebMetaData == null) {
- jbossWebMetaData = new JBossWebMetaData();
- }
- jbossWebMetaData.setContextRoot(context);
- String endpointName = null;
- String className = null;
- for (String urlPattern : urlPatternToClassName.keySet()) {
- className = urlPatternToClassName.get(urlPattern);
- endpointName = getShortName(className, urlPattern);
- addEndpoint(jbossWebMetaData, jaxwsDeployment, endpointName, className,
urlPattern);
- }
- this.putAttachment(WSAttachmentKeys.CLASSLOADER_KEY, loader);
- this.putAttachment(WSAttachmentKeys.JAXWS_ENDPOINTS_KEY, jaxwsDeployment);
- this.putAttachment(WSAttachmentKeys.JBOSSWEB_METADATA_KEY, jbossWebMetaData);
- if (metadata != null) {
- this.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, metadata);
- }
- }
+ JAXWSDeployment jaxwsDeployment = new JAXWSDeployment();
+ if (jbossWebMetaData == null) {
+ jbossWebMetaData = new JBossWebMetaData();
+ }
+ jbossWebMetaData.setContextRoot(context);
+ String endpointName = null;
+ String className = null;
+ for (String urlPattern : urlPatternToClassName.keySet()) {
+ className = urlPatternToClassName.get(urlPattern);
+ endpointName = getShortName(className, urlPattern);
+ addEndpoint(jbossWebMetaData, jaxwsDeployment, endpointName, className,
urlPattern);
+ }
+ this.putAttachment(WSAttachmentKeys.CLASSLOADER_KEY, loader);
+ this.putAttachment(WSAttachmentKeys.JAXWS_ENDPOINTS_KEY, jaxwsDeployment);
+ this.putAttachment(WSAttachmentKeys.JBOSSWEB_METADATA_KEY, jbossWebMetaData);
+ if (metadata != null) {
+ this.putAttachment(WSAttachmentKeys.WEBSERVICES_METADATA_KEY, metadata);
+ }
+ if (jbwsMetaData != null) {
+ this.putAttachment(WSAttachmentKeys.JBOSS_WEBSERVICES_METADATA_KEY,
jbwsMetaData);
+ }
+ }
private String getShortName(String className, String urlPattern) {
final StringTokenizer st = new StringTokenizer(urlPattern, "/*");
@@ -95,6 +99,7 @@
}
}
jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointName, className, null,
urlPattern, false));
+
}
@Override
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java
===================================================================
---
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java 2013-04-08
09:10:21 UTC (rev 17465)
+++
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/service/EndpointPublishService.java 2013-04-08
09:14:02 UTC (rev 17466)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat, Inc., and individual contributors
+ * Copyright 2011, 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.
*
@@ -40,6 +40,7 @@
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
import org.jboss.msc.value.InjectedValue;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
import org.jboss.wsf.spi.publish.Context;
@@ -59,18 +60,20 @@
private final Map<String,String> urlPatternToClassName;
private final JBossWebMetaData jbwmd;
private final WebservicesMetaData wsmd;
+ private final JBossWebservicesMetaData jbwsmd;
private final InjectedValue<VirtualHost> hostInjector = new
InjectedValue<VirtualHost>();
-
+
private EndpointPublishService(final String context, final ClassLoader loader,
- final Map<String,String> urlPatternToClassName, JBossWebMetaData jbwmd,
WebservicesMetaData wsmd) {
- this.name = WSServices.ENDPOINT_PUBLISH_SERVICE.append(context);
- this.loader = loader;
- this.context = context;
- this.urlPatternToClassName = urlPatternToClassName;
- this.jbwmd = jbwmd;
- this.wsmd = wsmd;
- }
+ final Map<String,String> urlPatternToClassName, JBossWebMetaData jbwmd,
WebservicesMetaData wsmd, JBossWebservicesMetaData jbwsmd) {
+ this.name = WSServices.ENDPOINT_PUBLISH_SERVICE.append(context);
+ this.loader = loader;
+ this.context = context;
+ this.urlPatternToClassName = urlPatternToClassName;
+ this.jbwmd = jbwmd;
+ this.wsmd = wsmd;
+ this.jbwsmd = jbwsmd;
+ }
@Override
public Context getValue() {
@@ -90,7 +93,7 @@
ROOT_LOGGER.starting(name);
try {
EndpointPublisherImpl publisher = new
EndpointPublisherImpl(hostInjector.getValue().getHost(), true);
- wsctx = publisher.publish(ctx.getChildTarget(), context, loader,
urlPatternToClassName, jbwmd, wsmd);
+ wsctx = publisher.publish(ctx.getChildTarget(), context, loader,
urlPatternToClassName, jbwmd, wsmd, jbwsmd);
} catch (Exception e) {
throw new StartException(e);
}
@@ -107,33 +110,29 @@
}
}
- public static ServiceBuilder<Context> createServiceBuilder(final ServiceTarget
serviceTarget, final String context,
- final ClassLoader loader, final String hostName, final
Map<String,String> urlPatternToClassName) {
- return createServiceBuilder(serviceTarget, context, loader, hostName,
urlPatternToClassName, null, null);
- }
+ public static ServiceBuilder<Context> createServiceBuilder(final ServiceTarget
serviceTarget, final String context, final ClassLoader loader, final String hostName,
+ final Map<String, String> urlPatternToClassName)
+ {
+ return createServiceBuilder(serviceTarget, context, loader, hostName,
urlPatternToClassName, null, null, null);
+ }
- public static ServiceBuilder<Context> createServiceBuilder(final ServiceTarget
serviceTarget, final String context,
- final ClassLoader loader, final String hostName, final Map<String,
String> urlPatternToClassName,
- JBossWebMetaData jbwmd, WebservicesMetaData wsmd) {
- final EndpointPublishService service = new EndpointPublishService(context,
loader, urlPatternToClassName, jbwmd, wsmd);
- final ServiceBuilder<Context> builder =
serviceTarget.addService(service.getName(), service);
- builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE);
- builder.addDependency(DependencyType.REQUIRED, WSServices.REGISTRY_SERVICE);
- builder.addDependency(WebSubsystemServices.JBOSS_WEB_HOST.append(hostName),
VirtualHost.class,
- service.getHostInjector());
- return builder;
- }
+ public static ServiceBuilder<Context> createServiceBuilder(final ServiceTarget
serviceTarget, final String context, final ClassLoader loader, final String hostName,
+ final Map<String, String> urlPatternToClassName, JBossWebMetaData jbwmd,
WebservicesMetaData wsmd, JBossWebservicesMetaData jbwsmd)
+ {
+ final EndpointPublishService service = new EndpointPublishService(context, loader,
urlPatternToClassName, jbwmd, wsmd, jbwsmd);
+ final ServiceBuilder<Context> builder =
serviceTarget.addService(service.getName(), service);
+ builder.addDependency(DependencyType.REQUIRED, WSServices.CONFIG_SERVICE);
+ builder.addDependency(DependencyType.REQUIRED, WSServices.REGISTRY_SERVICE);
+ builder.addDependency(WebSubsystemServices.JBOSS_WEB_HOST.append(hostName),
VirtualHost.class, service.getHostInjector());
+ return builder;
+ }
- public static void install(final ServiceTarget serviceTarget, final String context,
final ClassLoader loader,
- final String hostName, final Map<String,String> urlPatternToClassName)
{
- install(serviceTarget, context, loader, hostName, urlPatternToClassName, null,
null);
- }
+ public static void install(final ServiceTarget serviceTarget, final String context,
final ClassLoader loader, final String hostName,
+ final Map<String, String> urlPatternToClassName)
+ {
+ ServiceBuilder<Context> builder = createServiceBuilder(serviceTarget,
context, loader, hostName, urlPatternToClassName);
+ builder.setInitialMode(Mode.ACTIVE);
+ builder.install();
+ }
- public static void install(final ServiceTarget serviceTarget, final String context,
final ClassLoader loader,
- final String hostName, final Map<String,String> urlPatternToClassName,
JBossWebMetaData jbwmd, WebservicesMetaData wsmd) {
- ServiceBuilder<Context> builder = createServiceBuilder(serviceTarget,
context, loader, hostName, urlPatternToClassName, jbwmd, wsmd);
- builder.setInitialMode(Mode.ACTIVE);
- builder.install();
- }
-
}