JBossWS SVN: r17923 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-17 03:27:52 -0400 (Tue, 17 Sep 2013)
New Revision: 17923
Added:
stack/cxf/branches/jbossws-4.2.1.Final/
Log:
Branching for jbossws 4.2.1.Final
11 years, 6 months
JBossWS SVN: r17922 - stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-16 09:03:35 -0400 (Mon, 16 Sep 2013)
New Revision: 17922
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807/JBWS1807TestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807/ProviderImpl.java
Log:
[JBWS-3705] Fixing broken testcase
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807/JBWS1807TestCase.…
[View More]java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807/JBWS1807TestCase.java 2013-09-16 08:48:14 UTC (rev 17921)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807/JBWS1807TestCase.java 2013-09-16 13:03:35 UTC (rev 17922)
@@ -72,10 +72,10 @@
service.addPort(portName, HTTPBinding.HTTP_BINDING, TARGET_ENDPOINT_ADDRESS);
Dispatch<Source> dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD);
- Source resPayload = dispatch.invoke(new DOMSource(DOMUtils.parse("<input>hello</input>")));
+ Source resPayload = dispatch.invoke(new DOMSource(DOMUtils.parse("<ns2:input xmlns:ns2='http://ws.com/'><arg0>hello</arg0></ns2:input>")));
Element docElement = DOMUtils.sourceToElement(resPayload);
- Element response = ((Element)DOMUtils.getChildElements(docElement, "input").next());
+ Element response = ((Element)DOMUtils.getChildElements(docElement, "return").next());
assertEquals("hello", response.getTextContent());
}
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807/ProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807/ProviderImpl.java 2013-09-16 08:48:14 UTC (rev 17921)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1807/ProviderImpl.java 2013-09-16 13:03:35 UTC (rev 17922)
@@ -39,6 +39,7 @@
import org.jboss.logging.Logger;
import org.jboss.test.helper.DOMWriter;
import org.jboss.ws.api.util.DOMUtils;
+import org.w3c.dom.Element;
@WebServiceProvider(wsdlLocation = "WEB-INF/wsdl/provider.wsdl", portName = "ProviderPort", serviceName = "ProviderService", targetNamespace = "http://ws.com/")
@ServiceMode(value = Service.Mode.PAYLOAD)
@@ -52,10 +53,12 @@
{
try
{
- String input = DOMWriter.printNode(DOMUtils.sourceToElement(source, getDocumentBuilder()), false);
+ Element elem = DOMUtils.sourceToElement(source, getDocumentBuilder());
+ String value = DOMUtils.getChildElements(elem, "arg0", true).next().getTextContent();
+ String input = DOMWriter.printNode(elem, false);
log.info("invoke: " + input);
- String reply = "<reply>" + input + "</reply>";
+ String reply = "<myns:reply xmlns:myns='http://ws.com/'><return>" + value + "</return></myns:reply>";
return new StreamSource(new ByteArrayInputStream(reply.getBytes()));
}
catch (IOException ex)
[View Less]
11 years, 6 months
JBossWS SVN: r17921 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-16 04:48:14 -0400 (Mon, 16 Sep 2013)
New Revision: 17921
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Fixing exclude jira ref
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-16 08:43:48 UTC (rev 17920)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-16 08:48:14 UTC (rev 17921)
@@ -873,7 +873,7 @@
&…
[View More]lt;!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
- <!-- # [WFLY-2019] Upgrade PicketLink to 2.5.1.Final incomplete (missing org.picketlink module) -->
+ <!-- # [WFLY-2077] Upgrade PicketLink to 2.5.1.Final incomplete (missing org.picketlink module) -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
<!-- Manually setup KDC before run this test-->
[View Less]
11 years, 6 months
JBossWS SVN: r17920 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-16 04:43:48 -0400 (Mon, 16 Sep 2013)
New Revision: 17920
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-3688] Move to cxf 2.7.7
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-09-13 14:39:33 UTC (rev 17919)
+++ stack/cxf/trunk/pom.xml 2013-09-16 08:43:48 UTC (rev 17920)
@@ -72,7 +72,7 @@
<jboss720.version>7.2.0.Final</jboss720.version>
<wildfly800.…
[View More]version>8.0.0.Beta1-SNAPSHOT</wildfly800.version>
<ejb.api.version>1.0.1.Final</ejb.api.version>
- <cxf.version>2.7.7-SNAPSHOT</cxf.version>
+ <cxf.version>2.7.7</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.6.1</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
@@ -104,7 +104,7 @@
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
<xmlsec.version>1.5.5</xmlsec.version>
- <wss4j.version>1.6.11</wss4j.version>
+ <wss4j.version>1.6.12</wss4j.version>
<wstx.version>4.2.0</wstx.version>
<spring.version>3.0.7.RELEASE</spring.version>
</properties>
[View Less]
11 years, 6 months
JBossWS SVN: r17919 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-13 10:39:33 -0400 (Fri, 13 Sep 2013)
New Revision: 17919
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[CXF-5197] Removing exclusions
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-13 14:33:16 UTC (rev 17918)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-13 14:39:33 UTC (rev 17919)
@@ -669,10 +669,6 @@
…
[View More] <!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
- <!--# [CXF-5197] No Java extensionType found to represent {http://www.w3.org/2006/05/addressing/wsdl}UsingAddressing -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase*</exclude>
-
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -743,10 +739,6 @@
<!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
- <!--# [CXF-5197] No Java extensionType found to represent {http://www.w3.org/2006/05/addressing/wsdl}UsingAddressing -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase*</exclude>
-
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -814,10 +806,6 @@
<!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
- <!--# [CXF-5197] No Java extensionType found to represent {http://www.w3.org/2006/05/addressing/wsdl}UsingAddressing -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase*</exclude>
-
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
</excludes>
@@ -885,10 +873,6 @@
<!--# [JBWS-3679] @WebServiceRef injection of co-located client with no specified wsdlLocation is not working -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3679/**</exclude>
- <!--# [CXF-5197] No Java extensionType found to represent {http://www.w3.org/2006/05/addressing/wsdl}UsingAddressing -->
- <exclude>org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase*</exclude>
-
<!-- # [WFLY-2019] Upgrade PicketLink to 2.5.1.Final incomplete (missing org.picketlink module) -->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
[View Less]
11 years, 6 months
JBossWS SVN: r17918 - in stack/cxf/trunk/modules/testsuite: cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-13 10:33:16 -0400 (Fri, 13 Sep 2013)
New Revision: 17918
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[WFLY-2019] Excluding PicketLink STS test because upgrade in WFLY master is incomplete and modifying picketlink-sts.xml to workaround a backward compatibility issue in PL
Modified: stack/cxf/trunk/modules/testsuite/cxf-…
[View More]tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml 2013-09-13 06:53:02 UTC (rev 17917)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/trust/WEB-INF/picketlink-sts.xml 2013-09-13 14:33:16 UTC (rev 17918)
@@ -17,4 +17,10 @@
TokenElement="Assertion"
TokenElementNS="urn:oasis:names:tc:SAML:2.0:assertion"/>
</TokenProviders>
+ <!-- Erroneously mandatory element below (in PLINK 2.1.8.Final / 2.5.1.Final) -->
+ <ServiceProviders>
+ <ServiceProvider Endpoint="http://localhost:8080/jaxws-samples-wsse-policy-trust/SecurityService"
+ TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"
+ TruststoreAlias="myservicekey"/>
+ </ServiceProviders>
</PicketLinkSTS>
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-13 06:53:02 UTC (rev 17917)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-13 14:33:16 UTC (rev 17918)
@@ -888,6 +888,9 @@
<!--# [CXF-5197] No Java extensionType found to represent {http://www.w3.org/2006/05/addressing/wsdl}UsingAddressing -->
<exclude>org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase*</exclude>
+
+ <!-- # [WFLY-2019] Upgrade PicketLink to 2.5.1.Final incomplete (missing org.picketlink module) -->
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
<!-- Manually setup KDC before run this test-->
<exclude>org/jboss/test/ws/jaxws/samples/wsse/kerberos/*TestCase*</exclude>
[View Less]
11 years, 6 months
JBossWS SVN: r17917 - thirdparty/cxf/branches/cxf-2.6.6.jbossorg-1-bz-1004624/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2013-09-13 02:53:02 -0400 (Fri, 13 Sep 2013)
New Revision: 17917
Modified:
thirdparty/cxf/branches/cxf-2.6.6.jbossorg-1-bz-1004624/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java
Log:
[BZ1004624] Fixing signed SAML assertion validation error w/ SupportingTokens only policy, also adding some additional checks
Modified: thirdparty/cxf/branches/cxf-2.6.6.jbossorg-1-bz-1004624/rt/ws/security/src/main/java/org/apache/cxf/ws/security/…
[View More]wss4j/SamlTokenInterceptor.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.6.6.jbossorg-1-bz-1004624/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java 2013-09-13 06:44:16 UTC (rev 17916)
+++ thirdparty/cxf/branches/cxf-2.6.6.jbossorg-1-bz-1004624/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/SamlTokenInterceptor.java 2013-09-13 06:53:02 UTC (rev 17917)
@@ -23,6 +23,7 @@
import java.io.InputStream;
import java.net.URL;
import java.security.Principal;
+import java.security.cert.Certificate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -45,6 +46,7 @@
import org.apache.cxf.message.MessageUtils;
import org.apache.cxf.resource.ResourceManager;
import org.apache.cxf.security.SecurityContext;
+import org.apache.cxf.security.transport.TLSSessionInfo;
import org.apache.cxf.ws.policy.AssertionInfo;
import org.apache.cxf.ws.policy.AssertionInfoMap;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -113,6 +115,33 @@
}
assertTokens(message, SP12Constants.SAML_TOKEN, signed);
+ // Check version against policy
+ AssertionInfoMap aim = message.get(AssertionInfoMap.class);
+ for (AssertionInfo ai : aim.getAssertionInfo(SP12Constants.SAML_TOKEN)) {
+ SamlToken samlToken = (SamlToken)ai.getAssertion();
+ for (WSSecurityEngineResult result : samlResults) {
+ AssertionWrapper assertionWrapper =
+ (AssertionWrapper)result.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
+
+ if (!checkVersion(samlToken, assertionWrapper)) {
+ ai.setNotAsserted("Wrong SAML Version");
+ }
+
+ TLSSessionInfo tlsInfo = message.get(TLSSessionInfo.class);
+ Certificate[] tlsCerts = null;
+ if (tlsInfo != null) {
+ tlsCerts = tlsInfo.getPeerCertificates();
+ }
+ if (!SAMLUtils.checkHolderOfKey(assertionWrapper, null, tlsCerts)) {
+ ai.setNotAsserted("Assertion fails holder-of-key requirements");
+ continue;
+ }
+ if (!SAMLUtils.checkSenderVouches(assertionWrapper, tlsCerts, null, null)) {
+ ai.setNotAsserted("Assertion fails sender-vouches requirements");
+ continue;
+ }
+ }
+ }
Principal principal =
(Principal)samlResults.get(0).get(WSSecurityEngineResult.TAG_PRINCIPAL);
message.put(WSS4JInInterceptor.PRINCIPAL_RESULT, principal);
@@ -168,6 +197,8 @@
};
data.setWssConfig(WSSConfig.getNewInstance());
+ data.setSigCrypto(getCrypto(null, SecurityConstants.SIGNATURE_CRYPTO,
+ SecurityConstants.SIGNATURE_PROPERTIES, message));
SAMLTokenProcessor p = new SAMLTokenProcessor();
List<WSSecurityEngineResult> results =
p.handleToken(tokenElement, data, wsDocInfo);
@@ -339,4 +370,19 @@
return crypto;
}
+ /**
+ * Check the policy version against the received assertion
+ */
+ private boolean checkVersion(SamlToken samlToken, AssertionWrapper assertionWrapper) {
+ if ((samlToken.isUseSamlVersion11Profile10()
+ || samlToken.isUseSamlVersion11Profile11())
+ && assertionWrapper.getSamlVersion() != SAMLVersion.VERSION_11) {
+ return false;
+ } else if (samlToken.isUseSamlVersion20Profile11()
+ && assertionWrapper.getSamlVersion() != SAMLVersion.VERSION_20) {
+ return false;
+ }
+ return true;
+ }
+
}
[View Less]
11 years, 6 months
JBossWS SVN: r17916 - thirdparty/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2013-09-13 02:44:16 -0400 (Fri, 13 Sep 2013)
New Revision: 17916
Added:
thirdparty/cxf/branches/cxf-2.6.6.jbossorg-1-bz-1004624/
Log:
Creating one off branch
11 years, 6 months
JBossWS SVN: r17915 - in thirdparty/cxf/branches/cxf-2.2.12: systests/uncategorized/src/test/java/org/apache/cxf/systest and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: klape
Date: 2013-09-11 14:56:24 -0400 (Wed, 11 Sep 2013)
New Revision: 17915
Added:
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/ExceptionType.java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/ExceptionTypeException.…
[View More]java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/Hello.java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloResponse.java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloWS.java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloWSClient.java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/MTOMProviderSchemaValidationTest.java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/Server.java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/TestProvider.java
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/cxf.xml
thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/resources/wsdl_systest/mtom_provider_validate.wsdl
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
Log:
[JBPAPP-10859] Schema validatation doesn't work in mtom enabled provider service. Used the fix that doesn't require msv-core.jar
Modified: thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java 2013-09-11 16:08:03 UTC (rev 17914)
+++ thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -38,6 +38,7 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
@@ -45,6 +46,7 @@
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.common.util.StringUtils;
import org.apache.cxf.databinding.DataReader;
+import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.io.CachedOutputStream;
import org.apache.cxf.message.Attachment;
@@ -176,13 +178,32 @@
private Element validate(XMLStreamReader input)
throws XMLStreamException, SAXException, IOException {
- DOMSource ds = read(input);
- schema.newValidator().validate(ds);
- Node nd = ds.getNode();
- if (nd instanceof Document) {
- return ((Document)nd).getDocumentElement();
+ DOMSource ds = read(input);
+ Element rootElement = null;
+ if (ds.getNode() instanceof Document) {
+ rootElement = ((Document)ds.getNode()).getDocumentElement();
+ } else {
+ rootElement = (Element)ds.getNode();
}
- return (Element)ds.getNode();
+ NodeList includeList =
+ rootElement.getElementsByTagNameNS("http://www.w3.org/2004/08/xop/include", "Include");
+ if (includeList.getLength() > 0) {
+ Element newElement = (Element)rootElement.cloneNode(true);
+ NodeList nodeList =
+ newElement.getElementsByTagNameNS("http://www.w3.org/2004/08/xop/include", "Include");
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Element include = (Element)nodeList.item(i);
+ Node parentNode = include.getParentNode();
+ parentNode.removeChild(include);
+ String cid = DOMUtils.getAttribute(include, "href");
+ //set the fake base64Binary to validate instead of reading the attachment from message
+ parentNode.setTextContent(javax.xml.bind.DatatypeConverter.printBase64Binary(cid.getBytes()));
+ }
+ schema.newValidator().validate(new DOMSource(newElement));
+ } else {
+ schema.newValidator().validate(ds);
+ }
+ return rootElement;
}
private InputStream getInputStream(XMLStreamReader input)
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/ExceptionType.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/ExceptionType.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/ExceptionType.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.mtom_schema_validation;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ExceptionType")
+public class ExceptionType {
+
+ protected String message;
+
+ /**
+ * Gets the value of the message property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/ExceptionTypeException.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/ExceptionTypeException.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/ExceptionTypeException.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.mtom_schema_validation;
+
+import javax.xml.ws.WebFault;
+@WebFault(name = "ExceptionType", targetNamespace = "http://cxf.apache.org/")
+public class ExceptionTypeException extends Exception {
+ public static final long serialVersionUID = 20130719154625L;
+
+ private ExceptionType exceptionType;
+
+ public ExceptionTypeException() {
+ super();
+ }
+
+ public ExceptionTypeException(String message) {
+ super(message);
+ }
+
+ public ExceptionTypeException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ExceptionTypeException(String message, ExceptionType exceptionType) {
+ super(message);
+ this.exceptionType = exceptionType;
+ }
+
+ public ExceptionTypeException(String message, ExceptionType exceptionType, Throwable cause) {
+ super(message, cause);
+ this.exceptionType = exceptionType;
+ }
+
+ public ExceptionType getFaultInfo() {
+ return this.exceptionType;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/Hello.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/Hello.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/Hello.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,109 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.mtom_schema_validation;
+
+import javax.activation.DataHandler;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlMimeType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for hello complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="hello">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="file" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "hello", propOrder = {
+ "arg0",
+ "file"
+ })
+public class Hello {
+
+ protected String arg0;
+ @XmlElement(required = true)
+ @XmlMimeType("application/octet-stream")
+ protected DataHandler file;
+
+ /**
+ * Gets the value of the arg0 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getArg0() {
+ return arg0;
+ }
+
+ /**
+ * Sets the value of the arg0 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setArg0(String value) {
+ this.arg0 = value;
+ }
+
+ /**
+ * Gets the value of the file property.
+ *
+ * @return
+ * possible object is
+ * {@link DataHandler }
+ *
+ */
+ public DataHandler getFile() {
+ return file;
+ }
+
+ /**
+ * Sets the value of the file property.
+ *
+ * @param value
+ * allowed object is
+ * {@link DataHandler }
+ *
+ */
+ public void setFile(DataHandler value) {
+ this.file = value;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloResponse.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloResponse.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloResponse.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.mtom_schema_validation;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for helloResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="helloResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "helloResponse")
+public class HelloResponse {
+
+ @XmlElement(name = "return")
+ protected String res;
+
+ /**
+ * Gets the value of the return property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getReturn() {
+ return res;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setReturn(String value) {
+ this.res = value;
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloWS.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloWS.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloWS.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.mtom_schema_validation;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(targetNamespace = "http://cxf.apache.org/", name = "HelloWS")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface HelloWS {
+
+ @WebResult(name = "helloResponse", targetNamespace = "http://cxf.apache.org/", partName = "parameters")
+ @WebMethod
+ HelloResponse hello(@WebParam(partName = "parameters",
+ name = "helloRequest",
+ targetNamespace = "http://cxf.apache.org/") Hello parameters)
+ throws ExceptionTypeException;
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloWSClient.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloWSClient.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/HelloWSClient.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.mtom_schema_validation;
+
+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.WebServiceFeature;
+
+@WebServiceClient(name = "HelloWS", targetNamespace = "http://cxf.apache.org/")
+public class HelloWSClient extends Service {
+ private QName portName = new QName("http://cxf.apache.org/", "hello");
+
+ public HelloWSClient(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ /**
+ * @return returns HelloWS
+ */
+ @WebEndpoint(name = "hello")
+ public HelloWS getHello() {
+ return super.getPort(portName, HelloWS.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 HelloWS
+ */
+ @WebEndpoint(name = "hello")
+ public HelloWS getHello(WebServiceFeature... features) {
+ return super.getPort(portName, HelloWS.class, features);
+ }
+
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/MTOMProviderSchemaValidationTest.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/MTOMProviderSchemaValidationTest.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/MTOMProviderSchemaValidationTest.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.mtom_schema_validation;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.activation.DataHandler;
+import javax.activation.FileDataSource;
+import javax.xml.namespace.QName;
+import javax.xml.ws.soap.MTOMFeature;
+
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public final class MTOMProviderSchemaValidationTest extends AbstractBusClientServerTestBase {
+ public static final String PORT = Server.PORT;
+
+ private final QName serviceName = new QName("http://cxf.apache.org/", "HelloWS");
+
+ @BeforeClass
+ public static void startservers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class, true));
+ }
+ @Test
+ public void testSchemaValidation() throws Exception {
+ HelloWS port = createService();
+ Hello request = new Hello();
+ request.setArg0("value");
+ URL wsdl = getClass().getResource("/wsdl_systest/mtom_provider_validate.wsdl");
+ File attachment = new File(wsdl.getFile());
+ request.setFile(new DataHandler(new FileDataSource(attachment)));
+ HelloResponse response = port.hello(request);
+ assertEquals("Hello CXF", response.getReturn());
+ }
+
+ private HelloWS createService() throws Exception {
+ URL wsdl = getClass().getResource("/wsdl_systest/mtom_provider_validate.wsdl");
+ assertNotNull(wsdl);
+
+ HelloWSClient service = new HelloWSClient(wsdl, serviceName);
+ assertNotNull(service);
+
+ HelloWS port = service.getHello(new MTOMFeature());
+
+ updateAddressPort(port, PORT);
+
+ return port;
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/Server.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/Server.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/Server.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.mtom_schema_validation;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+
+public class Server extends AbstractBusTestServerBase {
+ public static final String PORT = allocatePort(Server.class);
+ protected void run() {
+
+ System.setProperty("org.apache.cxf.bus.factory", "org.apache.cxf.bus.CXFBusFactory");
+ System.setProperty("cxf.config.file", "org/apache/cxf/systest/mtom_schema_validation/cxf.xml");
+
+ TestProvider implementor = new TestProvider();
+ Endpoint ep = Endpoint.create(implementor);
+ ((EndpointImpl)ep).setWsdlLocation("wsdl_systest/mtom_provider_validate.wsdl");
+ ep.publish("http://localhost:" + PORT + "/mtom/provider");
+ }
+
+ public static void main(String[] args) throws Exception {
+ try {
+ Server s = new Server();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/TestProvider.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/TestProvider.java (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/TestProvider.java 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.mtom_schema_validation;
+
+import java.io.StringReader;
+
+import javax.jws.soap.SOAPBinding;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.Provider;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceProvider;
+
+import org.xml.sax.InputSource;
+
+@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http")
+@ServiceMode(value = javax.xml.ws.Service.Mode.PAYLOAD)
+@WebServiceProvider(targetNamespace = "http://cxf.apache.org/", serviceName = "HelloWS", portName = "hello")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public class TestProvider implements Provider<SAXSource> {
+
+ private String successRsp = "<ns2:helloResponse xmlns:ns2=\"http://cxf.apache.org/\">"
+ + "<return>Hello CXF</return>" + "</ns2:helloResponse>";
+
+ public SAXSource invoke(SAXSource request) {
+ return new SAXSource(new InputSource(new StringReader(successRsp)));
+ }
+}
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/cxf.xml
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/cxf.xml (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/java/org/apache/cxf/systest/mtom_schema_validation/cxf.xml 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,23 @@
+<?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" xmlns:soap="http://cxf.apache.org/bindings/soap"
+ 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.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd">
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging />
+ </cxf:features>
+ </cxf:bus>
+ <jaxws:endpoint id="org.apache.cxf.systest.mtom_schema_validation.TestProvider" implementor="org.apache.cxf.systest.mtom_schema_validation.TestProvider"
+ wsdlLocation="classpath:/wsdl_systest/mtom_provider_validate.wsdl" xmlns:hello="http://cxf.apache.org/"
+ serviceName="hello:HelloWS" endpointName="hello:hello"
+ address="/mtom_schema_validation">
+ <jaxws:properties>
+ <entry key="schema-validation-enabled" value="true" />
+ <entry key="mtom-enabled" value="true" />
+ </jaxws:properties>
+ </jaxws:endpoint>
+</beans>
Added: thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/resources/wsdl_systest/mtom_provider_validate.wsdl
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/resources/wsdl_systest/mtom_provider_validate.wsdl (rev 0)
+++ thirdparty/cxf/branches/cxf-2.2.12/systests/uncategorized/src/test/resources/wsdl_systest/mtom_provider_validate.wsdl 2013-09-11 18:56:24 UTC (rev 17915)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://cxf.apache.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloWS" targetNamespace="http://cxf.apache.org/">
+ <wsdl:types>
+ <xs:schema xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://cxf.apache.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://cxf.apache.org/">
+ <xs:element name="helloRequest" type="tns:hello"/>
+ <xs:element name="helloResponse" type="tns:helloResponse"/>
+ <xs:complexType name="hello">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0" type="xs:string"/>
+ <xs:element name="file" type="xsd:base64Binary"
+ xmime:expectedContentTypes="application/octet-stream" />
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="helloResponse">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:element name="ExceptionType" type="tns:ExceptionType"/>
+ <xs:complexType name="ExceptionType">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="message" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </wsdl:types>
+ <wsdl:message name="helloResponse">
+ <wsdl:part element="tns:helloResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="hello">
+ <wsdl:part element="tns:helloRequest" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="ExceptionType">
+ <wsdl:part element="tns:ExceptionType" name="ExceptionType">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="HelloWSImpl">
+ <wsdl:operation name="hello">
+ <wsdl:input message="tns:hello" name="hello">
+ </wsdl:input>
+ <wsdl:output message="tns:helloResponse" name="helloResponse">
+ </wsdl:output>
+ <wsdl:fault message="tns:ExceptionType" name="ExceptionType">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="HelloWSSoapBinding" type="tns:HelloWSImpl">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="hello">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="hello">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="helloResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="ExceptionType">
+ <soap:fault name="ExceptionType" use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloWS">
+ <wsdl:port binding="tns:HelloWSSoapBinding" name="hello">
+ <soap:address location="http://localhost:9003/mtom/provider"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
[View Less]
11 years, 6 months
JBossWS SVN: r17914 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-09-11 12:08:03 -0400 (Wed, 11 Sep 2013)
New Revision: 17914
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3681] Adding exclude-integration-tests-BC-related and exclude-integration-tests-unlimited-strength-related maven profiles
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2013-09-11 14:50:25 UTC (rev 17913)
+++ stack/cxf/…
[View More]trunk/modules/testsuite/pom.xml 2013-09-11 16:08:03 UTC (rev 17914)
@@ -925,6 +925,64 @@
</profile>
<!--
+ Name: exclude-integration-tests-BC-related
+ Descr: Additional exclusions of integration tests which require installed JCE Provider Bouncy Castle (AS 7.x)
+ -->
+ <profile>
+ <id>exclude-integration-tests-BC-related</id>
+ <activation>
+ <property>
+ <name>exclude-integration-tests-BC-related</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes combine.children="append">
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+
+ <!--
+ Name: exclude-integration-tests-unlimited-strength-related
+ Descr: Additional exclusions of integration tests which require installed JCE Unlimited Strength Jurisdiction Policy Files
+ -->
+ <profile>
+ <id>exclude-integration-tests-unlimited-strength-related</id>
+ <activation>
+ <property>
+ <name>exclude-integration-tests-unlimited-strength-related</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes combine.children="append">
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples22xTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/oasis/WSSecurityPolicyExamples23xTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustPicketLinkTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/SignEncryptGCMTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
Name: no-jboss-bind-address
Descr: Set the default jboss.bind.address
[View Less]
11 years, 6 months