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 2013/07/11 08:50:26 UTC
svn commit: r1502126 - in /cxf/branches/2.6.x-fixes: ./
rt/transports/http/src/main/java/org/apache/cxf/transport/http/
systests/transports/src/test/java/org/apache/cxf/systest/http/
systests/transports/src/test/java/org/apache/cxf/systest/http/resources/
Author: ffang
Date: Thu Jul 11 06:50:25 2013
New Revision: 1502126
URL: http://svn.apache.org/r1502126
Log:
Merged revisions 1502119 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
................
r1502119 | ffang | 2013-07-11 13:18:03 +0800 (四, 11 7 2013) | 9 lines
Merged revisions 1502096 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1502096 | ffang | 2013-07-11 11:29:12 +0800 (四, 11 7 2013) | 1 line
[CXF-5114]CXF Client issue when try to handle session for One-Way Operation call
........
................
Modified:
cxf/branches/2.6.x-fixes/ (props changed)
cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java
cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Merged /cxf/branches/2.7.x-fixes:r1502119
Merged /cxf/trunk:r1502096
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1502126&r1=1502125&r2=1502126&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Thu Jul 11 06:50:25 2013
@@ -1628,6 +1628,11 @@ public class HTTPConduit
}
InputStream in = null;
+ Message inMessage = new MessageImpl();
+ inMessage.setExchange(exchange);
+ new Headers(inMessage).readFromConnection(connection);
+ inMessage.put(Message.RESPONSE_CODE, responseCode);
+ cookies.readFromConnection(connection);
// oneway or decoupled twoway calls may expect HTTP 202 with no content
if (isOneway(exchange)
|| HttpURLConnection.HTTP_ACCEPTED == responseCode) {
@@ -1663,10 +1668,6 @@ public class HTTPConduit
cachedStream = null;
}
- Message inMessage = new MessageImpl();
- inMessage.setExchange(exchange);
- new Headers(inMessage).readFromConnection(connection);
- inMessage.put(Message.RESPONSE_CODE, responseCode);
String ct = connection.getContentType();
inMessage.put(Message.CONTENT_TYPE, ct);
String charset = HttpHeaderHelper.findCharset(ct);
@@ -1678,7 +1679,6 @@ public class HTTPConduit
throw new IOException(m);
}
inMessage.put(Message.ENCODING, normalizedEncoding);
- cookies.readFromConnection(connection);
if (in == null) {
if (responseCode >= HttpURLConnection.HTTP_BAD_REQUEST) {
in = connection.getErrorStream();
Modified: cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java?rev=1502126&r1=1502125&r2=1502126&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java (original)
+++ cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java Thu Jul 11 06:50:25 2013
@@ -227,11 +227,15 @@ public class ClientServerSessionTest ext
BindingProvider bp = (BindingProvider)greeter;
updateAddressPort(bp, PORT);
bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
+
+
greeter.greetMeOneWay("Bonjour");
String greeting = greeter.greetMe("Hello");
-
+ if (greeting.indexOf(';') != -1) {
+ greeting = greeting.substring(0, greeting.indexOf(';'));
+ }
assertNotNull("no response received from service", greeting);
assertEquals("Hello Bonjour", greeting);
Modified: cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java?rev=1502126&r1=1502125&r2=1502126&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java (original)
+++ cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java Thu Jul 11 06:50:25 2013
@@ -66,7 +66,7 @@ public class GreeterSessionImpl implemen
val += ";" + cookie.getName() + "=" + cookie.getValue();
}
}
-
+
HttpSession session = req.getSession();
// Get a session property "counter" from context
Modified: cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml?rev=1502126&r1=1502125&r2=1502126&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml (original)
+++ cxf/branches/2.6.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml Thu Jul 11 06:50:25 2013
@@ -45,7 +45,11 @@
<jaxws:endpoint
address="http://localhost:${testutil.ports.SessionServer}/SoapContext/GreeterPort"
- implementor="org.apache.cxf.systest.http.GreeterSessionImpl"/>
+ implementor="org.apache.cxf.systest.http.GreeterSessionImpl">
+ <jaxws:properties>
+ <entry key="org.apache.cxf.oneway.robust" value="true"/>
+ </jaxws:properties>
+ </jaxws:endpoint>
<jaxws:endpoint address="http://localhost:${testutil.ports.SessionServer}/Stateful1"
@@ -72,4 +76,4 @@
<jaxws:endpoint address="http://localhost:${testutil.ports.SessionServer}/SpringBean"
implementorClass="org.apache.cxf.systest.http.SpringAnnotationGreeterImpl"/>
-</beans>
\ No newline at end of file
+</beans>