JBossWS SVN: r10448 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-07-31 17:33:03 -0400 (Fri, 31 Jul 2009)
New Revision: 10448
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
Log:
[JBWS-2707] fixing Alessio's commit - @Override annotation cannot be provided on both methods to support multiple CXF versions
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2009-07-31 21:21:15 UTC (rev 10447)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2009-07-31 21:33:03 UTC (rev 10448)
@@ -135,7 +135,6 @@
}
//required up to CXF 2.2.2
- @Override
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
try
@@ -153,7 +152,6 @@
}
//required for CXF 2.2.3 or greater
- @Override
protected void invoke(HttpServletRequest req, HttpServletResponse res) throws ServletException
{
try
15 years, 5 months
JBossWS SVN: r10447 - stack/cxf/trunk/modules/server.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-07-31 17:21:15 -0400 (Fri, 31 Jul 2009)
New Revision: 10447
Modified:
stack/cxf/trunk/modules/server/pom.xml
Log:
[JBWS-2712] upgrading to Scout 1.1 and JBoss JAXR 2.0.0
Modified: stack/cxf/trunk/modules/server/pom.xml
===================================================================
--- stack/cxf/trunk/modules/server/pom.xml 2009-07-31 20:57:07 UTC (rev 10446)
+++ stack/cxf/trunk/modules/server/pom.xml 2009-07-31 21:21:15 UTC (rev 10447)
@@ -16,6 +16,10 @@
<!-- Dependencies -->
<dependencies>
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ </dependency>
<!-- jbossws dependencies -->
<dependency>
<groupId>org.jboss.ws</groupId>
15 years, 5 months
JBossWS SVN: r10446 - in stack/cxf/trunk: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-07-31 16:57:07 -0400 (Fri, 31 Jul 2009)
New Revision: 10446
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
stack/cxf/trunk/pom.xml
Log:
[JBWS-2712] upgrading to Scout 1.1 and JBoss JAXR 2.0.0
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2009-07-31 20:54:27 UTC (rev 10445)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2009-07-31 20:57:07 UTC (rev 10446)
@@ -83,6 +83,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-javaee</artifactId>
+ <version>${jboss.javaee.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-07-31 20:54:27 UTC (rev 10445)
+++ stack/cxf/trunk/pom.xml 2009-07-31 20:57:07 UTC (rev 10446)
@@ -67,8 +67,8 @@
<jaxrpc.api.version>1.1</jaxrpc.api.version>
<jaxws.api.version>2.1-1</jaxws.api.version>
<juddi.version>0.9RC4</juddi.version>
- <jboss.jaxr.version>1.2.1.GA</jboss.jaxr.version>
- <apache.scout.version>0.7rc2</apache.scout.version>
+ <jboss.jaxr.version>2.0.0</jboss.jaxr.version>
+ <apache.scout.version>1.1</apache.scout.version>
<commons-collections.version>3.1</commons-collections.version>
<commons-lang.version>2.4</commons-lang.version>
<commons.logging.version>1.1.1</commons.logging.version>
15 years, 5 months
JBossWS SVN: r10445 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-07-31 16:54:27 -0400 (Fri, 31 Jul 2009)
New Revision: 10445
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2712] upgrading to Scout 1.1 and JBoss JAXR 2.0.0
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2009-07-31 20:53:38 UTC (rev 10444)
+++ stack/native/trunk/modules/testsuite/pom.xml 2009-07-31 20:54:27 UTC (rev 10445)
@@ -483,7 +483,6 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss510.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
</additionalClasspathElements>
@@ -555,7 +554,6 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss520.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
</additionalClasspathElements>
@@ -627,7 +625,6 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss600.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
</additionalClasspathElements>
15 years, 5 months
JBossWS SVN: r10444 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-07-31 16:53:38 -0400 (Fri, 31 Jul 2009)
New Revision: 10444
Modified:
stack/metro/trunk/modules/testsuite/pom.xml
Log:
[JBWS-2712] upgrading to Scout 1.1 and JBoss JAXR 2.0.0
Modified: stack/metro/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/metro/trunk/modules/testsuite/pom.xml 2009-07-31 20:23:11 UTC (rev 10443)
+++ stack/metro/trunk/modules/testsuite/pom.xml 2009-07-31 20:53:38 UTC (rev 10444)
@@ -478,7 +478,6 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss510.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
@@ -560,7 +559,6 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss520.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
@@ -642,7 +640,6 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss600.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
- <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
15 years, 5 months
JBossWS SVN: r10443 - in stack/metro/trunk: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-07-31 16:23:11 -0400 (Fri, 31 Jul 2009)
New Revision: 10443
Modified:
stack/metro/trunk/modules/testsuite/pom.xml
stack/metro/trunk/pom.xml
Log:
[JBWS-2712] upgrading to Scout 1.1 and JBoss JAXR 2.0.0
Modified: stack/metro/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/metro/trunk/modules/testsuite/pom.xml 2009-07-31 20:12:38 UTC (rev 10442)
+++ stack/metro/trunk/modules/testsuite/pom.xml 2009-07-31 20:23:11 UTC (rev 10443)
@@ -94,6 +94,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-javaee</artifactId>
+ <version>${jboss.javaee.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
@@ -472,6 +478,7 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss510.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
@@ -553,6 +560,7 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss520.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
@@ -634,6 +642,7 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss600.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
Modified: stack/metro/trunk/pom.xml
===================================================================
--- stack/metro/trunk/pom.xml 2009-07-31 20:12:38 UTC (rev 10442)
+++ stack/metro/trunk/pom.xml 2009-07-31 20:23:11 UTC (rev 10443)
@@ -62,8 +62,8 @@
<jaxb.api.version>2.1</jaxb.api.version>
<jaxb.impl.version>2.1.9</jaxb.impl.version>
<jaxrpc.api.version>1.1</jaxrpc.api.version>
- <jboss.jaxr.version>1.2.1.GA</jboss.jaxr.version>
- <apache.scout.version>0.7rc2</apache.scout.version>
+ <jboss.jaxr.version>2.0.0</jboss.jaxr.version>
+ <apache.scout.version>1.1</apache.scout.version>
<juddi.version>0.9RC4</juddi.version>
<sun.fastinfoset.version>1.2.2</sun.fastinfoset.version>
<sun.sjsxp.version>1.0.1</sun.sjsxp.version>
15 years, 5 months
JBossWS SVN: r10442 - in stack/native/trunk: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-07-31 16:12:38 -0400 (Fri, 31 Jul 2009)
New Revision: 10442
Modified:
stack/native/trunk/modules/testsuite/pom.xml
stack/native/trunk/pom.xml
Log:
[JBWS-2712] upgrading to Scout 1.1 and JBoss JAXR 2.0.0
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2009-07-31 19:44:38 UTC (rev 10441)
+++ stack/native/trunk/modules/testsuite/pom.xml 2009-07-31 20:12:38 UTC (rev 10442)
@@ -94,6 +94,12 @@
<version>${jboss.jaxr.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-javaee</artifactId>
+ <version>${jboss.javaee.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<!-- Build -->
@@ -477,6 +483,7 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss510.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
</additionalClasspathElements>
@@ -548,6 +555,7 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss520.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
</additionalClasspathElements>
@@ -619,6 +627,7 @@
<argLine>${surefire.jvm.args} -Djava.endorsed.dirs=${jboss600.home}/lib/endorsed</argLine>
<!-- TODO: replace with maven dependencies -->
<additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jboss-javaee.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
<additionalClasspathElement>${jboss.home}/common/lib/jboss-ejb3-core.jar</additionalClasspathElement>
</additionalClasspathElements>
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2009-07-31 19:44:38 UTC (rev 10441)
+++ stack/native/trunk/pom.xml 2009-07-31 20:12:38 UTC (rev 10442)
@@ -68,8 +68,8 @@
<jboss.common.version>1.2.1.GA</jboss.common.version>
<jboss.jaxbintros.version>1.0.0.GA</jboss.jaxbintros.version>
<jboss.logging.version>2.0.5.GA</jboss.logging.version>
- <jboss.jaxr.version>1.2.1.GA</jboss.jaxr.version>
- <apache.scout.version>0.7rc2</apache.scout.version>
+ <jboss.jaxr.version>2.0.0</jboss.jaxr.version>
+ <apache.scout.version>1.1</apache.scout.version>
<juddi.version>0.9RC4</juddi.version>
<netty.version>3.1.0.GA</netty.version>
<sun.fastinfoset.version>1.2.2</sun.fastinfoset.version>
15 years, 5 months
JBossWS SVN: r10441 - framework/trunk/testsuite/test/ant-import.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-07-31 15:44:38 -0400 (Fri, 31 Jul 2009)
New Revision: 10441
Modified:
framework/trunk/testsuite/test/ant-import/build-testsuite.xml
Log:
[JBWS-2712] upgrading to Scout 1.1 and JBoss JAXR 2.0.0
Modified: framework/trunk/testsuite/test/ant-import/build-testsuite.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-testsuite.xml 2009-07-31 17:53:40 UTC (rev 10440)
+++ framework/trunk/testsuite/test/ant-import/build-testsuite.xml 2009-07-31 19:44:38 UTC (rev 10441)
@@ -177,6 +177,7 @@
<pathelement location="${jboss.client}/mail.jar"/>
<pathelement location="${jboss.client}/stax-api.jar"/>
<pathelement location="${jboss.client}/trove.jar"/>
+ <pathelement location="${jboss.client}/jboss-javaee.jar"/>
<!-- FIXME jars should be available in the client dir -->
<pathelement location="${jboss.lib}/jboss-aop-jdk50.jar"/>
<pathelement location="${jboss.lib}/jboss-classloader.jar"/>
@@ -255,6 +256,7 @@
<pathelement location="${jboss.client}/mail.jar"/>
<pathelement location="${jboss.client}/stax-api.jar"/>
<pathelement location="${jboss.client}/trove.jar"/>
+ <pathelement location="${jboss.client}/jboss-javaee.jar"/>
<!-- FIXME jars should be available in the client dir -->
<pathelement location="${jboss.lib}/jboss-aop-jdk50.jar"/>
<pathelement location="${jboss.lib}/jboss-classloader.jar"/>
@@ -333,6 +335,7 @@
<pathelement location="${jboss.client}/mail.jar"/>
<pathelement location="${jboss.client}/stax-api.jar"/>
<pathelement location="${jboss.client}/trove.jar"/>
+ <pathelement location="${jboss.client}/jboss-javaee.jar"/>
<!-- FIXME jars should be available in the client dir -->
<pathelement location="${jboss.lib}/jboss-aop-jdk50.jar"/>
<pathelement location="${jboss.lib}/jboss-classloader.jar"/>
@@ -411,6 +414,7 @@
<pathelement location="${jboss.client}/mail.jar"/>
<pathelement location="${jboss.client}/stax-api.jar"/>
<pathelement location="${jboss.client}/trove.jar"/>
+ <pathelement location="${jboss.client}/jboss-javaee.jar"/>
<!-- FIXME jars should be available in the client dir -->
<pathelement location="${jboss.lib}/jboss-aop-jdk50.jar"/>
<pathelement location="${jboss.lib}/jboss-classloader.jar"/>
15 years, 5 months
JBossWS SVN: r10440 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-07-31 13:53:40 -0400 (Fri, 31 Jul 2009)
New Revision: 10440
Added:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
Log:
[JBWS-2707] Modifying CXFServletExt for using CXF > 2.2.2
[JBWS-1655] Providing custom SoapTransportFactory for controlling soap:address rewrite (WIP)
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2009-07-31 17:43:17 UTC (rev 10439)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2009-07-31 17:53:40 UTC (rev 10440)
@@ -34,10 +34,13 @@
import javax.xml.ws.WebServiceException;
import org.apache.cxf.BusFactory;
+import org.apache.cxf.transport.DestinationFactory;
+import org.apache.cxf.transport.DestinationFactoryManager;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.apache.cxf.transport.servlet.ServletController;
import org.apache.cxf.transport.servlet.ServletTransportFactory;
import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -98,6 +101,12 @@
ServletContext svCtx = getServletContext();
ApplicationContext appCtx = (ApplicationContext)svCtx.getAttribute("org.springframework.web.context.WebApplicationContext.ROOT");
+ //Install our SoapTransportFactory to allow for proper soap address rewrite
+ DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
+ DestinationFactory factory = new SoapTransportFactoryExt();
+ dfm.registerDestinationFactory(Constants.NS_SOAP11, factory);
+ dfm.registerDestinationFactory(Constants.NS_SOAP12, factory);
+
loadAdditionalConfigExt(appCtx, servletConfig);
}
@@ -125,6 +134,7 @@
}
}
+ //required up to CXF 2.2.2
@Override
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
@@ -141,6 +151,28 @@
BusFactory.setThreadDefaultBus(null);
}
}
+
+ //required for CXF 2.2.3 or greater
+ @Override
+ protected void invoke(HttpServletRequest req, HttpServletResponse res) throws ServletException
+ {
+ try
+ {
+ BusFactory.setThreadDefaultBus(getBus());
+ EndpointAssociation.setEndpoint(endpoint);
+ RequestHandler requestHandler = (RequestHandler)endpoint.getRequestHandler();
+ requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
+ }
+ catch (IOException ioe)
+ {
+ throw new ServletException(ioe);
+ }
+ finally
+ {
+ EndpointAssociation.removeEndpoint();
+ BusFactory.setThreadDefaultBus(null);
+ }
+ }
@Override
public void destroy()
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java 2009-07-31 17:53:40 UTC (rev 10440)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.wsdl.Port;
+
+import org.apache.cxf.binding.soap.SoapTransportFactory;
+import org.apache.cxf.binding.soap.model.SoapBindingInfo;
+import org.apache.cxf.service.model.BindingInfo;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.tools.common.extensions.soap.SoapAddress;
+import org.apache.cxf.tools.util.SOAPBindingUtil;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+
+/**
+ * A SoapTransportFactory extending @see org.apache.cxf.binding.soap.SoapTransportFactory.
+ * It overrides the EndpointInfo creation method to allow for the soap:address extension
+ * of the wsdl to be overwritten according to the JBossWS configuration.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 31-Jul-2009
+ *
+ */
+public class SoapTransportFactoryExt extends SoapTransportFactory
+{
+ private static Logger log = Logger.getLogger(SoapTransportFactoryExt.class);
+ private ServerConfig serverConfig;
+
+ public EndpointInfo createEndpointInfo(ServiceInfo serviceInfo, BindingInfo b, Port port)
+ {
+ String transportURI = "http://schemas.xmlsoap.org/wsdl/soap/";
+ if (b instanceof SoapBindingInfo)
+ {
+ SoapBindingInfo sbi = (SoapBindingInfo)b;
+ transportURI = sbi.getTransportURI();
+ }
+ ServerConfig config = getServerConfig();
+ EndpointInfo info = new CustomSoapEndpointInfo(serviceInfo, transportURI, config != null && config.isModifySOAPAddress());
+ if (port != null)
+ {
+ List ees = port.getExtensibilityElements();
+ for (Iterator itr = ees.iterator(); itr.hasNext();)
+ {
+ Object extensor = itr.next();
+
+ if (SOAPBindingUtil.isSOAPAddress(extensor))
+ {
+ final SoapAddress sa = SOAPBindingUtil.getSoapAddress(extensor);
+
+ info.addExtensor(sa);
+ info.setAddress(sa.getLocationURI());
+ }
+ else
+ {
+ info.addExtensor(extensor);
+ }
+ }
+ }
+ return info;
+ }
+
+ private ServerConfig getServerConfig()
+ {
+ if (serverConfig == null)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ }
+ return serverConfig;
+ }
+
+ /**
+ * A custom EndpointInfo that updates the SoapAddress extension
+ * coming from the wsdl definition according to the JBossWS
+ * soap address rewrite rules.
+ *
+ */
+ private class CustomSoapEndpointInfo extends EndpointInfo
+ {
+ boolean alwaysModifyWsdl;
+ SoapAddress saddress;
+
+ CustomSoapEndpointInfo(ServiceInfo serv, String trans, boolean alwaysModifyWsdl)
+ {
+ super(serv, trans);
+ this.alwaysModifyWsdl = alwaysModifyWsdl;
+ }
+
+ public void setAddress(String s)
+ {
+ boolean currentInvalid = isCurrentAddressInvalid();
+ super.setAddress(s);
+ if (alwaysModifyWsdl || currentInvalid)
+ {
+ log.info("Setting new address: " + s);
+ if (saddress != null)
+ {
+ saddress.setLocationURI(s);
+ }
+ }
+ }
+
+ public void addExtensor(Object el)
+ {
+ super.addExtensor(el);
+ if (el instanceof SoapAddress)
+ {
+ saddress = (SoapAddress)el;
+ }
+ }
+
+ private boolean isCurrentAddressInvalid()
+ {
+ String address = super.getAddress();
+ if (address != null)
+ {
+ try
+ {
+ new URL(address);
+ }
+ catch (MalformedURLException e)
+ {
+ log.info("Forcing rewrite of invalid address: " + address);
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/SoapTransportFactoryExt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 5 months
JBossWS SVN: r10439 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-07-31 13:43:17 -0400 (Fri, 31 Jul 2009)
New Revision: 10439
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
Log:
[JBWS-1655] Minor fix to test
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java 2009-07-30 15:57:03 UTC (rev 10438)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCase.java 2009-07-31 17:43:17 UTC (rev 10439)
@@ -173,7 +173,9 @@
private ServiceIface getEndpoint(String wsdlLocation, String serviceName) throws Exception
{
- return Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName)).getPort(ServiceIface.class);
+ Service service = Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName));
+ QName portName = service.getPorts().next();
+ return service.getPort(portName, ServiceIface.class);
}
private Definition getWSDLDefinition(String wsdlLocation) throws Exception
15 years, 5 months