You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2019/07/02 18:57:11 UTC

[cxf] branch 3.2.x-fixes updated (7f6545b -> 7c891e4)

This is an automated email from the ASF dual-hosted git repository.

ffang pushed a change to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from 7f6545b  Recording .gitmergeinfo Changes
     new f4d0df8  [CXF-8062]test to demonstrate MessageContext.HTTP_RESPONSE_CODE can be obtained if response code is not 200
     new f6f5786  [CXF-8062]be able to set HTTP return code even it's 4xx
     new 7c891e4  Recording .gitmergeinfo Changes

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitmergeinfo                                                        | 2 ++
 core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java           | 5 +++++
 .../src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java | 4 ++++
 3 files changed, 11 insertions(+)


[cxf] 01/03: [CXF-8062]test to demonstrate MessageContext.HTTP_RESPONSE_CODE can be obtained if response code is not 200

Posted by ff...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit f4d0df85a6cab604a044b22354a7cdc77ef083d9
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Fri Jun 28 12:38:38 2019 -0400

    [CXF-8062]test to demonstrate MessageContext.HTTP_RESPONSE_CODE can be obtained if response code is not 200
    
    (cherry picked from commit d4a28ed9d3d1f136263565516accfae9366c41b2)
---
 .../src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
index 18cef94..76dfe5b 100644
--- a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
+++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
@@ -48,6 +48,7 @@ import javax.xml.ws.Endpoint;
 import javax.xml.ws.Response;
 import javax.xml.ws.Service;
 import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.soap.SOAPFaultException;
 
 import org.w3c.dom.Document;
@@ -720,6 +721,9 @@ public class ClientServerTest extends AbstractBusClientServerTestBase {
                 greeter.testDocLitFault(noSuchCodeFault);
                 fail("Should have thrown NoSuchCodeLitFault exception");
             } catch (NoSuchCodeLitFault nslf) {
+                int responseCode = (Integer) ((BindingProvider) greeter).getResponseContext().get(
+                    MessageContext.HTTP_RESPONSE_CODE);
+                assertEquals(responseCode, 500);
                 assertNotNull(nslf.getFaultInfo());
                 assertNotNull(nslf.getFaultInfo().getCode());
             }


[cxf] 02/03: [CXF-8062]be able to set HTTP return code even it's 4xx

Posted by ff...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit f6f5786ce1c19b400e0426765be469366f5a5f8f
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Tue Jul 2 14:55:04 2019 -0400

    [CXF-8062]be able to set HTTP return code even it's 4xx
    
    (cherry picked from commit 55fff5e59e1cc1015507842e0177d7b083ea4795)
---
 core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java b/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
index eb2df49..3b4c38a 100644
--- a/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
+++ b/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
@@ -38,6 +38,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -539,6 +540,10 @@ public class ClientImpl
             }
             return processResult(message, exchange, oi, resContext);
         } finally {
+            //ensure ResponseContext has HTTP RESPONSE CODE
+            Integer responseCode = (Integer)exchange.get(Message.RESPONSE_CODE);
+            resContext.put(MessageContext.HTTP_RESPONSE_CODE, responseCode);
+            resContext.put(org.apache.cxf.message.Message.RESPONSE_CODE, responseCode);
             setResponseContext(resContext);
             if (origLoader != null) {
                 origLoader.reset();


[cxf] 03/03: Recording .gitmergeinfo Changes

Posted by ff...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 7c891e42b85d8bb3076ac869347823dfd7ce255a
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Tue Jul 2 14:56:47 2019 -0400

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 26d0abc..44af9f6 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -135,6 +135,7 @@ B 3a0b939b04d5e59388ff536ac93e7cf3f8793571
 B 3a1f54d82c94f0b5527f8a0f164bf602227bd437
 B 3a984d3b0ec367b219a56d059e0c9e268c82ef91
 B 3a99c26ad254f34525837ceaf0c8baaac24f4336
+B 3bcb005a980150307e778bfbdad855807efe8f71
 B 3c1b69e419333e7c49209bb72f7da79d3ee019cd
 B 3c82c9da13a616c0da987063841980d9c61e4840
 B 3d2185bb289b4b873a388e5a41fd3bac891c3354
@@ -387,6 +388,7 @@ B a95593cf274215d32734ab4d328be606568820ae
 B a9c0c7705f70054a70eb3e95439d2a37731e0332
 B aa4469b8bc8513c6c5d319793575616697a76ebd
 B ab2013cec7d0548023a2ec23dc874f18b36c2c73
+B ab2a445759124dd874787bcf99efbfa462ebb126
 B abb7a250188c1a2aa52277d369bb8968bd1d0188
 B aca3a18b2fb5cae542d8a34f3c804fb0dc02ce73
 B acc697f1c88f392bd952e07d50a9ae2ce0b76411