Author: jim.ma
Date: 2010-12-03 05:21:30 -0500 (Fri, 03 Dec 2010)
New Revision: 13395
Removed:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/TestLoggingInInterceptor.java
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/descriptor/cxf.xml
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpoint.java
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.java
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java
Log:
Reverted the commit for [JBWS-3174]
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-3.4.0/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java 2010-12-03
09:08:42 UTC (rev 13394)
+++
stack/cxf/branches/jbossws-cxf-3.4.0/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/DescriptorDeploymentAspect.java 2010-12-03
10:21:30 UTC (rev 13395)
@@ -66,13 +66,16 @@
{
if (SpringUtils.isSpringAvailable())
{
- URL cxfURL = getCXFConfigFromDeployment(dep);
+ URL cxfURL = getCXFConfigFromClassLoader(dep);
if (cxfURL == null)
{
- cxfURL = generateCXFConfigFromDeployment(dep);
+ cxfURL = getCXFConfigFromDeployment(dep);
+ if (cxfURL == null)
+ {
+ cxfURL = generateCXFConfigFromDeployment(dep);
+ }
+ putCXFConfigToDeployment(dep, cxfURL);
}
- putCXFConfigToDeployment(dep, cxfURL);
-
}
else
{
@@ -90,8 +93,24 @@
dd.destroyFileURL();
}
}
-
+
/**
+ * Looks for <b>cxf.xml</b> in classloader
+ * @param dep deployment which initial classloader will be used
+ * @return <b>cxf.xml URL</b> or <b>null</b> if not found
+ */
+ private URL getCXFConfigFromClassLoader(Deployment dep)
+ {
+ ClassLoader initCL = dep.getInitialClassLoader();
+ URL cxfURL = initCL.getResource("cxf.xml");
+ if (cxfURL != null)
+ {
+ log.info("CXF configuration found: " + cxfURL);
+ }
+ return cxfURL;
+ }
+
+ /**
* Looks for <b>jbossws-cxf.xml</b> in:
* <ul>
* <li><b>META-INF</b> resource directory for EJB3
deployment</li>
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml 2010-12-03
09:08:42 UTC (rev 13394)
+++
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml 2010-12-03
10:21:30 UTC (rev 13395)
@@ -64,11 +64,7 @@
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-descriptor.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/descriptor/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include
name="org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.class"/>
- <include
name="org/jboss/test/ws/jaxws/cxf/descriptor/TestLoggingInInterceptor.class"/>
</classes>
- <classes
dir="${tests.output.dir}/test-resources/jaxws/cxf/descriptor/">
- <include name="cxf.xml"/>
- </classes>
<webinf
dir="${tests.output.dir}/test-resources/jaxws/cxf/descriptor/WEB-INF">
<include name="jbossws-cxf.xml"/>
</webinf>
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpoint.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpoint.java 2010-12-03
09:08:42 UTC (rev 13394)
+++
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpoint.java 2010-12-03
10:21:30 UTC (rev 13395)
@@ -29,5 +29,4 @@
public interface DescriptorEndpoint
{
String echo(String input);
- String getInBoundLog();
}
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.java 2010-12-03
09:08:42 UTC (rev 13394)
+++
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorEndpointImpl.java 2010-12-03
10:21:30 UTC (rev 13395)
@@ -46,10 +46,4 @@
return input;
}
-
- @WebMethod
- public String getInBoundLog()
- {
- return new String(TestLoggingInInterceptor.stringWriter.getBuffer());
- }
}
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java 2010-12-03
09:08:42 UTC (rev 13394)
+++
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/DescriptorJSETestCase.java 2010-12-03
10:21:30 UTC (rev 13395)
@@ -57,9 +57,5 @@
Object retObj = port.echo("Hello");
assertEquals("Hello", retObj);
-
- //JBWS-3174: test the cxf.xml is loaded
- String serverInBoundLog = port.getInBoundLog();
- assertTrue(serverInBoundLog.length() > 0);
}
}
Deleted:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/TestLoggingInInterceptor.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/TestLoggingInInterceptor.java 2010-12-03
09:08:42 UTC (rev 13394)
+++
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/descriptor/TestLoggingInInterceptor.java 2010-12-03
10:21:30 UTC (rev 13395)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.test.ws.jaxws.cxf.descriptor;
-
-import java.io.PrintWriter;
-
-import org.apache.cxf.interceptor.LoggingInInterceptor;
-
-public class TestLoggingInInterceptor extends LoggingInInterceptor {
-
- public static java.io.StringWriter stringWriter = new java.io.StringWriter();
-
- public TestLoggingInInterceptor() {
- super();
- this.setPrintWriter(new PrintWriter(stringWriter));
- }
-
-}
Deleted:
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/descriptor/cxf.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/descriptor/cxf.xml 2010-12-03
09:08:42 UTC (rev 13394)
+++
stack/cxf/branches/jbossws-cxf-3.4.0/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/descriptor/cxf.xml 2010-12-03
10:21:30 UTC (rev 13395)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans
xmlns="http://www.springframework.org/schema/beans"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
-
xmlns:cxf="http://cxf.apache.org/core"
- xsi:schemaLocation="
-http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
-http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd
-http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
- <bean id="logInbound"
- class="org.jboss.test.ws.jaxws.cxf.descriptor.TestLoggingInInterceptor"
/>
- <cxf:bus>
- <cxf:inInterceptors>
- <ref bean="logInbound" />
- </cxf:inInterceptors>
- </cxf:bus>
-</beans>