[java-opensaml COMMIT] /trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11Decode...

noreply at shibboleth.net noreply at shibboleth.net
Sun Apr 21 19:33:03 EDT 2013


Author: scantor
Date: Sun Apr 21 19:33:03 2013
New Revision: 3308

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3308&view=rev
Log:
Fix unit test.

Modified:
    trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11DecoderTest.java

Modified: trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11DecoderTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11DecoderTest.java?rev=3308&r1=3307&r2=3308&view=diff
==============================================================================
--- trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11DecoderTest.java (original)
+++ trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11DecoderTest.java Sun Apr 21 19:33:03 2013
@@ -19,8 +19,6 @@
 
 import java.io.IOException;
 
-import javax.annotation.Nullable;
-
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 
 import org.opensaml.core.xml.XMLObject;
@@ -28,7 +26,7 @@
 import org.opensaml.core.xml.schema.XSAny;
 import org.opensaml.messaging.context.MessageContext;
 import org.opensaml.messaging.decoder.MessageDecodingException;
-import org.opensaml.messaging.handler.MessageHandler;
+import org.opensaml.messaging.handler.AbstractMessageHandler;
 import org.opensaml.messaging.handler.MessageHandlerException;
 import org.opensaml.security.SecurityException;
 import org.opensaml.soap.messaging.context.SOAP11Context;
@@ -122,31 +120,20 @@
         return Resources.toByteArray(getClass().getResource(resourceName));
     }
 
-    public class TestEnvelopeBodyHandler implements MessageHandler<Envelope> {
+    public class TestEnvelopeBodyHandler extends AbstractMessageHandler<Envelope> {
         /** {@inheritDoc} */
-        public void invoke(MessageContext msgContext) throws MessageHandlerException {
+        protected void doInvoke(MessageContext msgContext) throws MessageHandlerException {
             Envelope env = (Envelope) msgContext.getSubcontext(SOAP11Context.class).getEnvelope();
             msgContext.setMessage(env);
         }
-
+    }
+    
+    public class TestPayloadBodyHandler extends AbstractMessageHandler<Envelope> {
         /** {@inheritDoc} */
-        @Nullable public String getId() {
-            return null;
+        protected void doInvoke(MessageContext msgContext) throws MessageHandlerException {
+            Envelope env = (Envelope) msgContext.getSubcontext(SOAP11Context.class).getEnvelope();
+            msgContext.setMessage(env.getBody().getUnknownXMLObjects().get(0));
         }
     }
     
-    public class TestPayloadBodyHandler implements MessageHandler<Envelope> {
-        /** {@inheritDoc} */
-        public void invoke(MessageContext msgContext) throws MessageHandlerException {
-            Envelope env = (Envelope) msgContext.getSubcontext(SOAP11Context.class).getEnvelope();
-            msgContext.setMessage(env.getBody().getUnknownXMLObjects().get(0));
-        }
-
-        /** {@inheritDoc} */
-        @Nullable public String getId() {
-            return null;
-        }
-        
-    }
-    
 }



More information about the commits mailing list