JBossWS SVN: r12171 - stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-06 04:30:54 -0400 (Thu, 06 May 2010)
New Revision: 12171
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java
Log:
[JBPAPP-3999] Implement support for SOAP12 in wsprovide (svn merge -r 11159:11160 https://svn.jboss.org/repos/jbossws/stack/cxf/trunk)
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java 2010-05-06 06:13:47 UTC (rev 12170)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFProviderImpl.java 2010-05-06 08:30:54 UTC (rev 12171)
@@ -41,11 +41,12 @@
public class CXFProviderImpl extends WSContractProvider
{
private ClassLoader loader;
- private boolean generateWsdl = false;
- private boolean generateSource = false;
+ private boolean generateWsdl;
+ private boolean extension;
+ private boolean generateSource;
private File outputDir = new File("output");
- private File resourceDir = null;
- private File sourceDir = null;
+ private File resourceDir;
+ private File sourceDir;
private PrintStream messageStream;
public CXFProviderImpl()
@@ -57,6 +58,11 @@
this.generateWsdl = generateWsdl;
}
+ public void setExtension(boolean extension)
+ {
+ this.extension = extension;
+ }
+
public void setGenerateSource(boolean generateSource)
{
this.generateSource = generateSource;
@@ -154,9 +160,12 @@
stream = NullPrintStream.getInstance();
}
+ // -wsdl[:protocol]
if (generateWsdl)
{
args.add("-wsdl");
+ if (extension)
+ args.add("-soap12");
}
String cp = buildClasspathString(loader);
14 years, 7 months
JBossWS SVN: r12170 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-06 02:13:47 -0400 (Thu, 06 May 2010)
New Revision: 12170
Removed:
stack/cxf/branches/jbossws-cxf-3.1.2.SP3/
Log:
Removing unused branch
14 years, 7 months
JBossWS SVN: r12169 - stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-05 14:27:39 -0400 (Wed, 05 May 2010)
New Revision: 12169
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-tp-installer.xml
Log:
[JBPAPP-3267] Re-enabling libraries previously commented in assembly-deploy-artifacts.xml to get a correct installation throught 'ant deploy-jboss510' and adding corresponding excludes to assembly-tp-installer.xml for preventing the uncommented libs to go into tp installer.
Testsuite passing.
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-deploy-artifacts.xml 2010-05-05 17:01:02 UTC (rev 12168)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-deploy-artifacts.xml 2010-05-05 18:27:39 UTC (rev 12169)
@@ -39,16 +39,16 @@
<include>org.springframework:spring-beans:jar</include>
<include>org.springframework:spring-context:jar</include>
<include>org.springframework:spring-core:jar</include>
- <!-- <include>xml-resolver:xml-resolver:jar</include> -->
+ <include>xml-resolver:xml-resolver:jar</include>
<include>org.apache.ws.commons.schema:XmlSchema:jar</include>
<include>org.apache.ws.security:wss4j:jar</include>
- <!-- <include>asm:asm:jar</include> -->
+ <include>org.objectweb.asm:asm:jar</include>
<include>apache-velocity:velocity:jar</include>
- <!-- <include>commons-collections:commons-collections:jar</include> -->
+ <include>commons-collections:commons-collections:jar</include>
<include>commons-lang:commons-lang:jar</include>
- <!-- <include>com.sun.xml.fastinfoset:FastInfoset:jar</include> -->
- <!-- <include>org.apache.santuario:xmlsec:jar</include> -->
- <!-- <include>wsdl4j:wsdl4j:jar</include> -->
+ <include>sun-fi:FastInfoset:jar</include>
+ <include>org.apache:xmlsec:jar</include>
+ <include>wsdl4j:wsdl4j:jar</include>
</includes>
</dependencySet>
<dependencySet>
@@ -93,10 +93,9 @@
<unpack>false</unpack>
<includes>
<include>org.jboss.ws:jbossws-framework:jar</include>
- <!-- Do not include juddi-service as it has not changed
<include>org.jboss.jaxr:juddi-service:sar</include>
<include>apache-scout:scout:jar</include>
- <include>juddi:juddi:jar</include> -->
+ <include>juddi:juddi:jar</include>
</includes>
</dependencySet>
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-tp-installer.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-tp-installer.xml 2010-05-05 17:01:02 UTC (rev 12168)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/src/main/scripts/assembly-tp-installer.xml 2010-05-05 18:27:39 UTC (rev 12169)
@@ -57,6 +57,18 @@
<exclude>**/mail.jar</exclude>
<exclude>**/stax-api.jar</exclude>
<exclude>**/wstx.jar</exclude>
+ <exclude>**/lib/jbossws-spi.jar</exclude>
+ <exclude>**/lib/jbossws-common.jar</exclude>
+ <exclude>**/lib/jbossws-framework.jar</exclude>
+ <exclude>**/lib/xml-resolver.jar</exclude>
+ <exclude>**/lib/asm.jar</exclude>
+ <exclude>**/lib/commons-collections.jar</exclude>
+ <exclude>**/lib/FastInfoset.jar</exclude>
+ <exclude>**/lib/xmlsec.jar</exclude>
+ <exclude>**/lib/wsdl4j.jar</exclude>
+ <exclude>**/lib/juddi-service.sar</exclude>
+ <exclude>**/lib/scout.jar</exclude>
+ <exclude>**/lib/juddi.jar</exclude>
</excludes>
</fileSet>
</fileSets>
14 years, 7 months
JBossWS SVN: r12168 - stack/cxf/branches/jbossws-cxf-3.1.2.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-05 13:01:02 -0400 (Wed, 05 May 2010)
New Revision: 12168
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml
Log:
[JBPAPP-4162] Moving to jbossws-parent 1.0.6.GA
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml 2010-05-05 13:14:29 UTC (rev 12167)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/pom.xml 2010-05-05 17:01:02 UTC (rev 12168)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-parent</artifactId>
- <version>1.0.2.GA</version>
+ <version>1.0.6.GA</version>
</parent>
<!-- Source Control Management -->
14 years, 7 months
JBossWS SVN: r12167 - stack/native/branches/jbossws-native-2.0.1.SP2_CP.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-05 09:14:29 -0400 (Wed, 05 May 2010)
New Revision: 12167
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
Log:
[JBPAPP-4161] synchronizing juddi service with version in EAP 43
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2010-05-05 13:07:18 UTC (rev 12166)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2010-05-05 13:14:29 UTC (rev 12167)
@@ -61,7 +61,7 @@
jboss-common-logging-log4j=2.0.2.GA
jboss-common-logging-spi=2.0.2.GA
jboss-ejb3=1.0.0.CR9-jboss4.0.5
-jboss-jaxr=1.2.0.SP1
+jboss-jaxr=1.2.0.SP2-brew
jboss-microcontainer=2.0.0.Beta3
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
14 years, 7 months
JBossWS SVN: r12166 - legacy/branches/jbossws-1.2.1.GA_CP/build.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-05-05 09:07:18 -0400 (Wed, 05 May 2010)
New Revision: 12166
Modified:
legacy/branches/jbossws-1.2.1.GA_CP/build/version.properties
Log:
[JBPAPP-4161] synchronizing juddi service with version in EAP 42
Modified: legacy/branches/jbossws-1.2.1.GA_CP/build/version.properties
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/build/version.properties 2010-05-05 11:23:30 UTC (rev 12165)
+++ legacy/branches/jbossws-1.2.1.GA_CP/build/version.properties 2010-05-05 13:07:18 UTC (rev 12166)
@@ -60,7 +60,7 @@
jboss-common-logging-log4j=2.0.2.GA
jboss-common-logging-spi=2.0.2.GA
jboss-ejb3=1.0.0.CR9-jboss4.0.5
-jboss-jaxr=1.2.0.GA
+jboss-jaxr=1.2.0.SP2-brew
jboss-jbossretro=1.0.4.GA
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
14 years, 7 months
JBossWS SVN: r12165 - in framework/trunk/testsuite/test: resources/jaxws/samples/webserviceref/META-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-05 07:23:30 -0400 (Wed, 05 May 2010)
New Revision: 12165
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java
framework/trunk/testsuite/test/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
Log:
[JBWS-3015] Testcase erroneously not committed before
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java 2010-05-05 09:36:52 UTC (rev 12164)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java 2010-05-05 11:23:30 UTC (rev 12165)
@@ -73,6 +73,10 @@
}
private EndpointService service6;
+ //Test on field without name and no wsdl override in descriptor
+ @WebServiceRef
+ public EndpointService service7;
+
// Test on field with name and value
@WebServiceRef(name = "Port2", value = EndpointService.class)
public Endpoint port2;
@@ -122,6 +126,8 @@
ports.add(((EndpointService)initCtx.lookup(envRoot + "/env/EndpointService5")).getEndpointPort());
ports.add((Endpoint)service6.getPort(Endpoint.class));
ports.add(((EndpointService)initCtx.lookup(envRoot + "/env/" + getClass().getName() + "/service6")).getEndpointPort());
+ ports.add((Endpoint)service7.getPort(Endpoint.class));
+ ports.add(((EndpointService)initCtx.lookup(envRoot + "/env/" + getClass().getName() + "/service7")).getEndpointPort());
ports.add((Endpoint)initCtx.lookup(envRoot + "/env/port1"));
ports.add(port2);
ports.add((Endpoint)initCtx.lookup(envRoot + "/env/Port2"));
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java 2010-05-05 09:36:52 UTC (rev 12164)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java 2010-05-05 11:23:30 UTC (rev 12165)
@@ -21,55 +21,88 @@
*/
package org.jboss.test.ws.jaxws.samples.webserviceref;
-import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
/**
- * This class was generated by the JAXWS SI.
- * JAX-WS RI 2.0-b26-ea3
- * Generated source version: 2.0
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.2
*
*/
-@WebServiceClient(name = "EndpointService", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "file://bogus-location/jaxws-samples-webserviceref?wsdl")
-public class EndpointService
- extends Service
+@WebServiceClient(name = "EndpointService", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "META-INF/wsdl/Endpoint.wsdl")
+public class EndpointService extends Service
{
- private final static URL WSDL_LOCATION;
- private final static QName TESTENDPOINTSERVICE = new QName("http://org.jboss.ws/wsref", "EndpointService");
- private final static QName TESTENDPOINTPORT = new QName("http://org.jboss.ws/wsref", "EndpointPort");
+ private final static URL ENDPOINTSERVICE_WSDL_LOCATION;
+ private final static WebServiceException ENDPOINTSERVICE_EXCEPTION;
+ private final static QName ENDPOINTSERVICE_QNAME = new QName("http://org.jboss.ws/wsref", "EndpointService");
- static {
- URL url = null;
- try {
- url = new URL("file://bogus-location/jaxws-samples-webserviceref?wsdl");
- } catch (MalformedURLException e) {
- e.printStackTrace();
- }
- WSDL_LOCATION = url;
- }
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ url = EndpointService.class.getResource("bogusAddress"); //invalid address on purpose, to test JBWS-3015 via service7 in EJB3Client
+ if (url == null)
+ {
+ e = new WebServiceException("Cannot find wsdl, please put in classpath");
+ }
+ ENDPOINTSERVICE_WSDL_LOCATION = url;
+ ENDPOINTSERVICE_EXCEPTION = e;
+ }
- public EndpointService(URL wsdlLocation, QName serviceName) {
- super(wsdlLocation, serviceName);
- }
+ public EndpointService()
+ {
+ super(__getWsdlLocation(), ENDPOINTSERVICE_QNAME);
+ }
- public EndpointService() {
- super(WSDL_LOCATION, TESTENDPOINTSERVICE);
- }
+ public EndpointService(URL wsdlLocation)
+ {
+ super(wsdlLocation, ENDPOINTSERVICE_QNAME);
+ }
- /**
- *
- * @return
- * returns Endpoint
- */
- @WebEndpoint(name = "EndpointPort")
- public Endpoint getEndpointPort() {
- return (Endpoint)super.getPort(TESTENDPOINTPORT, Endpoint.class);
- }
+ public EndpointService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+ /**
+ *
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort()
+ {
+ return super.getPort(new QName("http://org.jboss.ws/wsref", "EndpointPort"), Endpoint.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://org.jboss.ws/wsref", "EndpointPort"), Endpoint.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (ENDPOINTSERVICE_EXCEPTION != null)
+ {
+ throw ENDPOINTSERVICE_EXCEPTION;
+ }
+ return ENDPOINTSERVICE_WSDL_LOCATION;
+ }
+
}
Modified: framework/trunk/testsuite/test/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/samples/webserviceref/META-INF/jboss.xml 2010-05-05 09:36:52 UTC (rev 12164)
+++ framework/trunk/testsuite/test/resources/jaxws/samples/webserviceref/META-INF/jboss.xml 2010-05-05 11:23:30 UTC (rev 12165)
@@ -90,6 +90,13 @@
<service-qname>{http://org.jboss.ws/wsref}EndpointService</service-qname>
<wsdl-override>META-INF/wsdl/Endpoint.wsdl</wsdl-override>
</service-ref>
+
+ <!--
+ @WebServiceRef
+ -->
+ <service-ref>
+ <service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.EJB3Client/service7</service-ref-name>
+ </service-ref>
</session>
</enterprise-beans>
14 years, 7 months
JBossWS SVN: r12164 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-05 05:36:52 -0400 (Wed, 05 May 2010)
New Revision: 12164
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-3018] Update pom.xml for using CXF 2.2.7
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2010-05-05 09:35:29 UTC (rev 12163)
+++ stack/cxf/trunk/pom.xml 2010-05-05 09:36:52 UTC (rev 12164)
@@ -56,7 +56,7 @@
<jbossws.jboss601.version>3.2.1.GA</jbossws.jboss601.version>
-->
<!-- END -->
- <cxf.version>2.2.6</cxf.version>
+ <cxf.version>2.2.7</cxf.version>
<cxf.stax.version>1.0.1</cxf.stax.version>
<cxf.asm.version>2.2.3</cxf.asm.version>
<fastinfoset.api.version>1.2.7</fastinfoset.api.version>
14 years, 7 months
JBossWS SVN: r12163 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-05 05:35:29 -0400 (Wed, 05 May 2010)
New Revision: 12163
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
Log:
[JBWS-3017] Set default HTTPConduit
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2010-05-05 06:35:09 UTC (rev 12162)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2010-05-05 09:35:29 UTC (rev 12163)
@@ -22,11 +22,13 @@
package org.jboss.wsf.stack.cxf.client.configuration;
import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.databinding.DataBinding;
import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
import org.apache.cxf.frontend.ClientProxyFactoryBean;
import org.apache.cxf.jaxb.JAXBDataBinding;
import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
+import org.apache.cxf.transport.http.HTTPConduit;
import org.jboss.wsf.spi.binding.BindingCustomization;
import org.jboss.wsf.spi.binding.JAXBBindingCustomization;
@@ -62,6 +64,10 @@
{
configureClientProxyFactoryBean((ClientProxyFactoryBean)beanInstance);
}
+ else if (beanInstance instanceof HTTPConduit)
+ {
+ configureHTTPConduit((HTTPConduit)beanInstance);
+ }
//add other beans configuration here below
}
@@ -125,6 +131,27 @@
//add other configurations here below
}
+ /**
+ * Configure the HTTPConduit; currently allows for setting disableCNcheck in TLS client parameters according
+ * to the JBoss' org.jboss.security.ignoreHttpsHost system property.
+ *
+ * @param conduit
+ */
+ protected synchronized void configureHTTPConduit(HTTPConduit conduit)
+ {
+ TLSClientParameters parameters = conduit.getTlsClientParameters();
+ if (parameters == null) //don't do anything when user already provided a configuration
+ {
+ parameters = new TLSClientParameters();
+ parameters.setUseHttpsURLConnectionDefaultSslSocketFactory(true);
+ if (Boolean.getBoolean("org.jboss.security.ignoreHttpsHost"))
+ {
+ parameters.setDisableCNCheck(true);
+ }
+ conduit.setTlsClientParameters(parameters);
+ }
+ }
+
@SuppressWarnings("unchecked")
protected static void setBindingCustomization(DataBinding db, BindingCustomization customization)
{
14 years, 7 months
JBossWS SVN: r12162 - in stack/cxf/trunk/modules: client/src/main/resources/META-INF/cxf and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-05-05 02:35:09 -0400 (Wed, 05 May 2010)
New Revision: 12162
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/cxf-extension-jbossws.xml
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
Log:
[JBWS-3016] Install JBossWSCXFConfigurer by default on client side too
Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java 2010-05-05 06:35:09 UTC (rev 12162)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.configuration;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.configuration.Configurer;
+
+
+/**
+ * A simple bean created through cxf-extension-jbossws.xml in order to
+ * install the JBossWS configurer.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 04-May-2010
+ */
+public class ConfigurerInstaller
+{
+ private Bus bus;
+
+ public ConfigurerInstaller()
+ {
+ //NOOP
+ }
+
+ public Bus getBus()
+ {
+ return bus;
+ }
+
+ public void setBus(Bus bus)
+ {
+ this.bus = bus;
+ updateConfigurer();
+ }
+
+ protected void updateConfigurer()
+ {
+ bus.setExtension(new JBossWSCXFConfigurer(bus.getExtension(Configurer.class)), Configurer.class);
+ }
+}
Property changes on: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/ConfigurerInstaller.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java 2010-05-05 06:35:09 UTC (rev 12162)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.client.configuration;
+
+import org.apache.cxf.configuration.Configurer;
+
+/**
+ * A CXF configurer that allows for custom configuration before delegating to another configurer;
+ * this is installed by JBossWS' {@see org.jboss.wsf.stack.cxf.client.configuration.ConfigurerInstaller}
+ * (see cxf-extension-jbossws.xml) to allow for custom client side configuration while leaving
+ * Apache CXF the freedom of setting the initial configurer.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 04-May-2010
+ */
+public abstract class DelegatingConfigurer implements Configurer
+{
+ protected Configurer delegate;
+
+ public DelegatingConfigurer(Configurer delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public void configureBean(Object beanInstance)
+ {
+ internalConfigure(beanInstance);
+ if (delegate != null)
+ {
+ delegate.configureBean(beanInstance);
+ }
+ }
+
+ @Override
+ public void configureBean(String name, Object beanInstance)
+ {
+ internalConfigure(beanInstance);
+ if (delegate != null)
+ {
+ delegate.configureBean(name, beanInstance);
+ }
+ }
+
+ /**
+ * Performs custom configurations on the provided bean instance
+ * before delegating to the other configurer.
+ *
+ * @param beanInstance
+ */
+ protected abstract void internalConfigure(Object beanInstance);
+
+}
Property changes on: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/DelegatingConfigurer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2010-05-05 04:31:58 UTC (rev 12161)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/JBossWSCXFConfigurer.java 2010-05-05 06:35:09 UTC (rev 12162)
@@ -36,42 +36,22 @@
* @author alessio.soldano(a)jboss.com
* @since 05-Oct-2009
*/
-public class JBossWSCXFConfigurer implements Configurer
+public class JBossWSCXFConfigurer extends DelegatingConfigurer
{
protected BindingCustomization customization;
- private Configurer delegate;
public JBossWSCXFConfigurer(Configurer delegate)
{
- this.delegate = delegate;
+ super(delegate);
}
public JBossWSCXFConfigurer(Configurer delegate, BindingCustomization customization)
{
- this(delegate);
+ super(delegate);
this.customization = customization;
}
@Override
- public void configureBean(Object beanInstance)
- {
- internalConfigure(beanInstance);
- if (delegate != null)
- {
- delegate.configureBean(beanInstance);
- }
- }
-
- @Override
- public void configureBean(String name, Object beanInstance)
- {
- internalConfigure(beanInstance);
- if (delegate != null)
- {
- delegate.configureBean(name, beanInstance);
- }
- }
-
protected void internalConfigure(Object beanInstance)
{
if (beanInstance instanceof AbstractWSDLBasedEndpointFactory)
@@ -92,6 +72,26 @@
*/
protected synchronized void configureEndpointFactory(AbstractWSDLBasedEndpointFactory factory)
{
+ //Configure binding customization
+ if (customization != null)
+ {
+ ReflectionServiceFactoryBean serviceFactory = factory.getServiceFactory();
+ //customize default databinding (early pulls in ServiceFactory default databinding and configure it, as it's lazily loaded)
+ serviceFactory.reset();
+ DataBinding serviceFactoryDataBinding = serviceFactory.getDataBinding(true);
+ setBindingCustomization(serviceFactoryDataBinding, customization);
+ serviceFactory.setDataBinding(serviceFactoryDataBinding);
+ //customize user provided databinding (CXF later overrides the ServiceFactory databinding using the user provided one)
+ if (factory.getDataBinding() == null)
+ {
+ //set the endpoint factory's databinding to prevent CXF resetting everything because user did not provide anything
+ factory.setDataBinding(serviceFactoryDataBinding);
+ }
+ else
+ {
+ setBindingCustomization(factory.getDataBinding(), customization);
+ }
+ }
//add other configurations here below
}
Modified: stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/cxf-extension-jbossws.xml
===================================================================
--- stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/cxf-extension-jbossws.xml 2010-05-05 04:31:58 UTC (rev 12161)
+++ stack/cxf/trunk/modules/client/src/main/resources/META-INF/cxf/cxf-extension-jbossws.xml 2010-05-05 06:35:09 UTC (rev 12162)
@@ -1,6 +1,10 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/core"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+ <bean id="clientConfigurerInstaller" class="org.jboss.wsf.stack.cxf.client.configuration.ConfigurerInstaller">
+ <property name="bus" ref="cxf"/>
+ </bean>
+
<!--
<bean id="logInbound" class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
<bean id="logOutbound" class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2010-05-05 04:31:58 UTC (rev 12161)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2010-05-05 06:35:09 UTC (rev 12162)
@@ -49,7 +49,7 @@
import org.springframework.core.io.InputStreamResource;
/**
- * An wrapper of the Bus for performing most of the configurations required on it by JBossWS
+ * A wrapper of the Bus for performing most of the configurations required on it by JBossWS
*
* @author alessio.soldano(a)jboss.com
* @since 25-Mar-2010
@@ -110,7 +110,7 @@
* @param configurer The JBossWSCXFConfigurer to install in the bus, if any
* @throws IOException Throws IOException if the jboss-cxf.xml file can't be read
*/
- public void configure(URL jbossCxfXml, SoapTransportFactory soapTransportFactory, ResourceResolver resolver, JBossWSCXFConfigurer configurer) throws IOException
+ public void configure(URL jbossCxfXml, SoapTransportFactory soapTransportFactory, ResourceResolver resolver, Configurer configurer) throws IOException
{
if (configured)
{
@@ -130,17 +130,19 @@
}
/**
- * A convenient method for getting a jbossws cxf configurer delegating to the cxf configurer
- * that's currently installed in the hold bus.
+ * A convenient method for getting a jbossws cxf server configurer delegating to the
+ * cxf configurer that's currently installed in the hold bus.
*
* @param customization The binding customization to set in the configurer, if any
* @param wsdlPublisher The wsdl file publisher to set in the configurer, if any
* @return The new jbossws cxf configurer
*/
- public JBossWSCXFConfigurer createConfigurer(BindingCustomization customization, WSDLFilePublisher wsdlPublisher)
+ public Configurer createServerConfigurer(BindingCustomization customization, WSDLFilePublisher wsdlPublisher)
{
- Configurer delegate = bus.getExtension(Configurer.class);
- return new JBossWSServerCXFConfigurer(delegate, customization, wsdlPublisher);
+ //the JBossWSCXFConfigurer should already be set through cxf-extensions-jbossws.xml
+ JBossWSCXFConfigurer delegate = (JBossWSCXFConfigurer)bus.getExtension(Configurer.class);
+ delegate.setBindingCustomization(customization);
+ return new JBossWSServerCXFConfigurer(delegate, wsdlPublisher);
}
/**
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-05-05 04:31:58 UTC (rev 12161)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/JBossWSServerCXFConfigurer.java 2010-05-05 06:35:09 UTC (rev 12162)
@@ -22,21 +22,17 @@
package org.jboss.wsf.stack.cxf.configuration;
import org.apache.cxf.configuration.Configurer;
-import org.apache.cxf.databinding.DataBinding;
-import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
-import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
-import org.jboss.wsf.spi.binding.BindingCustomization;
-import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
+import org.jboss.wsf.stack.cxf.client.configuration.DelegatingConfigurer;
import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
/**
- * A JBossWSCXFConfigured to be used on server side
+ * A JBossWS CXF Configurer to be used on server side
*
* @author alessio.soldano(a)jboss.com
* @since 31-Mar-2010
*/
-public class JBossWSServerCXFConfigurer extends JBossWSCXFConfigurer
+public class JBossWSServerCXFConfigurer extends DelegatingConfigurer
{
private WSDLFilePublisher wsdlPublisher;
@@ -45,48 +41,21 @@
super(delegate);
}
- public JBossWSServerCXFConfigurer(Configurer delegate, BindingCustomization customization, WSDLFilePublisher wsdlPublisher)
+ public JBossWSServerCXFConfigurer(Configurer delegate, WSDLFilePublisher wsdlPublisher)
{
- super(delegate, customization);
+ super(delegate);
this.wsdlPublisher = wsdlPublisher;
}
@Override
protected void internalConfigure(Object beanInstance)
{
- super.internalConfigure(beanInstance);
if (beanInstance instanceof EndpointImpl)
{
configureEndpoint((EndpointImpl)beanInstance);
}
}
- @Override
- protected synchronized void configureEndpointFactory(AbstractWSDLBasedEndpointFactory factory)
- {
- //Configure binding customization
- if (customization != null)
- {
- ReflectionServiceFactoryBean serviceFactory = factory.getServiceFactory();
- //customize default databinding (early pulls in ServiceFactory default databinding and configure it, as it's lazily loaded)
- serviceFactory.reset();
- DataBinding serviceFactoryDataBinding = serviceFactory.getDataBinding(true);
- setBindingCustomization(serviceFactoryDataBinding, customization);
- serviceFactory.setDataBinding(serviceFactoryDataBinding);
- //customize user provided databinding (CXF later overrides the ServiceFactory databinding using the user provided one)
- if (factory.getDataBinding() == null)
- {
- //set the endpoint factory's databinding to prevent CXF resetting everything because user did not provide anything
- factory.setDataBinding(serviceFactoryDataBinding);
- }
- else
- {
- setBindingCustomization(factory.getDataBinding(), customization);
- }
- }
- //add other configurations here below
- }
-
protected synchronized void configureEndpoint(EndpointImpl endpoint)
{
//Configure wsdl file publisher
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2010-05-05 04:31:58 UTC (rev 12161)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2010-05-05 06:35:09 UTC (rev 12162)
@@ -26,6 +26,7 @@
import java.util.Map;
import org.apache.cxf.BusFactory;
+import org.apache.cxf.configuration.Configurer;
import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.common.integration.WSConstants;
import org.jboss.wsf.spi.binding.BindingCustomization;
@@ -33,7 +34,6 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.ResourceResolver;
-import org.jboss.wsf.stack.cxf.client.configuration.JBossWSCXFConfigurer;
import org.jboss.wsf.stack.cxf.configuration.BusHolder;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
import org.jboss.wsf.stack.cxf.resolver.JBossWSResourceResolver;
@@ -77,7 +77,7 @@
{
URL jbossCxfXml = deploymentResolver.resolve(contextParams.get(BusHolder.PARAM_CXF_BEANS_URL));
org.apache.cxf.resource.ResourceResolver resolver = new JBossWSResourceResolver(deploymentResolver);
- JBossWSCXFConfigurer configurer = holder.createConfigurer(dep.getAttachment(BindingCustomization.class), new WSDLFilePublisher(aDep));
+ Configurer configurer = holder.createServerConfigurer(dep.getAttachment(BindingCustomization.class), new WSDLFilePublisher(aDep));
holder.configure(jbossCxfXml, new SoapTransportFactoryExt(), resolver, configurer);
}
catch (IOException e)
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java 2010-05-05 04:31:58 UTC (rev 12161)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jaxbintros/JAXBIntroTestCase.java 2010-05-05 06:35:09 UTC (rev 12162)
@@ -54,14 +54,13 @@
private String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-jaxbintros/EndpointService";
private Bus bus;
- private Configurer originalConfigurer;
+ private JBossWSCXFConfigurer configurer;
public static Test suite()
{
return new JBossWSTestSetup(JAXBIntroTestCase.class, "jaxws-cxf-jaxbintros.jar");
}
- @SuppressWarnings("unchecked")
public void testWSDLAccess() throws Exception
{
URL wsdlURL = new URL(endpointAddress + "?wsdl");
@@ -105,7 +104,7 @@
}
finally
{
- restoreConfigurer();
+ unsetBindingCustomizationOnClientSide();
}
}
@@ -135,22 +134,20 @@
*
* @throws Exception
*/
+ @SuppressWarnings("unchecked")
private void setBindingCustomizationOnClientSide() throws Exception
{
BindingCustomization jaxbCustomizations = new JAXBBindingCustomization();
BindingCustomizationFactory.populateBindingCustomization(getResourceURL("jaxws/cxf/jaxbintros/META-INF/jaxb-intros.xml").openStream(), jaxbCustomizations);
bus = BusFactory.getThreadDefaultBus();
- originalConfigurer = bus.getExtension(Configurer.class);
- JBossWSCXFConfigurer configurer = new JBossWSCXFConfigurer(originalConfigurer);
+ configurer = (JBossWSCXFConfigurer)bus.getExtension(Configurer.class);
configurer.setBindingCustomization(jaxbCustomizations);
- bus.setExtension(configurer, Configurer.class);
-
}
-
- private void restoreConfigurer()
+
+ private void unsetBindingCustomizationOnClientSide()
{
- bus.setExtension(originalConfigurer, Configurer.class);
+ if (configurer != null)
+ configurer.setBindingCustomization(null);
}
-
}
14 years, 7 months