JBossWS SVN: r12970 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-14 13:08:51 -0400 (Tue, 14 Sep 2010)
New Revision: 12970
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderBeanMessage.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderMessageTestCase.java
Log:
[JBWS-3101] Adding testcase
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderBeanMessage.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderBeanMessage.java 2010-09-14 11:45:27 UTC (rev 12969)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderBeanMessage.java 2010-09-14 17:08:51 UTC (rev 12970)
@@ -21,12 +21,15 @@
*/
package org.jboss.test.ws.jaxws.samples.provider;
+import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.Provider;
import javax.xml.ws.Service;
import javax.xml.ws.ServiceMode;
import javax.xml.ws.WebServiceProvider;
+import org.w3c.dom.NodeList;
+
/**
* Test a Provider<SOAPMessage>
*
@@ -43,6 +46,22 @@
{
public SOAPMessage invoke(SOAPMessage request)
{
+ try
+ {
+ SOAPHeader headers = request.getSOAPHeader();
+ if (headers != null)
+ {
+ NodeList nl = headers.getElementsByTagNameNS("http://org.jboss.ws/foo", "returnNullResponse");
+ if (nl != null && nl.getLength() > 0)
+ {
+ return null;
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
return request;
}
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderMessageTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderMessageTestCase.java 2010-09-14 11:45:27 UTC (rev 12969)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/provider/ProviderMessageTestCase.java 2010-09-14 17:08:51 UTC (rev 12970)
@@ -29,12 +29,14 @@
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
import javax.xml.ws.Service.Mode;
@@ -61,6 +63,16 @@
" <ns1:somePayload xmlns:ns1='http://org.jboss.ws/provider'/>" +
" </soap:Body>" +
"</soap:Envelope>";
+
+ private String msgStringForNullResponse =
+ "<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <soap:Header>" +
+ " <nsh:returnNullResponse xmlns:nsh='http://org.jboss.ws/foo'/>" +
+ " </soap:Header>" +
+ " <soap:Body>" +
+ " <ns1:somePayload xmlns:ns1='http://org.jboss.ws/provider'/>" +
+ " </soap:Body>" +
+ "</soap:Envelope>";
public static Test suite()
{
@@ -106,6 +118,23 @@
assertEquals(reqEnv, resEnv);
}
+ public void testProviderMessageNullResponse() throws Exception
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(msgStringForNullResponse.getBytes()));
+
+ URL epURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-provider-message");
+ SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+ SOAPMessage resMsg = con.call(reqMsg, epURL);
+ SOAPPart soapPart = resMsg.getSOAPPart();
+ //verify there's either nothing in the reply or at least the response body is empty
+ if (soapPart != null && soapPart.getEnvelope() != null && soapPart.getEnvelope().getBody() != null)
+ {
+ SOAPBody soapBody = soapPart.getEnvelope().getBody();
+ assertFalse(soapBody.getChildElements().hasNext());
+ }
+ }
+
private SOAPMessage getRequestMessage() throws SOAPException, IOException
{
MessageFactory msgFactory = MessageFactory.newInstance();
14 years, 3 months
JBossWS SVN: r12969 - in framework/trunk/hudson: hudson-home and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-14 07:45:27 -0400 (Tue, 14 Sep 2010)
New Revision: 12969
Removed:
framework/trunk/hudson/hudson-home/jobs/METRO-ALL/
framework/trunk/hudson/hudson-home/jobs/METRO-BINDIST-AS-5.0.1-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-BINDIST-AS-5.1.0-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-BINDIST-AS-6.0.0-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-BINDIST-AS-6.0.1-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-CORE-AS-5.0.1-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-CORE-AS-5.1.0-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-CORE-AS-6.0.0-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-CORE-AS-6.0.1-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-LIGHT/
framework/trunk/hudson/hudson-home/jobs/METRO-SRCDIST-AS-5.0.1-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-SRCDIST-AS-5.1.0-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-SRCDIST-AS-6.0.0-SUN-JDK-6/
framework/trunk/hudson/hudson-home/jobs/METRO-SRCDIST-AS-6.0.1-SUN-JDK-6/
Modified:
framework/trunk/hudson/ant.properties.example
framework/trunk/hudson/hudson-home/config.xml
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.0/config.xml
framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.1/config.xml
framework/trunk/hudson/hudson-home/jobs/WEEKEND-MATRIX/config.xml
framework/trunk/hudson/hudson-home/jobs/WORKING-DAYS-MATRIX/config.xml
Log:
Removing Metro jobs from hudson matrix
Modified: framework/trunk/hudson/ant.properties.example
===================================================================
--- framework/trunk/hudson/ant.properties.example 2010-09-14 11:24:30 UTC (rev 12968)
+++ framework/trunk/hudson/ant.properties.example 2010-09-14 11:45:27 UTC (rev 12969)
@@ -22,7 +22,6 @@
hudson.http.port=8180
hudson.native.url=http://anonsvn.jboss.org/repos/jbossws/stack/native/trunk
-hudson.metro.url=http://anonsvn.jboss.org/repos/jbossws/stack/metro/trunk
hudson.cxf.url=http://anonsvn.jboss.org/repos/jbossws/stack/cxf/trunk
hudson.jboss501.url=http://anonsvn.jboss.org/repos/jbossas/tags/JBoss_5_0...
Modified: framework/trunk/hudson/hudson-home/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/config.xml 2010-09-14 11:24:30 UTC (rev 12968)
+++ framework/trunk/hudson/hudson-home/config.xml 2010-09-14 11:45:27 UTC (rev 12969)
@@ -10,7 +10,6 @@
<tr><th align=left>Framework:</th><td>@hudson.framework.url@</td></tr>
<tr><td colspan=2></td></tr>
<tr><th align=left>Stack-Native:</th><td>@hudson.native.url@</td></tr>
- <tr><th align=left>Stack-Metro:</th><td>@hudson.metro.url@</td></tr>
<tr><th align=left>Stack-CXF:</th><td>@hudson.cxf.url@</td></tr>
<tr><td colspan=2></td></tr>
<tr><th align=left>@hudson.jboss501.build@</th><td>-r(a)hudson.jboss501.rev@ @hudson.jboss501.url@</td></tr>
@@ -96,36 +95,6 @@
</description>
</view>
- <!-- Metro Tests-->
- <view>
- <owner reference="../../.."/>
- <jobNames class="tree-set">
- <no-comparator/>
- <string>METRO-ALL</string>
- <string>METRO-LIGHT</string>
- <string>METRO-CORE-AS-5.0.1-SUN-JDK-6</string>
- <string>METRO-CORE-AS-5.1.0-SUN-JDK-6</string>
- <string>METRO-CORE-AS-6.0.0-SUN-JDK-6</string>
- <string>METRO-CORE-AS-6.0.1-SUN-JDK-6</string>
- <string>METRO-BINDIST-AS-5.0.1-SUN-JDK-6</string>
- <string>METRO-BINDIST-AS-5.1.0-SUN-JDK-6</string>
- <string>METRO-BINDIST-AS-6.0.0-SUN-JDK-6</string>
- <string>METRO-BINDIST-AS-6.0.1-SUN-JDK-6</string>
- <string>METRO-SRCDIST-AS-5.0.1-SUN-JDK-6</string>
- <string>METRO-SRCDIST-AS-5.1.0-SUN-JDK-6</string>
- <string>METRO-SRCDIST-AS-6.0.0-SUN-JDK-6</string>
- <string>METRO-SRCDIST-AS-6.0.1-SUN-JDK-6</string>
- </jobNames>
- <name>Metro Tests</name>
- <description>
- <![CDATA[
- Run the Metro testsuite.
- <p/>
- Make sure you have sucessfuly build the <a href="/hudson/view/Target%20Container">Target Container</a>
-]]>
- </description>
- </view>
-
<!-- CXF Tests-->
<view>
<owner reference="../../.."/>
@@ -173,15 +142,6 @@
<owner reference="../../.."/>
<jobNames class="tree-set">
<no-comparator/>
- <string>METRO-LIGHT</string>
- <string>METRO-CORE-AS-5.0.1-SUN-JDK-6</string>
- <string>METRO-CORE-AS-5.1.0-SUN-JDK-6</string>
- <string>METRO-CORE-AS-6.0.0-SUN-JDK-6</string>
- <string>METRO-CORE-AS-6.0.1-SUN-JDK-6</string>
- <string>METRO-BINDIST-AS-5.0.1-SUN-JDK-6</string>
- <string>METRO-BINDIST-AS-5.1.0-SUN-JDK-6</string>
- <string>METRO-BINDIST-AS-6.0.0-SUN-JDK-6</string>
- <string>METRO-BINDIST-AS-6.0.1-SUN-JDK-6</string>
<string>CXF-LIGHT</string>
<string>CXF-CORE-AS-5.0.1-SUN-JDK-6</string>
<string>CXF-CORE-AS-5.1.0-SUN-JDK-6</string>
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml 2010-09-14 11:24:30 UTC (rev 12968)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.0.1/config.xml 2010-09-14 11:45:27 UTC (rev 12969)
@@ -17,11 +17,9 @@
JBOSS_CONFIG=(a)jboss.server.instance@
JBOSS_INSTANCE=@hudson.home@/jobs/AS-5.0.1/workspace/JBossAS-5.0.1/build/output/(a)hudson.jboss501.build@
CXF_BIN_DIST_DIR=@hudson.home(a)/jobs/CXF-BINDIST-AS-5.0.1-SUN-JDK-6/workspace/stack-cxf/
-METRO_BIN_DIST_DIR=@hudson.home(a)/jobs/METRO-BINDIST-AS-5.0.1-SUN-JDK-6/workspace/stack-metro/
NATIVE_BIN_DIST_DIR=@hudson.home(a)/jobs/NATIVE-BINDIST-AS-5.0.1-SUN-JDK-6/workspace/stack-native/
CXF_AS_HOME=$WORKSPACE/cxf-as
NATIVE_AS_HOME=$WORKSPACE/native-as
-METRO_AS_HOME=$WORKSPACE/metro-as
#
# load test functions
@@ -48,14 +46,6 @@
setupEnv
redeployBinaryDistribution
-rm -rf $METRO_AS_HOME
-cp -r $JBOSS_INSTANCE $METRO_AS_HOME
-JBOSS_HOME=$METRO_AS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-
JBOSS_HOME=$WORKSPACE/modified-as
#------------------------------------- CXF stack checks -------------------------------------
@@ -94,26 +84,8 @@
rm -rf $JBOSS_HOME
-#------------------------------------- METRO stack checks -------------------------------------
-
-cp -r $CXF_AS_HOME $JBOSS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-diff -r $METRO_AS_HOME $JBOSS_HOME > $WORKSPACE/metro_vs_metroOverCxf.diff
-rm -rf $JBOSS_HOME
-cp -r $NATIVE_AS_HOME $JBOSS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-diff -r $METRO_AS_HOME $JBOSS_HOME > $WORKSPACE/metro_vs_metroOverNative.diff
-rm -rf $JBOSS_HOME
-
rm -rf $CXF_AS_HOME
rm -rf $NATIVE_AS_HOME
-rm -rf $METRO_AS_HOME
</command>
</hudson.tasks.Shell>
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml 2010-09-14 11:24:30 UTC (rev 12968)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-5.1.0/config.xml 2010-09-14 11:45:27 UTC (rev 12969)
@@ -17,11 +17,9 @@
JBOSS_CONFIG=(a)jboss.server.instance@
JBOSS_INSTANCE=@hudson.home@/jobs/AS-5.1.0/workspace/JBossAS-5.1.0/build/output/(a)hudson.jboss510.build@
CXF_BIN_DIST_DIR=@hudson.home(a)/jobs/CXF-BINDIST-AS-5.1.0-SUN-JDK-6/workspace/stack-cxf/
-METRO_BIN_DIST_DIR=@hudson.home(a)/jobs/METRO-BINDIST-AS-5.1.0-SUN-JDK-6/workspace/stack-metro/
NATIVE_BIN_DIST_DIR=@hudson.home(a)/jobs/NATIVE-BINDIST-AS-5.1.0-SUN-JDK-6/workspace/stack-native/
CXF_AS_HOME=$WORKSPACE/cxf-as
NATIVE_AS_HOME=$WORKSPACE/native-as
-METRO_AS_HOME=$WORKSPACE/metro-as
#
# load test functions
@@ -48,14 +46,6 @@
setupEnv
redeployBinaryDistribution
-rm -rf $METRO_AS_HOME
-cp -r $JBOSS_INSTANCE $METRO_AS_HOME
-JBOSS_HOME=$METRO_AS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-
JBOSS_HOME=$WORKSPACE/modified-as
#------------------------------------- CXF stack checks -------------------------------------
@@ -93,27 +83,8 @@
diff -r $NATIVE_AS_HOME $JBOSS_HOME > $WORKSPACE/native_vs_nativeOverCxf.diff
rm -rf $JBOSS_HOME
-
-#------------------------------------- METRO stack checks -------------------------------------
-
-cp -r $CXF_AS_HOME $JBOSS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-diff -r $METRO_AS_HOME $JBOSS_HOME > $WORKSPACE/metro_vs_metroOverCxf.diff
-rm -rf $JBOSS_HOME
-cp -r $NATIVE_AS_HOME $JBOSS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-diff -r $METRO_AS_HOME $JBOSS_HOME > $WORKSPACE/metro_vs_metroOverNative.diff
-rm -rf $JBOSS_HOME
-
rm -rf $CXF_AS_HOME
rm -rf $NATIVE_AS_HOME
-rm -rf $METRO_AS_HOME
</command>
</hudson.tasks.Shell>
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.0/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.0/config.xml 2010-09-14 11:24:30 UTC (rev 12968)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.0/config.xml 2010-09-14 11:45:27 UTC (rev 12969)
@@ -17,11 +17,9 @@
JBOSS_CONFIG=(a)jboss.server.instance@
JBOSS_INSTANCE=@hudson.home@/jobs/AS-6.0.0/workspace/JBossAS-6.0.0/build/target/(a)hudson.jboss600.build@
CXF_BIN_DIST_DIR=@hudson.home(a)/jobs/CXF-BINDIST-AS-6.0.0-SUN-JDK-6/workspace/stack-cxf/
-METRO_BIN_DIST_DIR=@hudson.home(a)/jobs/METRO-BINDIST-AS-6.0.0-SUN-JDK-6/workspace/stack-metro/
NATIVE_BIN_DIST_DIR=@hudson.home(a)/jobs/NATIVE-BINDIST-AS-6.0.0-SUN-JDK-6/workspace/stack-native/
CXF_AS_HOME=$WORKSPACE/cxf-as
NATIVE_AS_HOME=$WORKSPACE/native-as
-METRO_AS_HOME=$WORKSPACE/metro-as
#
# load test functions
@@ -48,14 +46,6 @@
setupEnv
redeployBinaryDistribution
-rm -rf $METRO_AS_HOME
-cp -r $JBOSS_INSTANCE $METRO_AS_HOME
-JBOSS_HOME=$METRO_AS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-
JBOSS_HOME=$WORKSPACE/modified-as
#------------------------------------- CXF stack checks -------------------------------------
@@ -94,26 +84,8 @@
rm -rf $JBOSS_HOME
-#------------------------------------- METRO stack checks -------------------------------------
-
-cp -r $CXF_AS_HOME $JBOSS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-diff -r $METRO_AS_HOME $JBOSS_HOME > $WORKSPACE/metro_vs_metroOverCxf.diff
-rm -rf $JBOSS_HOME
-cp -r $NATIVE_AS_HOME $JBOSS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-diff -r $METRO_AS_HOME $JBOSS_HOME -x jbossws-native-core.jar > $WORKSPACE/metro_vs_metroOverNative.diff
-rm -rf $JBOSS_HOME
-
rm -rf $CXF_AS_HOME
rm -rf $NATIVE_AS_HOME
-rm -rf $METRO_AS_HOME
</command>
</hudson.tasks.Shell>
Modified: framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.1/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.1/config.xml 2010-09-14 11:24:30 UTC (rev 12968)
+++ framework/trunk/hudson/hudson-home/jobs/SWITCH-BINDIST-AS-6.0.1/config.xml 2010-09-14 11:45:27 UTC (rev 12969)
@@ -17,11 +17,9 @@
JBOSS_CONFIG=(a)jboss.server.instance@
JBOSS_INSTANCE=@hudson.home@/jobs/AS-6.0.1/workspace/JBossAS-6.0.1/build/target/(a)hudson.jboss601.build@
CXF_BIN_DIST_DIR=@hudson.home(a)/jobs/CXF-BINDIST-AS-6.0.1-SUN-JDK-6/workspace/stack-cxf/
-METRO_BIN_DIST_DIR=@hudson.home(a)/jobs/METRO-BINDIST-AS-6.0.1-SUN-JDK-6/workspace/stack-metro/
NATIVE_BIN_DIST_DIR=@hudson.home(a)/jobs/NATIVE-BINDIST-AS-6.0.1-SUN-JDK-6/workspace/stack-native/
CXF_AS_HOME=$WORKSPACE/cxf-as
NATIVE_AS_HOME=$WORKSPACE/native-as
-METRO_AS_HOME=$WORKSPACE/metro-as
#
# load test functions
@@ -48,14 +46,6 @@
setupEnv
redeployBinaryDistribution
-rm -rf $METRO_AS_HOME
-cp -r $JBOSS_INSTANCE $METRO_AS_HOME
-JBOSS_HOME=$METRO_AS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-
JBOSS_HOME=$WORKSPACE/modified-as
#------------------------------------- CXF stack checks -------------------------------------
@@ -94,26 +84,8 @@
rm -rf $JBOSS_HOME
-#------------------------------------- METRO stack checks -------------------------------------
-
-cp -r $CXF_AS_HOME $JBOSS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-diff -r $METRO_AS_HOME $JBOSS_HOME > $WORKSPACE/metro_vs_metroOverCxf.diff
-rm -rf $JBOSS_HOME
-cp -r $NATIVE_AS_HOME $JBOSS_HOME
-STACK_DIR=$METRO_BIN_DIST_DIR
-STACK_ID=metro
-setupEnv
-redeployBinaryDistribution
-diff -r $METRO_AS_HOME $JBOSS_HOME -x jbossws-native-core.jar > $WORKSPACE/metro_vs_metroOverNative.diff
-rm -rf $JBOSS_HOME
-
rm -rf $CXF_AS_HOME
rm -rf $NATIVE_AS_HOME
-rm -rf $METRO_AS_HOME
</command>
</hudson.tasks.Shell>
Modified: framework/trunk/hudson/hudson-home/jobs/WEEKEND-MATRIX/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/WEEKEND-MATRIX/config.xml 2010-09-14 11:24:30 UTC (rev 12968)
+++ framework/trunk/hudson/hudson-home/jobs/WEEKEND-MATRIX/config.xml 2010-09-14 11:45:27 UTC (rev 12969)
@@ -3,7 +3,7 @@
<builders class="vector"/>
<publishers class="vector">
<hudson.tasks.BuildTrigger>
- <childProjects>AS-ALL, AS-TESTS-ALL, NATIVE-ALL, CXF-ALL, METRO-ALL, SWITCH-ALL</childProjects>
+ <childProjects>AS-ALL, AS-TESTS-ALL, NATIVE-ALL, CXF-ALL, SWITCH-ALL</childProjects>
</hudson.tasks.BuildTrigger>
</publishers>
<buildWrappers class="vector"/>
Modified: framework/trunk/hudson/hudson-home/jobs/WORKING-DAYS-MATRIX/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/WORKING-DAYS-MATRIX/config.xml 2010-09-14 11:24:30 UTC (rev 12968)
+++ framework/trunk/hudson/hudson-home/jobs/WORKING-DAYS-MATRIX/config.xml 2010-09-14 11:45:27 UTC (rev 12969)
@@ -3,7 +3,7 @@
<builders class="vector"/>
<publishers class="vector">
<hudson.tasks.BuildTrigger>
- <childProjects>AS-ALL, AS-TESTS-ALL, NATIVE-LIGHT, CXF-LIGHT, METRO-LIGHT</childProjects>
+ <childProjects>AS-ALL, AS-TESTS-ALL, NATIVE-LIGHT, CXF-LIGHT</childProjects>
</hudson.tasks.BuildTrigger>
</publishers>
<buildWrappers class="vector"/>
14 years, 3 months
JBossWS SVN: r12968 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-14 07:24:30 -0400 (Tue, 14 Sep 2010)
New Revision: 12968
Removed:
stack/cxf/branches/cxf-2.3/
Log:
Removing old branch not used anymore
14 years, 3 months
JBossWS SVN: r12967 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-09-14 01:51:27 -0400 (Tue, 14 Sep 2010)
New Revision: 12967
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-3127]:Temporarily excluded the JMSEndpointTestcase
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-09-13 16:56:17 UTC (rev 12966)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-09-14 05:51:27 UTC (rev 12967)
@@ -34,3 +34,6 @@
# [JBAS-8403] excluding test until jboss-web.xml override is fixed
org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.*
+
+# [JBWS-3127] review it after SoapJMSInInterceptor is fixed in CXF
+org/jboss/test/ws/jaxws/samples/jmsendpoints/**
14 years, 3 months
JBossWS SVN: r12966 - stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-13 12:56:17 -0400 (Mon, 13 Sep 2010)
New Revision: 12966
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
Log:
Adding required props to jms message before sending - testcase still fails though
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java 2010-09-13 16:20:29 UTC (rev 12965)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/JMSEndpointsTestCase.java 2010-09-13 16:56:17 UTC (rev 12966)
@@ -37,6 +37,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.apache.cxf.transport.jms.spec.JMSSpecConstants;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.test.JBossWSTest;
@@ -109,6 +110,8 @@
TextMessage message = session.createTextMessage(reqMessage);
message.setJMSReplyTo(resQueue);
+ message.setStringProperty(JMSSpecConstants.CONTENTTYPE_FIELD, "text/xml");
+ message.setStringProperty(JMSSpecConstants.REQUESTURI_FIELD, "/foo");
waitForResponse = true;
14 years, 3 months
JBossWS SVN: r12965 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-13 12:20:29 -0400 (Mon, 13 Sep 2010)
New Revision: 12965
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
Log:
[JBWS-2917] Enabling jbws3008 tests (only the failing ones are skipped with fixmes)
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-09-13 16:17:53 UTC (rev 12964)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-09-13 16:20:29 UTC (rev 12965)
@@ -8,7 +8,6 @@
org/jboss/test/ws/jaxws/jbws2917/**
org/jboss/test/ws/jaxws/jbws2937/**
org/jboss/test/ws/jaxws/jbws2942/**
-org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/endpointReference/**
org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-09-13 16:17:53 UTC (rev 12964)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-09-13 16:20:29 UTC (rev 12965)
@@ -8,7 +8,6 @@
org/jboss/test/ws/jaxws/jbws2917/**
org/jboss/test/ws/jaxws/jbws2937/**
org/jboss/test/ws/jaxws/jbws2942/**
-org/jboss/test/ws/jaxws/jbws3008/**
org/jboss/test/ws/jaxws/endpointReference/**
org/jboss/test/ws/jaxws/epr/NativeEndpointReferenceTestCase.*
14 years, 3 months
JBossWS SVN: r12964 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-13 12:17:53 -0400 (Mon, 13 Sep 2010)
New Revision: 12964
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
Log:
[JBWS-3123] Fixing excludes
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-09-13 16:15:28 UTC (rev 12963)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-09-13 16:17:53 UTC (rev 12964)
@@ -15,5 +15,5 @@
# [JBWS-2957] EJB3 webservices in web archives (fixed on AS 6 series only)
org/jboss/test/ws/jaxws/jbws2957/**
-# [JBAS-8403] excluding test until jboss-web.xml override is fixed
-org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.*
+# [JBWS-3123] @WebServiceRef support for servlet available on AS 6 only
+org/jboss/test/ws/jaxws/jbws3123/**
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-09-13 16:15:28 UTC (rev 12963)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-09-13 16:17:53 UTC (rev 12964)
@@ -15,5 +15,5 @@
# [JBWS-2957] EJB3 webservices in web archives (fixed on AS 6 series only)
org/jboss/test/ws/jaxws/jbws2957/**
-# [JBAS-8403] excluding test until jboss-web.xml override is fixed
-org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.*
+# [JBWS-3123] @WebServiceRef support for servlet available on AS 6 only
+org/jboss/test/ws/jaxws/jbws3123/**
14 years, 3 months
JBossWS SVN: r12963 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3008.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-09-13 12:15:28 -0400 (Mon, 13 Sep 2010)
New Revision: 12963
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3008/JBWS3008TestCase.java
Log:
[JBWS-2917] Adding fixmes for failing tests
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3008/JBWS3008TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3008/JBWS3008TestCase.java 2010-09-13 12:35:37 UTC (rev 12962)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3008/JBWS3008TestCase.java 2010-09-13 16:15:28 UTC (rev 12963)
@@ -254,6 +254,11 @@
public void testEPRGetPortViaWSCAndNoWSFTest() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
try
{
W3CEndpointReference epr = port.getW3CEPR1();
@@ -268,6 +273,11 @@
public void testEPRGetPortViaWSCAndWSFTrueTest() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
W3CEndpointReference epr = port.getW3CEPR1();
AddNumbers retport = (AddNumbers) epr.getPort(AddNumbers.class, wsftrue);
int result = retport.doAddNumbers(10, 10);
@@ -276,6 +286,11 @@
public void testEPRGetPortViaWSCAndWSFFalseTest() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
try
{
W3CEndpointReference epr = port.getW3CEPR1();
@@ -291,6 +306,11 @@
public void testEPRGetPortViaBPAndNoWSFTest() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
try
{
W3CEndpointReference epr = (W3CEndpointReference) bp.getEndpointReference();
@@ -305,6 +325,11 @@
public void testEPRGetPortViaBPAndWSFTrueTest() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
W3CEndpointReference epr = (W3CEndpointReference) bp.getEndpointReference();
AddNumbers retport = (AddNumbers) epr.getPort(AddNumbers.class, wsftrue);
int result = retport.doAddNumbers(10, 10);
@@ -313,6 +338,11 @@
public void testEPRGetPortViaBPAndWSFFalseTest() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
try
{
W3CEndpointReference epr = (W3CEndpointReference) bp.getEndpointReference();
@@ -328,6 +358,11 @@
public void testEPRViaWSCCreateDispatchWSFTrueAndInvokeTest1() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
W3CEndpointReference myepr = port.getW3CEPR1();
dispatchSrc = createDispatchSource(myepr, wsftrue);
Source requestMsg = JAXWS_Util.makeSource(doAddNumbersRequest, "StreamSource");
@@ -342,6 +377,11 @@
public void testEPRViaWSCCreateDispatchWSFTrueAndInvokeTest2() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
W3CEndpointReference myepr = port.getW3CEPR2();
dispatchSrc = createDispatchSource(myepr, wsftrue);
Source requestMsg = JAXWS_Util.makeSource(doAddNumbersRequest, "StreamSource");
@@ -373,6 +413,11 @@
@SuppressWarnings("unchecked")
public void testEPRViaWSCCreateJAXBDispatchWSFTrueAndInvokeTest1() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
W3CEndpointReference myepr = port.getW3CEPR1();
ObjectFactory of = new ObjectFactory();
DoAddNumbers numbers = of.createDoAddNumbers();
@@ -410,6 +455,11 @@
public void testEPRViaBPCreateDispatchWSFTrueAndInvokeTest1() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
W3CEndpointReference myepr = (W3CEndpointReference) bp.getEndpointReference();
dispatchSrc = createDispatchSource(myepr, wsftrue);
Source requestMsg = JAXWS_Util.makeSource(doAddNumbersRequest, "StreamSource");
@@ -424,6 +474,11 @@
public void testEPRViaBPCreateDispatchWSFTrueAndInvokeTest2() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
W3CEndpointReference myepr = (W3CEndpointReference) bp.getEndpointReference(W3CEndpointReference.class);
dispatchSM = createDispatchSOAPMessage(myepr, wsftrue);
SOAPMessage requestMsg = JAXWS_Util.makeSOAPMessage(doAddNumbersRequestSM);
@@ -455,6 +510,11 @@
@SuppressWarnings("unchecked")
public void testEPRViaBPCreateJAXBDispatchWSFTrueAndInvokeTest1() throws Exception
{
+ if (isTargetJBoss5())
+ {
+ System.out.println("FIXME: [JBWS-2917] patched Xalan required for properly dealing with namespaces");
+ return;
+ }
W3CEndpointReference myepr = (W3CEndpointReference) bp.getEndpointReference(W3CEndpointReference.class);
ObjectFactory of = new ObjectFactory();
DoAddNumbers numbers = of.createDoAddNumbers();
14 years, 3 months
JBossWS SVN: r12962 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-09-13 08:35:37 -0400 (Mon, 13 Sep 2010)
New Revision: 12962
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceRefBinderJAXWS.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java
Log:
[JBWS-3122] since now @WebServiceRef respects @Addressing, @MTOM & @RespectBinding annotations
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceRefBinderJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceRefBinderJAXWS.java 2010-09-13 12:34:26 UTC (rev 12961)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/NativeServiceRefBinderJAXWS.java 2010-09-13 12:35:37 UTC (rev 12962)
@@ -35,12 +35,14 @@
import javax.naming.NamingException;
import javax.naming.Referenceable;
import javax.xml.namespace.QName;
+import javax.xml.ws.RespectBinding;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
import javax.xml.ws.soap.Addressing;
import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.MTOM;
import org.jboss.logging.Logger;
import org.jboss.util.naming.Util;
@@ -68,17 +70,33 @@
// Build the list of @WebServiceRef relevant annotations
List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
- Addressing addressing = null;
+ Addressing addressingAnnotation = null;
+ MTOM mtomAnnotation = null;
+ RespectBinding respectBindingAnnotation = null;
if (anElement != null)
{
for (Annotation an : anElement.getAnnotations())
{
- if (an instanceof Addressing)
- addressing = (Addressing)an;
+ if (an instanceof Addressing) {
+ addressingAnnotation = (Addressing)an;
+ continue;
+ }
- if (an instanceof WebServiceRef)
+ if (an instanceof MTOM) {
+ mtomAnnotation = (MTOM)an;
+ continue;
+ }
+
+ if (an instanceof RespectBinding) {
+ respectBindingAnnotation = (RespectBinding)an;
+ continue;
+ }
+
+ if (an instanceof WebServiceRef) {
wsrefList.add((WebServiceRef)an);
+ continue;
+ }
if (an instanceof WebServiceRefs)
{
@@ -89,22 +107,31 @@
}
}
- if (addressing != null)
+ if (addressingAnnotation != null)
{
- if (addressing.enabled())
+ if (addressingAnnotation.enabled())
serviceRef.setAddressingEnabled();
- if (addressing.required())
+ if (addressingAnnotation.required())
serviceRef.setAddressingRequired();
- if (addressing.responses() == AddressingFeature.Responses.ANONYMOUS)
+ if (addressingAnnotation.responses() == AddressingFeature.Responses.ANONYMOUS)
serviceRef.setAddressingResponses("ANONYMOUS");
- else if (addressing.responses() == AddressingFeature.Responses.NON_ANONYMOUS)
+ else if (addressingAnnotation.responses() == AddressingFeature.Responses.NON_ANONYMOUS)
serviceRef.setAddressingResponses("NON_ANONYMOUS");
else
serviceRef.setAddressingResponses("ALL");
}
+
+ if ((mtomAnnotation != null) && mtomAnnotation.enabled()) {
+ serviceRef.setMtomEnabled();
+ serviceRef.setMtomThreshold(mtomAnnotation.threshold());
+ }
+ if ((respectBindingAnnotation != null) && respectBindingAnnotation.enabled()) {
+ serviceRef.setRespectBindingEnabled();
+ }
+
// Use the single @WebServiceRef
if (wsrefList.size() == 1)
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java 2010-09-13 12:34:26 UTC (rev 12961)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactoryJAXWS.java 2010-09-13 12:35:37 UTC (rev 12962)
@@ -29,9 +29,11 @@
import javax.naming.*;
import javax.xml.namespace.QName;
+import javax.xml.ws.RespectBindingFeature;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.MTOMFeature;
import java.io.ByteArrayInputStream;
import java.io.IOException;
@@ -41,6 +43,8 @@
import java.lang.reflect.Method;
import java.net.URL;
import java.util.Hashtable;
+import java.util.LinkedList;
+import java.util.List;
/**
* This ServiceObjectFactory reconstructs a javax.xml.ws.Service
@@ -113,13 +117,10 @@
if (log.isDebugEnabled())
log.debug("Loaded Service '" + serviceClass.getName() + "' from: " + serviceClass.getProtectionDomain().getCodeSource());
- // Receives either a javax.xml.ws.Service or a dynamic proxy
- Object target;
+ List<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
- // configure addressing
- AddressingFeature addressingFeature = null;
+ // configure addressing feature
if (serviceRef.isAddressingEnabled()) {
- final boolean enabled = serviceRef.isAddressingEnabled();
final boolean required = serviceRef.isAddressingRequired();
final String refResponses = serviceRef.getAddressingResponses();
AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
@@ -127,11 +128,24 @@
responses = AddressingFeature.Responses.ANONYMOUS;
if ("NON_ANONYMOUS".equals(refResponses))
responses = AddressingFeature.Responses.NON_ANONYMOUS;
- addressingFeature = new AddressingFeature(enabled, required, responses);
+
+ features.add(new AddressingFeature(true, required, responses));
}
- // Get the URL to the wsdl
+ // configure MTOM feature
+ if (serviceRef.isMtomEnabled()) {
+ features.add(new MTOMFeature(true, serviceRef.getMtomThreshold()));
+ }
+
+ // configure respect binding feature
+ if (serviceRef.isRespectBindingEnabled()) {
+ features.add(new RespectBindingFeature(true));
+ }
+
+ // Receives either a javax.xml.ws.Service or a dynamic proxy
+ Object target;
URL wsdlURL = serviceRef.getWsdlLocation();
+ WebServiceFeature[] wsFeatures = features.size() == 0 ? null : features.toArray(new WebServiceFeature[] {});
try
{
// Associate the ServiceRefMetaData with this thread
@@ -142,8 +156,8 @@
{
if (wsdlURL != null)
{
- if (addressingFeature != null) {
- target = Service.create(wsdlURL, serviceQName, new WebServiceFeature[] { addressingFeature });
+ if (wsFeatures != null) {
+ target = Service.create(wsdlURL, serviceQName, wsFeatures);
} else {
target = Service.create(wsdlURL, serviceQName);
}
@@ -158,9 +172,9 @@
{
if (wsdlURL != null)
{
- if (addressingFeature != null) {
+ if (wsFeatures != null) {
Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class, WebServiceFeature[].class });
- target = ctor.newInstance(new Object[] { wsdlURL, serviceQName, new WebServiceFeature[] { addressingFeature } });
+ target = ctor.newInstance(new Object[] { wsdlURL, serviceQName, wsFeatures });
} else {
Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
target = ctor.newInstance(new Object[] { wsdlURL, serviceQName });
@@ -168,9 +182,9 @@
}
else
{
- if (addressingFeature != null) {
+ if (wsFeatures != null) {
Constructor ctor = serviceClass.getConstructor(new Class[] { WebServiceFeature[].class });
- target = ctor.newInstance(new Object[] { new WebServiceFeature[] { addressingFeature } });
+ target = ctor.newInstance(new Object[] { wsFeatures });
} else {
target = (Service)serviceClass.newInstance();
}
14 years, 3 months
JBossWS SVN: r12961 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-09-13 08:34:26 -0400 (Mon, 13 Sep 2010)
New Revision: 12961
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefBinderJAXWS.java
Log:
[JBWS-3122] since now @WebServiceRef respects @Addressing, @MTOM & @RespectBinding annotations
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java 2010-09-13 12:31:24 UTC (rev 12960)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java 2010-09-13 12:34:26 UTC (rev 12961)
@@ -29,6 +29,8 @@
import java.lang.reflect.Method;
import java.net.URL;
import java.util.Hashtable;
+import java.util.LinkedList;
+import java.util.List;
import javax.naming.Context;
import javax.naming.Name;
@@ -37,9 +39,11 @@
import javax.naming.Reference;
import javax.naming.spi.ObjectFactory;
import javax.xml.namespace.QName;
+import javax.xml.ws.RespectBindingFeature;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.MTOMFeature;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
@@ -138,13 +142,10 @@
if (Service.class.isAssignableFrom(serviceClass) == false)
throw new IllegalArgumentException("WebServiceRef type '" + serviceClass + "' is not assignable to javax.xml.ws.Service");
- // Receives either a javax.xml.ws.Service or a dynamic proxy
- Object target;
-
- // configure addressing
- AddressingFeature addressingFeature = null;
+ List<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
+
+ // configure @Addressing feature
if (serviceRef.isAddressingEnabled()) {
- final boolean enabled = serviceRef.isAddressingEnabled();
final boolean required = serviceRef.isAddressingRequired();
final String refResponses = serviceRef.getAddressingResponses();
AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
@@ -152,19 +153,31 @@
responses = AddressingFeature.Responses.ANONYMOUS;
if ("NON_ANONYMOUS".equals(refResponses))
responses = AddressingFeature.Responses.NON_ANONYMOUS;
- addressingFeature = new AddressingFeature(enabled, required, responses);
+
+ features.add(new AddressingFeature(true, required, responses));
}
- // Get the URL to the wsdl
+ // configure @MTOM feature
+ if (serviceRef.isMtomEnabled()) {
+ features.add(new MTOMFeature(true, serviceRef.getMtomThreshold()));
+ }
+
+ // configure @RespectBinding feature
+ if (serviceRef.isRespectBindingEnabled()) {
+ features.add(new RespectBindingFeature(true));
+ }
+
+ // Receives either a javax.xml.ws.Service or a dynamic proxy
+ Object target;
URL wsdlURL = serviceRef.getWsdlLocation();
-
+ WebServiceFeature[] wsFeatures = features.size() == 0 ? null : features.toArray(new WebServiceFeature[] {});
// Generic javax.xml.ws.Service
if (serviceClass == Service.class)
{
if (wsdlURL != null)
{
- if (addressingFeature != null) {
- target = Service.create(wsdlURL, serviceQName, new WebServiceFeature[] { addressingFeature });
+ if (wsFeatures != null) {
+ target = Service.create(wsdlURL, serviceQName, wsFeatures);
} else {
target = Service.create(wsdlURL, serviceQName);
}
@@ -179,9 +192,9 @@
{
if (wsdlURL != null)
{
- if (addressingFeature != null) {
+ if (wsFeatures != null) {
Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class, WebServiceFeature[].class });
- target = ctor.newInstance(new Object[] { wsdlURL, serviceQName, new WebServiceFeature[] { addressingFeature } });
+ target = ctor.newInstance(new Object[] { wsdlURL, serviceQName, wsFeatures });
} else {
Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
target = ctor.newInstance(new Object[] { wsdlURL, serviceQName });
@@ -189,9 +202,9 @@
}
else
{
- if (addressingFeature != null) {
+ if (wsFeatures != null) {
Constructor ctor = serviceClass.getConstructor(new Class[] { WebServiceFeature[].class });
- target = ctor.newInstance(new Object[] { new WebServiceFeature[] { addressingFeature } });
+ target = ctor.newInstance(new Object[] { wsFeatures });
} else {
target = (Service)serviceClass.newInstance();
}
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefBinderJAXWS.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefBinderJAXWS.java 2010-09-13 12:31:24 UTC (rev 12960)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefBinderJAXWS.java 2010-09-13 12:34:26 UTC (rev 12961)
@@ -35,12 +35,14 @@
import javax.naming.NamingException;
import javax.naming.Referenceable;
import javax.xml.namespace.QName;
+import javax.xml.ws.RespectBinding;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
import javax.xml.ws.soap.Addressing;
import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.MTOM;
import org.jboss.logging.Logger;
import org.jboss.util.naming.Util;
@@ -67,17 +69,33 @@
// Build the list of @WebServiceRef relevant annotations
List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
- Addressing addressing = null;
+ Addressing addressingAnnotation = null;
+ MTOM mtomAnnotation = null;
+ RespectBinding respectBindingAnnotation = null;
if (anElement != null)
{
for (Annotation an : anElement.getAnnotations())
{
- if (an instanceof Addressing)
- addressing = (Addressing)an;
+ if (an instanceof Addressing) {
+ addressingAnnotation = (Addressing)an;
+ continue;
+ }
- if (an instanceof WebServiceRef)
+ if (an instanceof MTOM) {
+ mtomAnnotation = (MTOM)an;
+ continue;
+ }
+
+ if (an instanceof RespectBinding) {
+ respectBindingAnnotation = (RespectBinding)an;
+ continue;
+ }
+
+ if (an instanceof WebServiceRef) {
wsrefList.add((WebServiceRef)an);
+ continue;
+ }
if (an instanceof WebServiceRefs)
{
@@ -88,22 +106,31 @@
}
}
- if (addressing != null)
+ if (addressingAnnotation != null)
{
- if (addressing.enabled())
+ if (addressingAnnotation.enabled())
serviceRef.setAddressingEnabled();
- if (addressing.required())
+ if (addressingAnnotation.required())
serviceRef.setAddressingRequired();
- if (addressing.responses() == AddressingFeature.Responses.ANONYMOUS)
+ if (addressingAnnotation.responses() == AddressingFeature.Responses.ANONYMOUS)
serviceRef.setAddressingResponses("ANONYMOUS");
- else if (addressing.responses() == AddressingFeature.Responses.NON_ANONYMOUS)
+ else if (addressingAnnotation.responses() == AddressingFeature.Responses.NON_ANONYMOUS)
serviceRef.setAddressingResponses("NON_ANONYMOUS");
else
serviceRef.setAddressingResponses("ALL");
}
+
+ if ((mtomAnnotation != null) && mtomAnnotation.enabled()) {
+ serviceRef.setMtomEnabled();
+ serviceRef.setMtomThreshold(mtomAnnotation.threshold());
+ }
+ if ((respectBindingAnnotation != null) && respectBindingAnnotation.enabled()) {
+ serviceRef.setRespectBindingEnabled();
+ }
+
// Use the single @WebServiceRef
if (wsrefList.size() == 1)
{
14 years, 3 months