[java-opensaml COMMIT] in /trunk/opensaml-soap-impl: pom.xml src/main/java/org/opensaml/soap/soap11/decoder/SOAP11Dec...

noreply at shibboleth.net noreply at shibboleth.net
Fri Jan 18 22:10:22 EST 2013


Author: putmanb
Date: Fri Jan 18 22:10:22 2013
New Revision: 3157

URL: http://svn.shibboleth.net/view/java-opensaml?rev=3157&view=rev
Log:
Work on OSJ-34: Refactor MessageDecoder and MessageEncoder implementations to new API 

Added:
    trunk/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/decoder/http/EnvelopeBodyHandler.java   (with props)
    trunk/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/decoder/http/SimplePayloadBodyHandler.java   (with props)
    trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/
    trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11DecoderTest.java
      - copied, changed from r3154, trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/SOAP11DecoderTest.java
Modified:
    trunk/opensaml-soap-impl/pom.xml
    trunk/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/decoder/SOAP11Decoder.java
    trunk/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11Decoder.java
    trunk/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/decoder/SOAP11DecoderTest.java

Modified: trunk/opensaml-soap-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-soap-impl/pom.xml?rev=3157&r1=3156&r2=3157&view=diff
==============================================================================
--- trunk/opensaml-soap-impl/pom.xml (original)
+++ trunk/opensaml-soap-impl/pom.xml Fri Jan 18 22:10:22 2013
@@ -24,6 +24,10 @@
         </dependency>
 
         <!-- Provided Dependencies -->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
 
         <!-- Runtime Dependencies -->
 
@@ -36,6 +40,17 @@
             <scope>test</scope>
         </dependency>
         
+        <dependency>
+            <groupId>${spring.groupId}</groupId>
+            <artifactId>spring-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${spring.groupId}</groupId>
+            <artifactId>spring-core</artifactId>
+            <version>${spring.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
     
 </project>

Modified: trunk/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11Decoder.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11Decoder.java?rev=3157&r1=3156&r2=3157&view=diff
==============================================================================
--- trunk/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11Decoder.java (original)
+++ trunk/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/decoder/http/HTTPSOAP11Decoder.java Fri Jan 18 22:10:22 2013
@@ -17,22 +17,47 @@
 
 package org.opensaml.soap.soap11.decoder.http;
 
-import net.shibboleth.utilities.java.support.xml.ParserPool;
+import java.io.IOException;
 
-import org.opensaml.soap.soap11.decoder.SOAP11Decoder;
-import org.opensaml.ws.message.MessageContext;
-import org.opensaml.ws.message.decoder.MessageDecodingException;
-import org.opensaml.ws.transport.http.HTTPInTransport;
+import javax.servlet.http.HttpServletRequest;
+
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+
+import org.opensaml.core.xml.XMLObject;
+import org.opensaml.messaging.context.MessageContext;
+import org.opensaml.messaging.decoder.MessageDecodingException;
+import org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXmlMessageDecoder;
+import org.opensaml.messaging.handler.MessageHandler;
+import org.opensaml.messaging.handler.MessageHandlerException;
+import org.opensaml.soap.messaging.context.SOAP11Context;
+import org.opensaml.soap.soap11.Envelope;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Basic SOAP 1.1 over decoder for HTTP transport.
+ * Basic SOAP 1.1 decoder for HTTP transport.
+ * 
+ * <p>
+ * This decoder takes a mandatory {@link MessageHandler} instance which is used to determine
+ * populate the message that is returned as the {@link MessageContext#getMessage()}.
+ * </p>
+ * 
+ *  <p>
+ *  A SOAP message oriented message exchange style might just populate the Envelope as the message.
+ *  An application-specific payload-oriented message exchange would handle a specific type
+ * of payload structure.  
+ * </p>
+ * 
+ * @param <MessageType> the message type of the message context on which to operate
  */
-public class HTTPSOAP11Decoder extends SOAP11Decoder {
+public class HTTPSOAP11Decoder<MessageType extends XMLObject> 
+    extends BaseHttpServletRequestXmlMessageDecoder<MessageType> {
 
     /** Class logger. */
     private final Logger log = LoggerFactory.getLogger(HTTPSOAP11Decoder.class);
+    
+    /** Message handler to use in processing the message body. */
+    private MessageHandler<MessageType> bodyHandler;
     
     /** Constructor. */
     public HTTPSOAP11Decoder() {
@@ -40,30 +65,65 @@
     }
 

[... 353 lines stripped ...]


More information about the commits mailing list