You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/04/05 19:16:44 UTC
[1/3] cxf git commit: [CXF-6919] For soap 1.2,
make sure the fault code is valid
Repository: cxf
Updated Branches:
refs/heads/3.1.x-fixes 0da892a50 -> 0ba98f03e
[CXF-6919] For soap 1.2, make sure the fault code is valid
# Conflicts:
# rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c0000572
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c0000572
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c0000572
Branch: refs/heads/3.1.x-fixes
Commit: c00005724b774580889fcdd1b75ca7e7dd762ccb
Parents: 0da892a
Author: Daniel Kulp <dk...@apache.org>
Authored: Wed Apr 5 11:29:05 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Apr 5 15:16:37 2017 -0400
----------------------------------------------------------------------
.../apache/cxf/binding/soap/saaj/SAAJUtils.java | 39 +++++++++++++-------
1 file changed, 25 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/c0000572/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
index f1abe19..0215519 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJUtils.java
@@ -21,12 +21,14 @@ package org.apache.cxf.binding.soap.saaj;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFault;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
+import org.apache.cxf.binding.soap.Soap12;
import org.apache.cxf.common.util.StringUtils;
/**
@@ -52,24 +54,33 @@ public final class SAAJUtils {
return m.getSOAPPart().getEnvelope().getBody();
}
}
+
public static void setFaultCode(SOAPFault f, QName code) throws SOAPException {
- try {
- f.setFaultCode(code);
- } catch (Throwable t) {
- int count = 1;
- String pfx = "fc1";
- while (!StringUtils.isEmpty(f.getNamespaceURI(pfx))) {
- count++;
- pfx = "fc" + count;
+ if (f.getNamespaceURI().equals(Soap12.SOAP_NAMESPACE)) {
+ try {
+ f.setFaultCode(code);
+ } catch (SOAPException ex) {
+ f.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);
+ f.appendFaultSubcode(code);
}
- if (code.getNamespaceURI() != null && !"".equals(code.getNamespaceURI())) {
- f.addNamespaceDeclaration(pfx, code.getNamespaceURI());
- } else {
- f.addNamespaceDeclaration(pfx, f.getNamespaceURI());
+ } else {
+ try {
+ f.setFaultCode(code);
+ } catch (Throwable t) {
+ int count = 1;
+ String pfx = "fc1";
+ while (!StringUtils.isEmpty(f.getNamespaceURI(pfx))) {
+ count++;
+ pfx = "fc" + count;
+ }
+ if (code.getNamespaceURI() != null && !"".equals(code.getNamespaceURI())) {
+ f.addNamespaceDeclaration(pfx, code.getNamespaceURI());
+ } else {
+ f.addNamespaceDeclaration(pfx, f.getNamespaceURI());
+ }
+ f.setFaultCode(pfx + ":" + code.getLocalPart());
}
- f.setFaultCode(pfx + ":" + code.getLocalPart());
}
-
}
public static SOAPElement adjustPrefix(SOAPElement e, String prefix) {
[2/3] cxf git commit: [CXF-6768] Add ws-addr schema to catalog for
offline support This closes #108
Posted by dk...@apache.org.
[CXF-6768] Add ws-addr schema to catalog for offline support
This closes #108
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d5359385
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d5359385
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d5359385
Branch: refs/heads/3.1.x-fixes
Commit: d535938537655219b208c34d3ff267fd945536be
Parents: c000057
Author: Nick Birnie <ni...@seebyte.com>
Authored: Tue Feb 16 17:15:03 2016 +0000
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Apr 5 15:16:39 2017 -0400
----------------------------------------------------------------------
.../main/resources/META-INF/jax-ws-catalog.xml | 7 +
.../apache/cxf/ws/discovery/wsdl/ws-addr.xsd | 137 +++++++++++++++++++
2 files changed, 144 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/d5359385/services/ws-discovery/ws-discovery-api/src/main/resources/META-INF/jax-ws-catalog.xml
----------------------------------------------------------------------
diff --git a/services/ws-discovery/ws-discovery-api/src/main/resources/META-INF/jax-ws-catalog.xml b/services/ws-discovery/ws-discovery-api/src/main/resources/META-INF/jax-ws-catalog.xml
new file mode 100644
index 0000000..c3c1540
--- /dev/null
+++ b/services/ws-discovery/ws-discovery-api/src/main/resources/META-INF/jax-ws-catalog.xml
@@ -0,0 +1,7 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
+ prefer="system">
+
+ <system
+ systemId="http://www.w3.org/2006/03/addressing/ws-addr.xsd"
+ uri="classpath:/org/apache/cxf/ws/discovery/wsdl/ws-addr.xsd"/>
+</catalog>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf/blob/d5359385/services/ws-discovery/ws-discovery-api/src/main/resources/org/apache/cxf/ws/discovery/wsdl/ws-addr.xsd
----------------------------------------------------------------------
diff --git a/services/ws-discovery/ws-discovery-api/src/main/resources/org/apache/cxf/ws/discovery/wsdl/ws-addr.xsd b/services/ws-discovery/ws-discovery-api/src/main/resources/org/apache/cxf/ws/discovery/wsdl/ws-addr.xsd
new file mode 100644
index 0000000..47362ed
--- /dev/null
+++ b/services/ws-discovery/ws-discovery-api/src/main/resources/org/apache/cxf/ws/discovery/wsdl/ws-addr.xsd
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ W3C XML Schema defined in the Web Services Addressing 1.0 specification
+ http://www.w3.org/TR/ws-addr-core
+
+ Copyright � 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C� Software License [1] in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+ $Id: ws-addr.xsd,v 1.2 2008/07/23 13:38:16 plehegar Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2005/08/addressing" targetNamespace="http://www.w3.org/2005/08/addressing" blockDefault="#all" elementFormDefault="qualified" finalDefault="" attributeFormDefault="unqualified">
+
+ <!-- Constructs from the WS-Addressing Core -->
+
+ <xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
+ <xs:complexType name="EndpointReferenceType" mixed="false">
+ <xs:sequence>
+ <xs:element name="Address" type="tns:AttributedURIType"/>
+ <xs:element ref="tns:ReferenceParameters" minOccurs="0"/>
+ <xs:element ref="tns:Metadata" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType"/>
+ <xs:complexType name="ReferenceParametersType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="Metadata" type="tns:MetadataType"/>
+ <xs:complexType name="MetadataType" mixed="false">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="MessageID" type="tns:AttributedURIType"/>
+ <xs:element name="RelatesTo" type="tns:RelatesToType"/>
+ <xs:complexType name="RelatesToType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum" use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:simpleType name="RelationshipTypeOpenEnum">
+ <xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="RelationshipType">
+ <xs:restriction base="xs:anyURI">
+ <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="From" type="tns:EndpointReferenceType"/>
+ <xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="To" type="tns:AttributedURIType"/>
+ <xs:element name="Action" type="tns:AttributedURIType"/>
+
+ <xs:complexType name="AttributedURIType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- Constructs from the WS-Addressing SOAP binding -->
+
+ <xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
+
+ <xs:simpleType name="FaultCodesOpenEnumType">
+ <xs:union memberTypes="tns:FaultCodesType xs:QName"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="FaultCodesType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:InvalidAddressingHeader"/>
+ <xs:enumeration value="tns:InvalidAddress"/>
+ <xs:enumeration value="tns:InvalidEPR"/>
+ <xs:enumeration value="tns:InvalidCardinality"/>
+ <xs:enumeration value="tns:MissingAddressInEPR"/>
+ <xs:enumeration value="tns:DuplicateMessageID"/>
+ <xs:enumeration value="tns:ActionMismatch"/>
+ <xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
+ <xs:enumeration value="tns:DestinationUnreachable"/>
+ <xs:enumeration value="tns:ActionNotSupported"/>
+ <xs:enumeration value="tns:EndpointUnavailable"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
+ <xs:complexType name="AttributedUnsignedLongType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedLong">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
+ <xs:complexType name="AttributedQNameType" mixed="false">
+ <xs:simpleContent>
+ <xs:extension base="xs:QName">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
+
+ <xs:element name="ProblemAction" type="tns:ProblemActionType"/>
+ <xs:complexType name="ProblemActionType" mixed="false">
+ <xs:sequence>
+ <xs:element ref="tns:Action" minOccurs="0"/>
+ <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+</xs:schema>
[3/3] cxf git commit: Recording .gitmergeinfo Changes
Posted by dk...@apache.org.
Recording .gitmergeinfo Changes
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0ba98f03
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0ba98f03
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0ba98f03
Branch: refs/heads/3.1.x-fixes
Commit: 0ba98f03e5d817f707bfde0d130a5385ed823c84
Parents: d535938
Author: Daniel Kulp <dk...@apache.org>
Authored: Wed Apr 5 15:16:39 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Apr 5 15:16:39 2017 -0400
----------------------------------------------------------------------
.gitmergeinfo | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/0ba98f03/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 341ae4c..0f5029e 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -93,6 +93,7 @@ B 447f2dac6e160b5cd495558ca8855ed481396c63
B 44c608c205fd2fdac2f2fed9557c2c39730a44d6
B 45bc2219b761e671973acf297e0f37a1b8934c6c
B 46438c487115889c4cadd86f70fd4109a0daa2b8
+B 46bd4b3e9b8365b5afe2310ba6225eb6c2abad12
B 4786e832573f1fcc07ed190ab21fdb2820348e4d
B 47a431412dbd7669d89a70d6fed49053e70dfed1
B 4a30203a08ea11f96b52b454220ed5ce9419e3be
@@ -126,6 +127,7 @@ B 5a57f4a89737a5cfa37ffb94f6643c08e2ab6eb1
B 5d73e20b4539bfa4c8ca607b27a1c1ea1850e095
B 5e068d215b750e3211aaaf3d0b7b366d6a220fc2
B 604167d9f0cfc67e01219a19a95353176ce38f79
+B 61a361610d57aaf18f2c574916621ac09af45151
B 62060f8bc1f4d85b77ff136cb0576049312b8541
B 629af817f4762a12623e76fb7f7baefe98482719
B 63daada33c83c7900d5678ad495a0e764b3506de
@@ -199,6 +201,7 @@ B 9bb1148e093b5293454cd978673f5526443d1f55
B 9bcde744c2ad59a67c278d155f2ba22e35bacb7d
B 9c7ccd5cc10b1d4a6f1817a6c37c99b8f19d15a1
B 9f39272a5f92c8bc27a8d3adc4da89f0eb30a54b
+B 9f82ccd9d9a6f7db5b555c4040c41faf177f8e0b
B a05d75086453fa18ca4f4733f7cc8819693c786b
B a219766354d6aee53c7f7a4da91f434af552b437
B a261507ebd3104b1a00298801ec9815ed1e7a728
@@ -371,6 +374,7 @@ M 20d0a2811c15cb65a402eb063e1359236d7014ea
M 21031e3ab2ae227540e2a078d0336d894361acba
M 2538ae42fb0c774023deed5264291b2fe6658cb8
M 26edcd457ea507075a4c82e2787f11f11a432876
+M 29af9d48cee34521fcc9bc27a79d15f5781916a9
M 2b1607831ccf97909122eae9247116d9a075c7cf
M 2e8219cf3d047abc3a7e2611bf284aadbc20b7d6
M 2ea81b5f7dd84d4d179a2d9ac77c5660a8aeb3c9