JBossWS SVN: r16732 - shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-17 07:15:30 -0400 (Mon, 17 Sep 2012)
New Revision: 16732
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java
Log:
[JBWS-3547] Fix cookies handling in HandlerChainTestCase
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java 2012-09-14 16:18:22 UTC (rev 16731)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java 2012-09-17 11:15:30 UTC (rev 16732)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -21,7 +21,10 @@
*/
package org.jboss.test.ws.jaxws.samples.handlerchain;
-import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPMessage;
@@ -35,6 +38,7 @@
* A client side handler
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
* @since 08-Oct-2005
*/
public class ClientMimeHandler extends GenericSOAPHandler
@@ -48,9 +52,15 @@
{
log.info("handleOutbound");
+ // legacy JBossWS-Native approach
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
mimeHeaders.setHeader("Cookie", "client-cookie=true");
+
+ // proper approach through MessageContext.HTTP_REQUEST_HEADERS
+ Map<String, List<String>> httpHeaders = new HashMap<String, List<String>>();
+ httpHeaders.put("Cookie", Collections.singletonList("client-cookie=true"));
+ msgContext.put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders);
inboundCookie = null;
@@ -61,9 +71,21 @@
{
log.info("handleInbound");
+ //legacy JBossWS-Native approach
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
String[] cookies = mimeHeaders.getHeader("Set-Cookie");
+
+ // proper approach through MessageContext.HTTP_RESPONSE_HEADERS
+ if (cookies == null) {
+ @SuppressWarnings("unchecked")
+ Map<String, List<String>> httpHeaders = (Map<String, List<String>>) msgContext.get(MessageContext.HTTP_RESPONSE_HEADERS);
+ List<String> l = httpHeaders.get("Set-Cookie");
+ if (l != null && !l.isEmpty()) {
+ cookies = l.toArray(new String[l.size()]);
+ }
+ }
+
if (cookies != null && cookies.length == 1)
inboundCookie = cookies[0];
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java 2012-09-14 16:18:22 UTC (rev 16731)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/HandlerChainTestCase.java 2012-09-17 11:15:30 UTC (rev 16732)
@@ -88,12 +88,6 @@
private void assertCookies() throws Exception
{
- if (isIntegrationCXF())
- {
- System.out.println("FIXME: [CXF-1507] CXF client handler cannot set mime header");
- return;
- }
-
assertEquals("server-cookie=true", ClientMimeHandler.inboundCookie);
}
}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java 2012-09-14 16:18:22 UTC (rev 16731)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java 2012-09-17 11:15:30 UTC (rev 16732)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -21,6 +21,11 @@
*/
package org.jboss.test.ws.jaxws.samples.handlerchain;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.MessageContext;
@@ -33,6 +38,7 @@
* A server side handler
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
* @since 08-Oct-2005
*/
public class ServerMimeHandler extends GenericSOAPHandler
@@ -46,9 +52,21 @@
{
log.info("handleInbound");
+ // legacy JBossWS-Native approach...
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
String[] cookies = mimeHeaders.getHeader("Cookie");
+
+ // proper approach through MessageContext.HTTP_REQUEST_HEADERS
+ if (cookies == null) {
+ @SuppressWarnings("unchecked")
+ Map<String, List<String>> httpHeaders = (Map<String, List<String>>) msgContext.get(MessageContext.HTTP_REQUEST_HEADERS);
+ List<String> l = httpHeaders.get("Cookie");
+ if (l != null && !l.isEmpty()) {
+ cookies = l.toArray(new String[l.size()]);
+ }
+ }
+
if (cookies != null && cookies.length == 1 && cookies[0].equals("client-cookie=true"))
setCookieOnResponse = true;
@@ -62,9 +80,16 @@
if (setCookieOnResponse)
{
+ // legacy JBossWS-Native approach
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
mimeHeaders.setHeader("Set-Cookie", "server-cookie=true");
+
+ // proper approach through MessageContext.HTTP_REQUEST_HEADERS
+ Map<String, List<String>> httpHeaders = new HashMap<String, List<String>>();
+ httpHeaders.put("Set-Cookie", Collections.singletonList("server-cookie=true"));
+ msgContext.put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders);
+
setCookieOnResponse = false;
}
12 years, 3 months
JBossWS SVN: r16731 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:18:22 -0400 (Fri, 14 Sep 2012)
New Revision: 16731
Modified:
stack/cxf/trunk/pom.xml
Log:
Moving to latest component snapshots
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2012-09-14 16:17:23 UTC (rev 16730)
+++ stack/cxf/trunk/pom.xml 2012-09-14 16:18:22 UTC (rev 16731)
@@ -59,10 +59,10 @@
<!-- Properties -->
<properties>
- <jbossws.api.version>1.0.1.Beta3</jbossws.api.version>
- <jbossws.spi.version>2.1.0.Beta3</jbossws.spi.version>
+ <jbossws.api.version>1.0.1-SNAPSHOT</jbossws.api.version>
+ <jbossws.spi.version>2.1.0-SNAPSHOT</jbossws.spi.version>
<jbossws.common.version>2.1.0-SNAPSHOT</jbossws.common.version>
- <jbossws.common.tools.version>1.0.1.GA</jbossws.common.tools.version>
+ <jbossws.common.tools.version>1.1.0-SNAPSHOT</jbossws.common.tools.version>
<jbossws.shared.testsuite.version>4.1.0-SNAPSHOT</jbossws.shared.testsuite.version>
<jbossws.jboss710.version>4.1.0-SNAPSHOT</jbossws.jboss710.version>
<jbossws.jboss711.version>4.1.0-SNAPSHOT</jbossws.jboss711.version>
12 years, 3 months
JBossWS SVN: r16730 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:17:23 -0400 (Fri, 14 Sep 2012)
New Revision: 16730
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java
Log:
[JBWS-3510] modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java 2012-09-14 16:16:51 UTC (rev 16729)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java 2012-09-14 16:17:23 UTC (rev 16730)
@@ -51,6 +51,7 @@
private File resourceDir;
private File sourceDir;
private PrintStream messageStream;
+ private String portAddress;
public CXFProviderImpl()
{
@@ -95,6 +96,11 @@
{
this.messageStream = messageStream;
}
+
+ public void setPortSoapAddress(String address)
+ {
+ this.portAddress = address;
+ }
public void provide(String endpointClass)
{
@@ -170,6 +176,10 @@
args.add("-wsdl");
if (extension)
args.add("-soap12");
+ if (portAddress != null) {
+ args.add("-address");
+ args.add(portAddress);
+ }
}
String cp = buildClasspathString(loader);
12 years, 3 months
JBossWS SVN: r16729 - in stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf: deployment and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:16:51 -0400 (Fri, 14 Sep 2012)
New Revision: 16729
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFInstanceProvider.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java
Log:
Minor changes to collections creations
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFInstanceProvider.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFInstanceProvider.java 2012-09-14 16:14:46 UTC (rev 16728)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFInstanceProvider.java 2012-09-14 16:16:51 UTC (rev 16729)
@@ -45,12 +45,13 @@
private static final ResourceBundle bundle = BundleUtils.getBundle(CXFInstanceProvider.class);
private final ServerFactoryBean factory;
- private final Map<String, Reference> cache = new HashMap<String, Reference>();
+ private final Map<String, Reference> cache = new HashMap<String, Reference>(8);
public CXFInstanceProvider(final ServerFactoryBean factory) {
this.factory = factory;
}
+ @SuppressWarnings("rawtypes")
public synchronized Reference getInstance(final String className) {
Reference instance = cache.get(className);
if (instance == null) {
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java 2012-09-14 16:14:46 UTC (rev 16728)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java 2012-09-14 16:16:51 UTC (rev 16729)
@@ -91,9 +91,7 @@
{
if (getProperties() == null)
{
- Map<String, Object> props = new HashMap<String, Object>();
- props.putAll(epConfProps);
- setProperties(props);
+ setProperties(new HashMap<String, Object>(epConfProps));
}
else
{
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java 2012-09-14 16:14:46 UTC (rev 16728)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDBeans.java 2012-09-14 16:16:51 UTC (rev 16729)
@@ -28,6 +28,7 @@
import java.io.Writer;
import java.net.URL;
import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
@@ -44,9 +45,9 @@
// The Required services.
private List<DDEndpoint> endpoints = new ArrayList<DDEndpoint>();
// Optional additional beans.
- private List<DDBean> beans = new ArrayList<DDBean>();
+ private List<DDBean> beans = new LinkedList<DDBean>();
- private List<DDJmsAddressBean> addressBeans = new ArrayList<DDJmsAddressBean>();
+ private List<DDJmsAddressBean> addressBeans = new LinkedList<DDJmsAddressBean>();
// The derived temp file
private File tmpFile;
12 years, 3 months
JBossWS SVN: r16728 - shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:14:46 -0400 (Fri, 14 Sep 2012)
New Revision: 16728
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
Log:
[JBWS-3510] Adding testcase
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2012-09-14 16:14:24 UTC (rev 16727)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2012-09-14 16:14:46 UTC (rev 16728)
@@ -93,10 +93,12 @@
{
provider.setGenerateWsdl(true);
provider.setExtension(true);
+ final String portSoapAddress = "http://www.jboss.org/myEp";
+ provider.setPortSoapAddress(portSoapAddress); //also check portSoapAddress option
File outputDir = new File(outputDirectory.getAbsolutePath() + "-soap12");
provide(outputDir);
- verifyWSDL(outputDir, true);
+ verifyWSDL(outputDir, true, portSoapAddress);
}
/**
@@ -196,10 +198,10 @@
private void verifyWSDL(File directory) throws Exception
{
- this.verifyWSDL(directory, false);
+ this.verifyWSDL(directory, false, null);
}
- private void verifyWSDL(File directory, boolean soap12) throws Exception
+ private void verifyWSDL(File directory, boolean soap12, String portSoapAddress) throws Exception
{
File wsdl = new File(
directory.getAbsolutePath()+
@@ -220,6 +222,12 @@
{
assertEquals("http://schemas.xmlsoap.org/wsdl/soap/", soapBindingElement.getNamespaceURI());
}
+
+ if (portSoapAddress != null) {
+ Element portElement = DOMUtils.getFirstChildElement(serviceElement, "port");
+ Element addressElement = DOMUtils.getFirstChildElement(portElement, "address");
+ assertEquals(portSoapAddress, addressElement.getAttribute("location"));
+ }
}
/**
12 years, 3 months
JBossWS SVN: r16727 - shared-testsuite/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:14:24 -0400 (Fri, 14 Sep 2012)
New Revision: 16727
Modified:
shared-testsuite/trunk/pom.xml
Log:
Moving to latest snapshots
Modified: shared-testsuite/trunk/pom.xml
===================================================================
--- shared-testsuite/trunk/pom.xml 2012-09-14 16:11:31 UTC (rev 16726)
+++ shared-testsuite/trunk/pom.xml 2012-09-14 16:14:24 UTC (rev 16727)
@@ -23,7 +23,7 @@
</scm>
<properties>
- <jbossws.common.version>2.1.0.Beta3</jbossws.common.version>
+ <jbossws.common.version>2.1.0-SNAPSHOT</jbossws.common.version>
<jboss.logging.version>2.0.5.GA</jboss.logging.version>
<junit.version>3.8.2</junit.version>
</properties>
12 years, 3 months
JBossWS SVN: r16726 - in common/trunk/src/main/java/org/jboss/ws/common: deployment and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:11:31 -0400 (Fri, 14 Sep 2012)
New Revision: 16726
Modified:
common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextPropertiesDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultService.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/monitoring/AbstractRecordProcessor.java
common/trunk/src/main/java/org/jboss/ws/common/sort/DeploymentAspectSorter.java
common/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java
Log:
Few minor changes on collections creation
Modified: common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -64,7 +64,7 @@
{
private static final ResourceBundle bundle = BundleUtils.getBundle(ConfigHelper.class);
- private static Map<String, String> bindingIDs = new HashMap<String, String>();
+ private static Map<String, String> bindingIDs = new HashMap<String, String>(8);
static {
bindingIDs.put(SOAPBinding.SOAP11HTTP_BINDING, "##SOAP11_HTTP");
bindingIDs.put(SOAPBinding.SOAP12HTTP_BINDING, "##SOAP12_HTTP");
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -69,12 +69,13 @@
protected LifecycleHandler lifecycleHandler;
protected EndpointMetrics metrics;
protected String address;
- protected List<RecordProcessor> recordProcessors = new Vector<RecordProcessor>();
+ protected List<RecordProcessor> recordProcessors = new Vector<RecordProcessor>(2);
protected SecurityDomainContext securityDomainContext;
protected InstanceProvider instanceProvider;
AbstractDefaultEndpoint(String targetBean)
{
+ super(8, 4);
this.targetBean = targetBean;
this.state = EndpointState.UNDEFINED;
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextPropertiesDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextPropertiesDeploymentAspect.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextPropertiesDeploymentAspect.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.common.deployment;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -43,9 +44,18 @@
return contextProperties;
}
+ /**
+ * This is called once at AS boot time during deployment aspect parsing;
+ * this provided map is copied.
+ *
+ * @param contextProperties
+ */
public void setContextProperties(Map<String, String> contextProperties)
{
- this.contextProperties = contextProperties;
+ if (contextProperties != null) {
+ this.contextProperties = new HashMap<String, String>(4);
+ this.contextProperties.putAll(contextProperties);
+ }
}
@Override
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -52,6 +52,7 @@
DefaultDeployment(String name, ClassLoader classLoader)
{
+ super(8, 4);
simpleName = name;
state = DeploymentState.UNDEFINED;
initialLoader = classLoader;
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultService.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultService.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultService.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -27,7 +27,6 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
@@ -49,6 +48,7 @@
DefaultService()
{
+ super(4, 4);
}
public Deployment getDeployment()
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -39,6 +39,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.HttpEndpoint;
+import org.jboss.wsf.spi.deployment.Service;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
@@ -60,15 +61,16 @@
@Override
public void start(Deployment dep)
{
- String contextRoot = dep.getService().getContextRoot();
+ final Service service = dep.getService();
+ String contextRoot = service.getContextRoot();
if (contextRoot == null)
throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_CONTEXT_ROOT"));
// TODO: remove this hack - review API
- String protocol = (String)dep.getService().getProperty("protocol");
- String host = (String)dep.getService().getProperty("host");
+ String protocol = (String)service.getProperty("protocol");
+ String host = (String)service.getProperty("host");
- PortValue port = new PortValue((Integer)dep.getService().getProperty("port"), null);
+ PortValue port = new PortValue((Integer)service.getProperty("port"), null);
if (protocol == null)
{
@@ -81,7 +83,7 @@
}
Map<String, Endpoint> endpointsMap = new HashMap<String, Endpoint>();
List<Endpoint> deleteList = new LinkedList<Endpoint>();
- for (Endpoint ep : dep.getService().getEndpoints())
+ for (Endpoint ep : service.getEndpoints())
{
if (ep instanceof HttpEndpoint)
{
@@ -116,7 +118,7 @@
//Remove endpoints with duplicated address
for (Endpoint ep : deleteList)
{
- dep.getService().getEndpoints().remove(ep);
+ service.getEndpoints().remove(ep);
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/monitoring/AbstractRecordProcessor.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/monitoring/AbstractRecordProcessor.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/monitoring/AbstractRecordProcessor.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -37,7 +37,7 @@
*/
public abstract class AbstractRecordProcessor implements RecordProcessor
{
- protected List<RecordFilter> filters = new Vector<RecordFilter>();
+ protected List<RecordFilter> filters = new Vector<RecordFilter>(1);
protected boolean processDestinationHost = true;
protected boolean processSourceHost = true;
protected boolean processHeaders = true;
Modified: common/trunk/src/main/java/org/jboss/ws/common/sort/DeploymentAspectSorter.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/sort/DeploymentAspectSorter.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/sort/DeploymentAspectSorter.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -21,6 +21,7 @@
*/
package org.jboss.ws.common.sort;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -98,9 +99,11 @@
{
private Map<String, Dependency> dependencies = new HashMap<String, Dependency>();
private Set<Vertex> vertices = new HashSet<Vertex>();
+ private int size = 0;
public void addVertex(final DeploymentAspect aspect)
{
+ size++;
// create disjunct sets
final Set<String> inputs = new HashSet<String>();
inputs.addAll(aspect.getRequiresAsSet());
@@ -136,7 +139,7 @@
public List<DeploymentAspect> sort()
{
// L ← Empty list that will contain the sorted elements
- List<DeploymentAspect> retVal = new LinkedList<DeploymentAspect>();
+ List<DeploymentAspect> retVal = new ArrayList<DeploymentAspect>(size);
// S ← Set of all nodes with no incoming edges
List<Vertex> roots = this.getRoots();
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java 2012-09-14 16:10:20 UTC (rev 16725)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java 2012-09-14 16:11:31 UTC (rev 16726)
@@ -34,7 +34,7 @@
public class XMLPredefinedEntityReferenceResolver
{
private static final ResourceBundle bundle = BundleUtils.getBundle(XMLPredefinedEntityReferenceResolver.class);
- private static HashMap<String, Character> entities = new HashMap<String, Character>();
+ private static HashMap<String, Character> entities = new HashMap<String, Character>(8);
static
{
12 years, 3 months
JBossWS SVN: r16725 - common/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:10:20 -0400 (Fri, 14 Sep 2012)
New Revision: 16725
Modified:
common/trunk/pom.xml
Log:
Moving to latest jbossws-spi snapshot
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2012-09-14 16:09:19 UTC (rev 16724)
+++ common/trunk/pom.xml 2012-09-14 16:10:20 UTC (rev 16725)
@@ -27,7 +27,7 @@
<!-- Properties -->
<properties>
- <jbossws.spi.version>2.1.0.Beta3</jbossws.spi.version>
+ <jbossws.spi.version>2.1.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-spi.version>2.1.0.GA</jboss-logging-spi.version>
12 years, 3 months
JBossWS SVN: r16724 - in spi/trunk/src/main/java/org/jboss/wsf/spi: metadata/config and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:09:19 -0400 (Fri, 14 Sep 2012)
New Revision: 16724
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesMetaData.java
Log:
Few minor changes on collections creation
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/AbstractExtensible.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -34,10 +34,21 @@
*/
public abstract class AbstractExtensible implements Extensible
{
-
- private Map<Class<?>, Object> attachments = new HashMap<Class<?>, Object>();
- private Map<String, Object> properties = new HashMap<String, Object>();
+ private Map<Class<?>, Object> attachments;
+ private Map<String, Object> properties;
+ public AbstractExtensible()
+ {
+ this.attachments = new HashMap<Class<?>, Object>();
+ this.properties = new HashMap<String, Object>();
+ }
+
+ public AbstractExtensible(int initialAttachmentsSize, int initialPropertiesSize)
+ {
+ this.attachments = new HashMap<Class<?>, Object>(initialAttachmentsSize);
+ this.properties = new HashMap<String, Object>(initialPropertiesSize);
+ }
+
public Collection<Object> getAttachments()
{
return attachments.values();
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/ArchiveDeployment.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -21,8 +21,6 @@
*/
package org.jboss.wsf.spi.deployment;
-import java.io.IOException;
-import java.net.URL;
import java.util.List;
/**
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/AbstractCommonConfig.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -40,8 +40,8 @@
{
private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractCommonConfig.class);
private String configName;
- private Map<String, Feature> features = new HashMap<String, Feature>();
- private Map<String, String> properties = new HashMap<String, String>();
+ private Map<String, Feature> features = new HashMap<String, Feature>(2);
+ private Map<String, String> properties = new HashMap<String, String>(4);
private List<UnifiedHandlerChainMetaData> preHandlerChains;
private List<UnifiedHandlerChainMetaData> postHandlerChains;
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 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.spi.metadata.j2ee;
-import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -34,7 +34,7 @@
public class EJBArchiveMetaData
{
/** ArrayList<BeanMetaData> for the ejbs */
- private List<EJBMetaData> beans = new ArrayList<EJBMetaData>();
+ private List<EJBMetaData> beans = Collections.emptyList();
/** The optional JBossWS config-name */
private String configName;
/** The optional JBossWS config-file */
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainMetaData.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -28,7 +28,7 @@
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-/** The unified metdata data for a handler chain element
+/** The unified metadata data for a handler chain element
*
* @author Thomas.Diesler(a)jboss.org
*/
@@ -37,7 +37,7 @@
private QName serviceNamePattern;
private QName portNamePattern;
private String protocolBindings;
- private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
+ private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>(4);
private boolean excluded;
private String id;
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerChainsMetaData.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -21,20 +21,20 @@
*/
package org.jboss.wsf.spi.metadata.j2ee.serviceref;
-import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
-/** The unified metdata data for a handler chains element
+/** The unified metadata data for a handler chains element
*
* @author Thomas.Diesler(a)jboss.org
*/
public class UnifiedHandlerChainsMetaData extends ServiceRefElement
{
private HandlerType handlerType;
- private List<UnifiedHandlerChainMetaData> handlerChains = new ArrayList<UnifiedHandlerChainMetaData>();
+ private List<UnifiedHandlerChainMetaData> handlerChains = new LinkedList<UnifiedHandlerChainMetaData>();
public UnifiedHandlerChainsMetaData(HandlerType handlerType)
{
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Set;
@@ -31,7 +32,7 @@
import org.jboss.wsf.spi.serviceref.ServiceRefElement;
/**
- * The unified metdata data for a handler element
+ * The unified metadata data for a handler element
*
* @author Thomas.Diesler(a)jboss.org
*/
@@ -49,13 +50,13 @@
// The required <handler-class> element
private String handlerClass;
// The optional <init-param> elements
- private List<UnifiedInitParamMetaData> initParams = new ArrayList<UnifiedInitParamMetaData>();
+ private List<UnifiedInitParamMetaData> initParams = new LinkedList<UnifiedInitParamMetaData>();
// The optional <soap-header> elements
- private Set<QName> soapHeaders = new HashSet<QName>();
+ private Set<QName> soapHeaders = new HashSet<QName>(2);
// The optional <soap-role> elements
- private Set<String> soapRoles = new HashSet<String>();
- // The optional <port-name> elements, these only apply to webserve clients
- private Set<String> portNames = new HashSet<String>();
+ private Set<String> soapRoles = new HashSet<String>(2);
+ // The optional <port-name> elements, these only apply to webservice clients
+ private Set<String> portNames = new HashSet<String>(4);
public UnifiedHandlerMetaData(UnifiedHandlerChainMetaData handlerChain)
{
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -49,9 +49,9 @@
// The optional <port-qname> element
private QName portQName;
// Arbitrary proxy properties given by <call-property>
- private List<UnifiedCallPropertyMetaData> callProperties = new ArrayList<UnifiedCallPropertyMetaData>();
+ private List<UnifiedCallPropertyMetaData> callProperties = new ArrayList<UnifiedCallPropertyMetaData>(2);
// Arbitrary proxy properties given by <stub-property>
- private List<UnifiedStubPropertyMetaData> stubProperties = new ArrayList<UnifiedStubPropertyMetaData>();
+ private List<UnifiedStubPropertyMetaData> stubProperties = new ArrayList<UnifiedStubPropertyMetaData>(2);
// The optional JBossWS config-name
private String configName;
// The optional JBossWS config-file
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -83,9 +83,9 @@
// The optional <service-qname> element
private QName serviceQName;
// The list <port-component-ref> elements
- private List<UnifiedPortComponentRefMetaData> portComponentRefs = new ArrayList<UnifiedPortComponentRefMetaData>();
+ private List<UnifiedPortComponentRefMetaData> portComponentRefs = new ArrayList<UnifiedPortComponentRefMetaData>(4);
// The optional <handler> elements. JAX-RPC handlers declared in the standard J2EE1.4 descriptor
- private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
+ private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>(4);
// The optional <handler-chains> elements. JAX-WS handlers declared in the standard JavaEE5 descriptor
private UnifiedHandlerChainsMetaData handlerChains;
@@ -100,7 +100,7 @@
// The optional <handler-chain> element. JAX-WS handler chain declared in the JBoss JavaEE5 descriptor
private String handlerChain;
// Arbitrary proxy properties given by <call-property>
- private List<UnifiedCallPropertyMetaData> callProperties = new ArrayList<UnifiedCallPropertyMetaData>();
+ private List<UnifiedCallPropertyMetaData> callProperties = new ArrayList<UnifiedCallPropertyMetaData>(2);
// @Addressing annotation metadata
private boolean isAddressingAnnotationSpecified;
private boolean addressingEnabled;
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -70,7 +70,7 @@
private String ejbLink;
private String servletLink;
// The optional <handler> elements
- private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>();
+ private List<UnifiedHandlerMetaData> handlers = new ArrayList<UnifiedHandlerMetaData>(2);
// The HTTP context root
private String contextRoot;
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesMetaData.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesMetaData.java 2012-09-14 16:07:09 UTC (rev 16723)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesMetaData.java 2012-09-14 16:09:19 UTC (rev 16724)
@@ -33,7 +33,7 @@
public class WebservicesMetaData
{
// The required <webservice-description> elements
- private ArrayList<WebserviceDescriptionMetaData> webserviceDescriptions = new ArrayList<WebserviceDescriptionMetaData>();
+ private ArrayList<WebserviceDescriptionMetaData> webserviceDescriptions = new ArrayList<WebserviceDescriptionMetaData>(2);
// The URL to the webservices.xml descriptor
private URL descriptorURL;
12 years, 3 months
JBossWS SVN: r16723 - in common-tools/trunk/src: main/java/org/jboss/ws/tools/cmd and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-09-14 12:07:09 -0400 (Fri, 14 Sep 2012)
New Revision: 16723
Modified:
common-tools/trunk/src/main/java/org/jboss/ws/tools/ant/WSProvideTask.java
common-tools/trunk/src/main/java/org/jboss/ws/tools/cmd/WSProvide.java
common-tools/trunk/src/test/java/org/jboss/test/ws/tools/CmdProvideTracker.java
Log:
[JBWS-3510] Add WSProvide option for specifying soap:address location to use in generated wsdl
Modified: common-tools/trunk/src/main/java/org/jboss/ws/tools/ant/WSProvideTask.java
===================================================================
--- common-tools/trunk/src/main/java/org/jboss/ws/tools/ant/WSProvideTask.java 2012-09-14 16:06:46 UTC (rev 16722)
+++ common-tools/trunk/src/main/java/org/jboss/ws/tools/ant/WSProvideTask.java 2012-09-14 16:07:09 UTC (rev 16723)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -32,7 +32,6 @@
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.types.CommandlineJava.SysProperties;
-import org.apache.tools.ant.types.Environment.Variable;
import org.jboss.ws.api.tools.WSContractProvider;
import java.io.File;
@@ -55,6 +54,7 @@
* <tr><td>resourcedestdir</td><td>The output directory for resource artifacts (WSDL/XSD).</td><td>value of destdir</td></tr>
* <tr><td>sourcedestdir</td><td>The output directory for Java source.</td><td>value of destdir</td></tr>
* <tr><td>genwsdl</td><td>Whether or not to generate WSDL.</td><td>false</td><tr>
+ * <tr><td>address</td><td>The generated port soap:address in wsdl.</td><td></td><tr>
* <tr><td>extension</td><td>Enable SOAP 1.2 binding extension.</td><td>false</td></tr>
* <tr><td>verbose</td><td>Enables more informational output about cmd progress.</td><td>false</td><tr>
* <tr><td>sei</td><td>Service Endpoint Implementation.</td><td></td><tr>
@@ -88,6 +88,7 @@
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:alessio.soldano@jboss.com">Alessio Soldano</a>
*/
public class WSProvideTask extends Task
{
@@ -103,6 +104,7 @@
private boolean verbose;
private boolean fork;
private boolean debug;
+ private String portSoapAddress;
// Not actually used right now
public void setDebug(boolean debug)
@@ -183,6 +185,11 @@
this.genwsdl = genwsdl;
}
+ public void setPortSoapAddress(String portSoapAddress)
+ {
+ this.portSoapAddress = portSoapAddress;
+ }
+
private ClassLoader getClasspathLoader(ClassLoader parent)
{
AntClassLoader antLoader = new AntClassLoader(parent, getProject(), classpath, false);
@@ -228,6 +235,7 @@
gen.setGenerateSource(keep);
gen.setGenerateWsdl(genwsdl);
gen.setExtension(extension);
+ gen.setPortSoapAddress(portSoapAddress);
if (destdir != null)
gen.setOutputDirectory(destdir);
@@ -287,6 +295,11 @@
if (genwsdl)
command.createArgument().setValue("-w");
+ if (portSoapAddress != null) {
+ command.createArgument().setValue("-a");
+ command.createArgument().setValue(portSoapAddress);
+ }
+
if (extension)
command.createArgument().setValue("-e");
Modified: common-tools/trunk/src/main/java/org/jboss/ws/tools/cmd/WSProvide.java
===================================================================
--- common-tools/trunk/src/main/java/org/jboss/ws/tools/cmd/WSProvide.java 2012-09-14 16:06:46 UTC (rev 16722)
+++ common-tools/trunk/src/main/java/org/jboss/ws/tools/cmd/WSProvide.java 2012-09-14 16:07:09 UTC (rev 16723)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, 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.
*
@@ -52,6 +52,7 @@
* <tr><td>-o, --output=<directory> </td><td>The directory to put generated artifacts</td></tr>
* <tr><td>-r, --resource=<directory></td><td>The directory to put resource artifacts</td></tr>
* <tr><td>-s, --source=<directory> </td><td>The directory to put Java source</td></tr>
+ * <tr><td>-a, --address=<address> </td><td>The generated port soap:address in wsdl</td></tr>
* <tr><td>-q, --quiet </td><td>Be somewhat more quiet</td></tr>
* <tr><td>-t, --show-traces </td><td>Show full exception stack traces</td></tr>
* <tr><td>-l, --load-provider </td><td>Load the provider and exit (debug utility)</td></tr>
@@ -60,6 +61,7 @@
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:alessio.soldano@jboss.com">Alessio Soldano</a>
*/
public class WSProvide
{
@@ -73,6 +75,7 @@
private boolean loadProvider;
private File resourceDir;
private File sourceDir;
+ private String portSoapAddress;
public static final String PROGRAM_NAME = SecurityActions.getSystemProperty("program.name", WSProvide.class.getSimpleName());
@@ -85,7 +88,7 @@
private String parseArguments(String[] args)
{
- String shortOpts = "hwko:r:s:c:qtle";
+ String shortOpts = "hwko:r:s:a:c:qtle";
LongOpt[] longOpts =
{
new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
@@ -94,6 +97,7 @@
new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
+ new LongOpt("address", LongOpt.REQUIRED_ARGUMENT, null, 'a'),
new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
@@ -131,6 +135,9 @@
case 'c':
processClassPath(getopt.getOptarg());
break;
+ case 'a':
+ portSoapAddress = getopt.getOptarg();
+ break;
case 'l':
loadProvider = true;
break;
@@ -182,6 +189,7 @@
gen.setGenerateSource(generateSource);
gen.setOutputDirectory(outputDir);
gen.setExtension(extension);
+ gen.setPortSoapAddress(portSoapAddress);
if (resourceDir != null)
gen.setResourceDirectory(resourceDir);
if (sourceDir != null)
@@ -254,6 +262,7 @@
out.println(" -h, --help Show this help message");
out.println(" -k, --keep Keep/Generate Java source");
out.println(" -w, --wsdl Enable WSDL file generation");
+ out.println(" -a, --address=<address> The generated port soap:address in wsdl");
out.println(" -c, --classpath=<path> The classpath that contains the endpoint");
out.println(" -o, --output=<directory> The directory to put generated artifacts");
out.println(" -r, --resource=<directory> The directory to put resource artifacts");
Modified: common-tools/trunk/src/test/java/org/jboss/test/ws/tools/CmdProvideTracker.java
===================================================================
--- common-tools/trunk/src/test/java/org/jboss/test/ws/tools/CmdProvideTracker.java 2012-09-14 16:06:46 UTC (rev 16722)
+++ common-tools/trunk/src/test/java/org/jboss/test/ws/tools/CmdProvideTracker.java 2012-09-14 16:07:09 UTC (rev 16723)
@@ -83,4 +83,9 @@
{
LAST_EVENT += "setMessageStream";
}
+
+ public void setPortSoapAddress(String address)
+ {
+ LAST_EVENT += "setPortSoapAddress";
+ }
}
12 years, 3 months