You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2011/06/30 10:56:57 UTC
svn commit: r1141446 - in /cxf/branches/2.4.x-fixes: ./
rt/ws/rm/src/main/resources/schemas/wsdl/
rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/
rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/resources/
Author: ay
Date: Thu Jun 30 08:56:56 2011
New Revision: 1141446
URL: http://svn.apache.org/viewvc?rev=1141446&view=rev
Log:
Merged revisions 1141424 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1141424 | ay | 2011-06-30 09:17:08 +0200 (Thu, 30 Jun 2011) | 1 line
[CXF-3623] WSRM AckRange's number parsing not tolerating whitespace after CXF 2.4 upgrade
........
Added:
cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/resources/Acknowledgment2.xml
- copied unchanged from r1141424, cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/resources/Acknowledgment2.xml
Modified:
cxf/branches/2.4.x-fixes/ (props changed)
cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/resources/schemas/wsdl/wsrm.xjb
cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java
Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
svn:mergeinfo = /cxf/trunk:1141424
Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/resources/schemas/wsdl/wsrm.xjb
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/resources/schemas/wsdl/wsrm.xjb?rev=1141446&r1=1141445&r2=1141446&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/resources/schemas/wsdl/wsrm.xjb (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/rm/src/main/resources/schemas/wsdl/wsrm.xjb Thu Jun 30 08:56:56 2011
@@ -36,35 +36,45 @@
<jaxb:bindings schemaLocation="wsrm.xsd" node="//xs:element[@name='Nack']">
<jaxb:property>
<jaxb:baseType>
- <jaxb:javaType name="java.lang.Long"/>
+ <jaxb:javaType name="java.lang.Long"
+ parseMethod="javax.xml.bind.DatatypeConverter.parseLong"
+ printMethod="javax.xml.bind.DatatypeConverter.printLong"/>
</jaxb:baseType>
</jaxb:property>
</jaxb:bindings>
<jaxb:bindings schemaLocation="wsrm.xsd" node="//xs:element[@name='MessageNumber']">
<jaxb:property>
<jaxb:baseType>
- <jaxb:javaType name="java.lang.Long"/>
+ <jaxb:javaType name="java.lang.Long"
+ parseMethod="javax.xml.bind.DatatypeConverter.parseLong"
+ printMethod="javax.xml.bind.DatatypeConverter.printLong"/>
</jaxb:baseType>
</jaxb:property>
</jaxb:bindings>
<jaxb:bindings schemaLocation="wsrm.xsd" node="//xs:element[@name='MaxMessageNumberUsed']">
<jaxb:property>
<jaxb:baseType>
- <jaxb:javaType name="java.lang.Long"/>
+ <jaxb:javaType name="java.lang.Long"
+ parseMethod="javax.xml.bind.DatatypeConverter.parseLong"
+ printMethod="javax.xml.bind.DatatypeConverter.printLong"/>
</jaxb:baseType>
</jaxb:property>
</jaxb:bindings>
<jaxb:bindings schemaLocation="wsrm.xsd" node="//xs:attribute[@name='Upper']">
<jaxb:property>
<jaxb:baseType>
- <jaxb:javaType name="java.lang.Long"/>
+ <jaxb:javaType name="java.lang.Long"
+ parseMethod="javax.xml.bind.DatatypeConverter.parseLong"
+ printMethod="javax.xml.bind.DatatypeConverter.printLong"/>
</jaxb:baseType>
</jaxb:property>
</jaxb:bindings>
<jaxb:bindings schemaLocation="wsrm.xsd" node="//xs:attribute[@name='Lower']">
<jaxb:property>
<jaxb:baseType>
- <jaxb:javaType name="java.lang.Long"/>
+ <jaxb:javaType name="java.lang.Long"
+ parseMethod="javax.xml.bind.DatatypeConverter.parseLong"
+ printMethod="javax.xml.bind.DatatypeConverter.printLong"/>
</jaxb:baseType>
</jaxb:property>
</jaxb:bindings>
Modified: cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java?rev=1141446&r1=1141445&r2=1141446&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java (original)
+++ cxf/branches/2.4.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java Thu Jun 30 08:56:56 2011
@@ -52,6 +52,7 @@ import org.apache.cxf.ws.rm.RMContextUti
import org.apache.cxf.ws.rm.RMProperties;
import org.apache.cxf.ws.rm.RMUtils;
import org.apache.cxf.ws.rm.SequenceAcknowledgement;
+import org.apache.cxf.ws.rm.SequenceAcknowledgement.AcknowledgementRange;
import org.apache.cxf.ws.rm.SequenceFault;
import org.apache.cxf.ws.rm.SequenceFaultType;
import org.apache.cxf.ws.rm.SequenceType;
@@ -275,11 +276,45 @@ public class RMSoapInterceptorTest exten
assertNotNull(ack);
assertEquals(ack.getIdentifier().getValue(), SEQ_IDENTIFIER);
assertEquals(2, ack.getAcknowledgementRange().size());
+ AcknowledgementRange r1 = ack.getAcknowledgementRange().get(0);
+ AcknowledgementRange r2 = ack.getAcknowledgementRange().get(1);
+ verifyRange(r1, 1, 1);
+ verifyRange(r2, 3, 3);
assertNull(rmps.getSequence());
assertNull(rmps.getAcksRequested());
}
@Test
+ public void testDecodeAcknowledgements2() throws XMLStreamException {
+ SoapMessage message = setUpInboundMessage("resources/Acknowledgment2.xml");
+ RMSoapInterceptor codec = new RMSoapInterceptor();
+ codec.handleMessage(message);
+ RMProperties rmps = RMContextUtils.retrieveRMProperties(message, false);
+ Collection<SequenceAcknowledgement> acks = rmps.getAcks();
+ assertNotNull(acks);
+ assertEquals(1, acks.size());
+ SequenceAcknowledgement ack = acks.iterator().next();
+ assertNotNull(ack);
+ assertEquals(1, ack.getAcknowledgementRange().size());
+ AcknowledgementRange r1 = ack.getAcknowledgementRange().get(0);
+ verifyRange(r1, 1, 3);
+ assertNull(rmps.getSequence());
+ assertNull(rmps.getAcksRequested());
+ }
+
+ private void verifyRange(AcknowledgementRange r, int i, int j) {
+ assertNotNull(r);
+ if (i > 0) {
+ assertNotNull(r.getLower());
+ assertEquals(i, r.getLower().longValue());
+ }
+ if (j > 0) {
+ assertNotNull(r.getUpper());
+ assertEquals(j, r.getUpper().longValue());
+ }
+ }
+
+ @Test
public void testDecodeAcksRequested() throws XMLStreamException {
SoapMessage message = setUpInboundMessage("resources/Retransmission.xml");
RMSoapInterceptor codec = new RMSoapInterceptor();