[java-opensaml] branch main updated: IDP-2069 - Null Handling Task

Scott Cantor cantor.2 at osu.edu
Tue Mar 21 16:03:03 UTC 2023


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=874bb5e20bf64d3586b5a56a1ffe5e95eaeb7e60

The following commit(s) were added to refs/heads/main by this push:
     new 874bb5e20 IDP-2069 - Null Handling Task
874bb5e20 is described below

commit 874bb5e20bf64d3586b5a56a1ffe5e95eaeb7e60
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Mar 21 12:02:59 2023 -0400

    IDP-2069 - Null Handling Task
    
    https://shibboleth.atlassian.net/browse/IDP-2069
    
    Clean opensaml-soap-api.
---
 .../opensaml/soap/client/SOAPFaultException.java   |  2 +
 .../http/AbstractPipelineHttpSOAPClient.java       | 60 +++++++++----------
 .../opensaml/soap/client/http/HttpSOAPClient.java  | 43 +++++++++-----
 .../client/http/PipelineFactoryHttpSOAPClient.java | 23 +++-----
 .../soap/common/AbstractExtensibleSOAPObject.java  |  1 +
 .../opensaml/soap/common/SOAPObjectBuilder.java    |  4 +-
 .../soap/messaging/SOAPMessagingSupport.java       | 18 +++---
 .../soap/messaging/context/InboundSOAPContext.java |  7 +--
 .../java/org/opensaml/soap/soap11/FaultCode.java   |  6 +-
 .../java/org/opensaml/soap/util/SOAPSupport.java   | 27 ++++++---
 .../org/opensaml/soap/wsaddressing/Action.java     |  4 +-
 .../org/opensaml/soap/wsaddressing/Address.java    |  8 ++-
 .../soap/wsaddressing/AttributedQName.java         |  4 +-
 .../opensaml/soap/wsaddressing/AttributedURI.java  |  4 +-
 .../soap/wsaddressing/AttributedUnsignedLong.java  |  9 ++-
 .../soap/wsaddressing/EndpointReference.java       |  4 +-
 .../soap/wsaddressing/EndpointReferenceType.java   | 17 +++---
 .../org/opensaml/soap/wsaddressing/FaultTo.java    |  4 +-
 .../java/org/opensaml/soap/wsaddressing/From.java  |  4 +-
 .../wsaddressing/IsReferenceParameterBearing.java  | 13 ++--
 .../org/opensaml/soap/wsaddressing/MessageID.java  |  4 +-
 .../org/opensaml/soap/wsaddressing/Metadata.java   |  6 +-
 .../opensaml/soap/wsaddressing/ProblemAction.java  | 15 +++--
 .../soap/wsaddressing/ProblemHeaderQName.java      |  4 +-
 .../org/opensaml/soap/wsaddressing/ProblemIRI.java |  4 +-
 .../soap/wsaddressing/ReferenceParameters.java     |  6 +-
 .../org/opensaml/soap/wsaddressing/RelatesTo.java  | 15 +++--
 .../org/opensaml/soap/wsaddressing/ReplyTo.java    |  4 +-
 .../org/opensaml/soap/wsaddressing/RetryAfter.java |  4 +-
 .../org/opensaml/soap/wsaddressing/SoapAction.java |  4 +-
 .../java/org/opensaml/soap/wsaddressing/To.java    |  4 +-
 .../wsaddressing/WSAddressingObjectBuilder.java    |  4 +-
 .../messaging/WSAddressingContext.java             | 32 +++++-----
 .../wsaddressing/util/WSAddressingSupport.java     |  5 +-
 .../main/java/org/opensaml/soap/wsfed/Address.java |  9 +--
 .../java/org/opensaml/soap/wsfed/AppliesTo.java    |  9 +--
 .../org/opensaml/soap/wsfed/EndPointReference.java |  9 +--
 .../soap/wsfed/RequestSecurityTokenResponse.java   | 11 ++--
 .../soap/wsfed/RequestedSecurityToken.java         |  6 +-
 .../org/opensaml/soap/wsfed/WSFedConstants.java    | 14 +++--
 .../opensaml/soap/wsfed/WSFedObjectBuilder.java    |  4 +-
 .../main/java/org/opensaml/soap/wspolicy/All.java  |  4 +-
 .../java/org/opensaml/soap/wspolicy/AppliesTo.java |  7 ++-
 .../org/opensaml/soap/wspolicy/ExactlyOne.java     |  4 +-
 .../soap/wspolicy/OperatorContentType.java         | 17 +++---
 .../opensaml/soap/wspolicy/OptionalBearing.java    | 13 ++--
 .../java/org/opensaml/soap/wspolicy/Policy.java    | 11 ++--
 .../opensaml/soap/wspolicy/PolicyAttachment.java   | 13 ++--
 .../opensaml/soap/wspolicy/PolicyReference.java    | 25 ++++----
 .../opensaml/soap/wspolicy/PolicyURIsBearing.java  | 11 ++--
 .../opensaml/soap/wspolicy/WSPolicyConstants.java  |  6 +-
 .../soap/wspolicy/WSPolicyObjectBuilder.java       |  4 +-
 .../soap/wssecurity/AttributedDateTime.java        |  9 ++-
 .../opensaml/soap/wssecurity/AttributedString.java |  4 +-
 .../opensaml/soap/wssecurity/AttributedURI.java    |  4 +-
 .../soap/wssecurity/BinarySecurityToken.java       | 13 ++--
 .../java/org/opensaml/soap/wssecurity/Created.java |  4 +-
 .../org/opensaml/soap/wssecurity/Embedded.java     | 13 ++--
 .../opensaml/soap/wssecurity/EncodedString.java    | 15 +++--
 .../opensaml/soap/wssecurity/EncryptedHeader.java  | 16 +++--
 .../java/org/opensaml/soap/wssecurity/Expires.java |  7 ++-
 .../org/opensaml/soap/wssecurity/IdBearing.java    | 12 ++--
 .../org/opensaml/soap/wssecurity/Iteration.java    | 11 ++--
 .../opensaml/soap/wssecurity/KeyIdentifier.java    | 18 +++---
 .../java/org/opensaml/soap/wssecurity/Nonce.java   |  7 ++-
 .../org/opensaml/soap/wssecurity/Password.java     |  5 +-
 .../org/opensaml/soap/wssecurity/Reference.java    | 24 ++++----
 .../java/org/opensaml/soap/wssecurity/Salt.java    |  7 ++-
 .../soap/wssecurity/SecurityTokenReference.java    | 11 ++--
 .../soap/wssecurity/SignatureConfirmation.java     | 18 +++---
 .../org/opensaml/soap/wssecurity/Timestamp.java    | 16 +++--
 .../opensaml/soap/wssecurity/TokenTypeBearing.java | 12 ++--
 .../soap/wssecurity/TransformationParameters.java  | 11 ++--
 .../org/opensaml/soap/wssecurity/UsageBearing.java | 12 ++--
 .../org/opensaml/soap/wssecurity/Username.java     |  7 ++-
 .../opensaml/soap/wssecurity/UsernameToken.java    |  2 +-
 .../soap/wssecurity/WSSecurityConstants.java       | 69 +++++++++++-----------
 .../soap/wssecurity/WSSecurityObjectBuilder.java   |  4 +-
 .../soap/wssecurity/messaging/AbstractToken.java   |  6 +-
 .../wssecurity/messaging/WSSecurityContext.java    |  9 ++-
 .../messaging/WSSecurityMessagingSupport.java      |  1 +
 .../soap/wssecurity/util/WSSecuritySupport.java    | 18 +++---
 82 files changed, 555 insertions(+), 360 deletions(-)

diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/client/SOAPFaultException.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/client/SOAPFaultException.java
index 2ab9d8279..3553e3020 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/client/SOAPFaultException.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/client/SOAPFaultException.java
@@ -28,8 +28,10 @@ public class SOAPFaultException extends SOAPException {
     /** Serial version UID. */
     private static final long serialVersionUID = 4770411452264097320L;
 
+// Checkstyle: MutableException OFF
     /** The fault that caused this exception. */
     @Nullable private Fault soapFault;
+// Checkstyle: MutableException ON
 
     /** Constructor. */
     public SOAPFaultException() {
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/AbstractPipelineHttpSOAPClient.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/AbstractPipelineHttpSOAPClient.java
index f5c45b221..f1c24a22d 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/AbstractPipelineHttpSOAPClient.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/AbstractPipelineHttpSOAPClient.java
@@ -41,6 +41,7 @@ import org.opensaml.messaging.decoder.MessageDecodingException;
 import org.opensaml.messaging.decoder.httpclient.HttpClientResponseMessageDecoder;
 import org.opensaml.messaging.encoder.MessageEncodingException;
 import org.opensaml.messaging.encoder.httpclient.HttpClientRequestMessageEncoder;
+import org.opensaml.messaging.handler.MessageHandler;
 import org.opensaml.messaging.handler.MessageHandlerException;
 import org.opensaml.messaging.pipeline.httpclient.HttpClientMessagePipeline;
 import org.opensaml.security.SecurityException;
@@ -55,13 +56,13 @@ import org.opensaml.soap.client.SOAPFaultException;
 import org.opensaml.soap.common.SOAP11FaultDecodingException;
 import org.opensaml.soap.common.SOAPException;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
 import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.component.AbstractInitializableComponent;
 import net.shibboleth.shared.component.ComponentInitializationException;
 import net.shibboleth.shared.logic.Constraint;
+import net.shibboleth.shared.primitive.LoggerFactory;
 import net.shibboleth.shared.resolver.CriteriaSet;
 
 /**
@@ -82,11 +83,6 @@ public abstract class AbstractPipelineHttpSOAPClient
     
     /** Strategy for building the criteria set which is input to the TLS trust engine. */
     @Nullable private Function<InOutOperationContext,CriteriaSet> tlsCriteriaSetStrategy;
-    
-    /** Constructor. */
-    public AbstractPipelineHttpSOAPClient() {
-        super();
-    }
 
     /** {@inheritDoc} */
     @Override
@@ -98,22 +94,12 @@ public abstract class AbstractPipelineHttpSOAPClient
         } 
     }
     
-    /** {@inheritDoc} */
-    @Override
-    protected void doDestroy() {
-        httpClient = null;
-        httpClientSecurityParameters = null;
-        tlsCriteriaSetStrategy = null;
-        
-        super.doDestroy();
-    }
-    
     /**
      * Get the client used to make outbound HTTP requests.
      * 
      * @return the client instance
      */
-    @Nonnull public HttpClient getHttpClient() {
+    @NonnullAfterInit public HttpClient getHttpClient() {
         return httpClient;
     }
 
@@ -190,8 +176,9 @@ public abstract class AbstractPipelineHttpSOAPClient
             pipeline = resolvePipeline(operationContext);
             
             // Outbound payload handling
-            if (pipeline.getOutboundPayloadMessageHandler() != null) {
-                pipeline.getOutboundPayloadMessageHandler().invoke(operationContext.getOutboundMessageContext());
+            MessageHandler handler = pipeline.getOutboundPayloadMessageHandler();
+            if (handler != null) {
+                handler.invoke(operationContext.ensureOutboundMessageContext());
             }
             
             final ClassicHttpRequest httpRequest = buildHttpRequest(endpoint, operationContext);
@@ -201,11 +188,14 @@ public abstract class AbstractPipelineHttpSOAPClient
             encoder.setMessageContext(operationContext.getOutboundMessageContext());
             encoder.initialize();
             encoder.prepareContext();
-            if (pipeline.getOutboundTransportMessageHandler() != null) {
-                pipeline.getOutboundTransportMessageHandler().invoke(operationContext.getOutboundMessageContext());
+            
+            // Outbound transport handling.
+            handler = pipeline.getOutboundTransportMessageHandler();
+            if (handler != null) {
+                handler.invoke(operationContext.ensureOutboundMessageContext());
             }
-            encoder.encode();
             
+            encoder.encode();
             
             // HttpClient execution
             final HttpClientContext httpContext = buildHttpContext(httpRequest, operationContext);
@@ -220,8 +210,10 @@ public abstract class AbstractPipelineHttpSOAPClient
             operationContext.setInboundMessageContext(decoder.getMessageContext());
             
             // Inbound message handling
-            if (pipeline.getInboundMessageHandler() != null) {
-                pipeline.getInboundMessageHandler().invoke(operationContext.getInboundMessageContext());
+            
+            handler = pipeline.getInboundMessageHandler();
+            if (handler != null) {
+                handler.invoke(operationContext.ensureInboundMessageContext());
             }
             
         } catch (final SOAP11FaultDecodingException e) {
@@ -367,7 +359,7 @@ public abstract class AbstractPipelineHttpSOAPClient
     protected HttpClientSecurityParameters resolveContextSecurityParameters(
             @Nonnull final InOutOperationContext operationContext) {
         final HttpClientSecurityContext securityContext = 
-                operationContext.getOutboundMessageContext().getSubcontext(HttpClientSecurityContext.class);
+                operationContext.ensureOutboundMessageContext().getSubcontext(HttpClientSecurityContext.class);
         if (securityContext != null) {
             return securityContext.getSecurityParameters();
         }
@@ -394,11 +386,16 @@ public abstract class AbstractPipelineHttpSOAPClient
      */
     @Nonnull protected HttpClientContext resolveClientContext(@Nonnull final InOutOperationContext operationContext) {
         final HttpClientRequestContext requestContext = 
-                operationContext.getOutboundMessageContext().ensureSubcontext(HttpClientRequestContext.class);
-        if (requestContext.getHttpClientContext() == null) {
-            requestContext.setHttpClientContext(HttpClientContext.create());
+                operationContext.ensureOutboundMessageContext().ensureSubcontext(HttpClientRequestContext.class);
+        
+        HttpClientContext clientCtx = requestContext.getHttpClientContext();
+        if (clientCtx == null) {
+            clientCtx = HttpClientContext.create();
+            requestContext.setHttpClientContext(clientCtx);
         }
-        return requestContext.getHttpClientContext();
+        
+        assert clientCtx != null;
+        return clientCtx;
     }
 
     /**
@@ -412,8 +409,9 @@ public abstract class AbstractPipelineHttpSOAPClient
             @Nonnull final InOutOperationContext operationContext) {
         
         final CriteriaSet criteriaSet = new CriteriaSet();
-        if (getTLSCriteriaSetStrategy() != null) {
-            final CriteriaSet resolved = getTLSCriteriaSetStrategy().apply(operationContext);
+        final Function<InOutOperationContext,CriteriaSet> strategy = getTLSCriteriaSetStrategy();
+        if (strategy != null) {
+            final CriteriaSet resolved = strategy.apply(operationContext);
             if (resolved != null) {
                 criteriaSet.addAll(resolved);
             }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java
index bde0ab0aa..bb93f5707 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/HttpSOAPClient.java
@@ -27,6 +27,7 @@ import java.util.function.Function;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.annotation.concurrent.ThreadSafe;
+import javax.xml.namespace.QName;
 
 import org.apache.hc.client5.http.classic.HttpClient;
 import org.apache.hc.client5.http.classic.methods.HttpPost;
@@ -52,10 +53,12 @@ import org.opensaml.soap.client.SOAPClientException;
 import org.opensaml.soap.client.SOAPFaultException;
 import org.opensaml.soap.common.SOAPException;
 import org.opensaml.soap.messaging.context.SOAP11Context;
+import org.opensaml.soap.soap11.Body;
 import org.opensaml.soap.soap11.Envelope;
 import org.opensaml.soap.soap11.Fault;
+import org.opensaml.soap.soap11.FaultCode;
+import org.opensaml.soap.soap11.FaultString;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.w3c.dom.Element;
 
 import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
@@ -63,6 +66,7 @@ import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.component.AbstractInitializableComponent;
 import net.shibboleth.shared.component.ComponentInitializationException;
 import net.shibboleth.shared.logic.Constraint;
+import net.shibboleth.shared.primitive.LoggerFactory;
 import net.shibboleth.shared.xml.ParserPool;
 import net.shibboleth.shared.xml.SerializeSupport;
 import net.shibboleth.shared.xml.XMLParserException;
@@ -189,8 +193,8 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
                 Constraint.isNotNull(strategy, "SOAP 1.1 context lookup strategy cannot be null");
     }
     
+// Checkstyle: CyclomaticComplexity OFF
     /** {@inheritDoc} */
-    @Override
     public void send(@Nonnull @NotEmpty final String endpoint, @Nonnull final InOutOperationContext context)
             throws SOAPException, SecurityException {
         Constraint.isNotNull(endpoint, "Endpoint cannot be null");
@@ -201,7 +205,8 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
 
         HttpSOAPRequestParameters soapRequestParams = null;
         
-        if (soapCtx == null || soapCtx.getEnvelope() == null) {
+        final Envelope env = soapCtx != null ? soapCtx.getEnvelope() : null;
+        if (env == null) {
             throw new SOAPClientException("Operation context did not contain an outbound SOAP Envelope");
         } else if (clientCtx != null) {
             soapRequestParams = (HttpSOAPRequestParameters) clientCtx.getSOAPRequestParameters();
@@ -209,7 +214,7 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
         
         HttpPost post = null;
         try {
-            post = createPostMethod(endpoint, soapRequestParams, soapCtx.getEnvelope());
+            post = createPostMethod(endpoint, soapRequestParams, env);
 
             ClassicHttpResponse response = null;
             try {
@@ -242,6 +247,7 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
             }
         }
     }
+// Checkstyle: CyclomaticComplexity ON
 
     /**
      * Create the post method used to send the SOAP request.
@@ -281,9 +287,8 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
     protected HttpEntity createRequestEntity(@Nonnull final Envelope message, @Nullable final Charset charset)
             throws SOAPClientException {
         try {
-            final Marshaller marshaller = Constraint.isNotNull(
-                    XMLObjectProviderRegistrySupport.getMarshallerFactory().getMarshaller(message),
-                    "SOAP Envelope marshaller not available");
+            final Marshaller marshaller =
+                    XMLObjectProviderRegistrySupport.getMarshallerFactory().ensureMarshaller(message);
             final ByteArrayOutputStream arrayOut = new ByteArrayOutputStream();
 
             if (log.isDebugEnabled()) {
@@ -313,7 +318,7 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
             }
             final Envelope response = unmarshallResponse(httpResponse.getEntity().getContent());
             context.setInboundMessageContext(new MessageContext());
-            context.getInboundMessageContext().ensureSubcontext(SOAP11Context.class).setEnvelope(response);
+            context.ensureInboundMessageContext().ensureSubcontext(SOAP11Context.class).setEnvelope(response);
             //TODO: goes away?
             //evaluateSecurityPolicy(messageContext);
         } catch (final IOException e) {
@@ -338,10 +343,11 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
             }
             final Envelope response = unmarshallResponse(httpResponse.getEntity().getContent());
             context.setInboundMessageContext(new MessageContext());
-            context.getInboundMessageContext().ensureSubcontext(SOAP11Context.class).setEnvelope(response);
+            context.ensureInboundMessageContext().ensureSubcontext(SOAP11Context.class).setEnvelope(response);
 
-            if (response.getBody() != null) {
-                final List<XMLObject> faults = response.getBody().getUnknownXMLObjects(Fault.DEFAULT_ELEMENT_NAME);
+            final Body body = response.getBody();
+            if (body != null) {
+                final List<XMLObject> faults = body.getUnknownXMLObjects(Fault.DEFAULT_ELEMENT_NAME);
                 if (faults.size() < 1) {
                     throw new SOAPClientException("HTTP status code was 500 but SOAP response did not contain a Fault");
                 }
@@ -349,11 +355,17 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
                 String code = "(not set)";
                 String msg = "(not set)";
                 final Fault fault = (Fault) faults.get(0);
-                if (fault.getCode() != null) {
-                    code = fault.getCode().getValue().toString();
+                final FaultCode fcode = fault.getCode();
+                if (fcode != null) {
+                    final QName fcodeval = fcode.getValue();
+                    if (fcodeval != null) {
+                        code = fcodeval.toString();
+                    }
                 }
-                if (fault.getMessage() != null) {
-                    msg = fault.getMessage().getValue();
+                
+                final FaultString fstring = fault.getMessage();
+                if (fstring != null && fstring.getValue() != null) {
+                    msg = fstring.getValue();
                 }
                 
                 log.debug("SOAP fault code {} with message {}", code, msg);
@@ -380,6 +392,7 @@ public class HttpSOAPClient extends AbstractInitializableComponent implements SO
     protected Envelope unmarshallResponse(@Nonnull final InputStream responseStream) throws SOAPClientException {
         try {
             final Element responseElem = parserPool.parse(responseStream).getDocumentElement();
+            assert responseElem != null;
             if (log.isDebugEnabled()) {
                 log.debug("Inbound SOAP message was:\n" + SerializeSupport.prettyPrintXML(responseElem));
             }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineFactoryHttpSOAPClient.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineFactoryHttpSOAPClient.java
index 560470cf0..d4e5fdfd0 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineFactoryHttpSOAPClient.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/client/http/PipelineFactoryHttpSOAPClient.java
@@ -29,10 +29,11 @@ import org.opensaml.messaging.pipeline.httpclient.HttpClientMessagePipelineFacto
 import org.opensaml.soap.client.SOAPClientContext;
 import org.opensaml.soap.common.SOAPException;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
+import net.shibboleth.shared.annotation.constraint.NonnullAfterInit;
 import net.shibboleth.shared.component.ComponentInitializationException;
 import net.shibboleth.shared.logic.Constraint;
+import net.shibboleth.shared.primitive.LoggerFactory;
 
 /**
  * SOAP client that is based on {@link HttpClientMessagePipeline}, produced at runtime from an instance of
@@ -42,13 +43,13 @@ import net.shibboleth.shared.logic.Constraint;
 public class PipelineFactoryHttpSOAPClient extends AbstractPipelineHttpSOAPClient {
     
     /** Logger. */
-    private Logger log = LoggerFactory.getLogger(PipelineFactoryHttpSOAPClient.class);
+    @Nonnull private Logger log = LoggerFactory.getLogger(PipelineFactoryHttpSOAPClient.class);
     
     /** Factory for the client message pipeline. */
-    private HttpClientMessagePipelineFactory pipelineFactory;
+    @NonnullAfterInit private HttpClientMessagePipelineFactory pipelineFactory;
     
     /** Strategy function used to resolve the pipeline name to execute. */
-    private Function<InOutOperationContext,String> pipelineNameStrategy;
+    @NonnullAfterInit private Function<InOutOperationContext,String> pipelineNameStrategy;
     
     /**
      * Set the message pipeline factory.
@@ -86,14 +87,6 @@ public class PipelineFactoryHttpSOAPClient extends AbstractPipelineHttpSOAPClien
         }
     }
 
-    /** {@inheritDoc} */
-    protected void doDestroy() {
-        pipelineFactory = null;
-        pipelineNameStrategy = null;
-        
-        super.doDestroy();
-    }
-
     /**
      * Resolve and return a new instance of the {@link HttpClientMessagePipeline} to be processed.
      * 
@@ -114,7 +107,7 @@ public class PipelineFactoryHttpSOAPClient extends AbstractPipelineHttpSOAPClien
      * 
      * @throws SOAPException if there is an error obtaining a new pipeline instance
      */
-    @Nonnull protected HttpClientMessagePipeline resolvePipeline(final InOutOperationContext operationContext)
+    @Nonnull protected HttpClientMessagePipeline resolvePipeline(@Nonnull final InOutOperationContext operationContext)
             throws SOAPException {
         
         String resolvedPipelineName = null;
@@ -166,7 +159,7 @@ public class PipelineFactoryHttpSOAPClient extends AbstractPipelineHttpSOAPClien
      * 
      * @throws SOAPException if there is an error obtaining a new pipeline instance
      */
-    @Nullable protected HttpClientMessagePipeline newPipeline(@Nullable final String name) throws SOAPException {
+    @Nonnull protected HttpClientMessagePipeline newPipeline(@Nullable final String name) throws SOAPException {
         // Note: in a Spring environment, the actual factory impl might be a proxy via ServiceLocatorFactoryBean
         return pipelineFactory.newInstance(name);
     }
@@ -192,7 +185,7 @@ public class PipelineFactoryHttpSOAPClient extends AbstractPipelineHttpSOAPClien
     public static class DefaultPipelineNameStrategy implements Function<InOutOperationContext,String> {
 
         /** {@inheritDoc} */
-        public String apply(@Nullable final InOutOperationContext opContext) {
+        @Nullable public String apply(@Nullable final InOutOperationContext opContext) {
             if (opContext == null) {
                 return null;
             }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/common/AbstractExtensibleSOAPObject.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/common/AbstractExtensibleSOAPObject.java
index d7873435c..803510bf9 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/common/AbstractExtensibleSOAPObject.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/common/AbstractExtensibleSOAPObject.java
@@ -73,6 +73,7 @@ public abstract class AbstractExtensibleSOAPObject extends AbstractXMLObject imp
     }
     
     /** {@inheritDoc} */
+    @SuppressWarnings("unchecked")
     @Nonnull public List<XMLObject> getUnknownXMLObjects(@Nonnull final QName typeOrName) {
         return (List<XMLObject>) unknownXMLObjects.subList(typeOrName);
     }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/common/SOAPObjectBuilder.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/common/SOAPObjectBuilder.java
index e1edbaf0f..9018924e8 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/common/SOAPObjectBuilder.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/common/SOAPObjectBuilder.java
@@ -17,6 +17,8 @@
 
 package org.opensaml.soap.common;
 
+import javax.annotation.Nonnull;
+
 import org.opensaml.core.xml.XMLObjectBuilder;
 
 /**
@@ -31,5 +33,5 @@ public interface SOAPObjectBuilder<SOAPObjectType extends SOAPObject> extends XM
      * 
      * @return built SAMLObject
      */
-    public SOAPObjectType buildObject();
+    @Nonnull public SOAPObjectType buildObject();
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/messaging/SOAPMessagingSupport.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/messaging/SOAPMessagingSupport.java
index 9b44bd200..973a1fc92 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/messaging/SOAPMessagingSupport.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/messaging/SOAPMessagingSupport.java
@@ -364,6 +364,7 @@ public final class SOAPMessagingSupport {
         
         final LazyList<XMLObject> headers = new LazyList<>();
         for (final XMLObject header : envelopeHeader.getUnknownXMLObjects(headerName)) {
+            assert header != null;
             if (isSOAP11HeaderTargetedToNode(header, targetNodes, isFinalDestination)) {
                 headers.add(header);
             }
@@ -409,10 +410,13 @@ public final class SOAPMessagingSupport {
         Constraint.isNotNull(messageContext, "Message context cannot be null");
         
         // SOAP 1.1 Envelope
-        final SOAP11Context soap11 = getSOAP11Context(messageContext, false);
+        final SOAP11Context soap11 = getSOAP11Context(messageContext);
         
-        if (soap11 != null && soap11.getEnvelope() != null) {
-            addSOAP11HeaderBlock(soap11.getEnvelope(), headerBlock);
+        if (soap11 != null) {
+            final Envelope env = soap11.getEnvelope();
+            if (env != null) {
+                addSOAP11HeaderBlock(env, headerBlock);
+            }
         } else {
             //TODO SOAP 1.2 support when object providers are implemented
             throw new IllegalArgumentException("Message context did not contain a SOAP Envelope");
@@ -466,7 +470,7 @@ public final class SOAPMessagingSupport {
      * @param fault the fault to register
      */
     public static void registerSOAP11Fault(@Nonnull final MessageContext messageContext, @Nullable final Fault fault) {
-        final SOAP11Context soap11Context = getSOAP11Context(messageContext, true);
+        final SOAP11Context soap11Context = ensureSOAP11Context(messageContext);
         
         soap11Context.setFault(fault);
     }
@@ -478,7 +482,7 @@ public final class SOAPMessagingSupport {
      * @return the registered fault, or null
      */
     public static Fault getSOAP11Fault(@Nonnull final MessageContext messageContext) {
-        final SOAP11Context soap11Context = getSOAP11Context(messageContext, false);
+        final SOAP11Context soap11Context = getSOAP11Context(messageContext);
         if (soap11Context != null) {
             return soap11Context.getFault();
         }
@@ -491,11 +495,11 @@ public final class SOAPMessagingSupport {
      * @param messageContext the current message context
      */
     public static void clearFault(@Nonnull final MessageContext messageContext) {
-        final SOAP11Context soap11Context = getSOAP11Context(messageContext, false);
+        final SOAP11Context soap11Context = getSOAP11Context(messageContext);
         if (soap11Context != null) {
             soap11Context.setFault(null);
         }
         //TODO SOAP 1.2
     }
     
-}
+}
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/messaging/context/InboundSOAPContext.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/messaging/context/InboundSOAPContext.java
index 4e997fb7e..941f1749c 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/messaging/context/InboundSOAPContext.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/messaging/context/InboundSOAPContext.java
@@ -32,18 +32,17 @@ import net.shibboleth.shared.collection.LazySet;
 public final class InboundSOAPContext extends BaseContext {
     
     /** The set of actor URI's under which this SOAP node is operating. */
-    private LazySet<String> nodeActors;
+    @Nonnull private LazySet<String> nodeActors;
     
     /** Flag indicating whether the node is the final destination for the current 
      * message processing context. Defaults to: true*/
     private boolean finalDestination;
     
     /** The set of headers that have been understood. */
-    private LazySet<XMLObject> understoodHeaders;
+    @Nonnull private LazySet<XMLObject> understoodHeaders;
     
     /** Constructor. */
     public InboundSOAPContext() {
-        super();
         nodeActors = new LazySet<>();
         understoodHeaders = new LazySet<>();
         finalDestination = true;
@@ -97,4 +96,4 @@ public final class InboundSOAPContext extends BaseContext {
         finalDestination = newValue;
     }
 
-}
+}
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/soap11/FaultCode.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/soap11/FaultCode.java
index 199ec03a9..e7abb3fb7 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/soap11/FaultCode.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/soap11/FaultCode.java
@@ -46,8 +46,10 @@ public interface FaultCode extends SOAPObject, XSQName {
             SOAPConstants.SOAP11_PREFIX);
 
     /** FaultCode value <code>Server</code>. */
-    @Nonnull public static final QName SERVER = new QName(SOAPConstants.SOAP11_NS, "Server", SOAPConstants.SOAP11_PREFIX);
+    @Nonnull public static final QName SERVER =
+            new QName(SOAPConstants.SOAP11_NS, "Server", SOAPConstants.SOAP11_PREFIX);
 
     /** FaultCode value <code>Client</code>. */
-    @Nonnull public static final QName CLIENT = new QName(SOAPConstants.SOAP11_NS, "Client", SOAPConstants.SOAP11_PREFIX);
+    @Nonnull public static final QName CLIENT =
+            new QName(SOAPConstants.SOAP11_NS, "Client", SOAPConstants.SOAP11_PREFIX);
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/util/SOAPSupport.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/util/SOAPSupport.java
index ccf423cae..90ea7a6fc 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/util/SOAPSupport.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/util/SOAPSupport.java
@@ -89,7 +89,10 @@ public final class SOAPSupport {
         if (soapObject instanceof MustUnderstandBearing) {
             final XSBooleanValue value = ((MustUnderstandBearing) soapObject).isSOAP11MustUnderstandXSBoolean();
             if (value != null) {
-                return value.getValue();
+                final Boolean flag = value.getValue();
+                if (flag != null) {
+                    return flag;
+                }
             }
         }
         if (soapObject instanceof AttributeExtensibleXMLObject) {
@@ -299,7 +302,10 @@ public final class SOAPSupport {
             final XSBooleanValue value = ((org.opensaml.soap.soap12.MustUnderstandBearing) soapObject)
                     .isSOAP12MustUnderstandXSBoolean();
             if (value != null) {
-                return value.getValue();
+                final Boolean flag = value.getValue();
+                if (flag != null) {
+                    return flag;
+                }
             }
         }
         if (soapObject instanceof AttributeExtensibleXMLObject) {
@@ -340,7 +346,10 @@ public final class SOAPSupport {
         if (soapObject instanceof org.opensaml.soap.soap12.RelayBearing) {
             final XSBooleanValue value = ((org.opensaml.soap.soap12.RelayBearing) soapObject).isSOAP12RelayXSBoolean();
             if (value != null) {
-                return value.getValue();
+                final Boolean flag = value.getValue();
+                if (flag != null) {
+                    return flag;
+                }
             }
         }
         if (soapObject instanceof AttributeExtensibleXMLObject) {
@@ -411,11 +420,11 @@ public final class SOAPSupport {
         
         final XMLObjectBuilderFactory builderFactory = XMLObjectProviderRegistrySupport.getBuilderFactory(); 
         
-        final Fault faultObj =  (Fault) builderFactory.getBuilder(Fault.DEFAULT_ELEMENT_NAME)
+        final Fault faultObj =  (Fault) builderFactory.ensureBuilder(Fault.DEFAULT_ELEMENT_NAME)
             .buildObject(Fault.DEFAULT_ELEMENT_NAME);
-        final FaultCode faultCodeObj =  (FaultCode) builderFactory.getBuilder(FaultCode.DEFAULT_ELEMENT_NAME)
+        final FaultCode faultCodeObj =  (FaultCode) builderFactory.ensureBuilder(FaultCode.DEFAULT_ELEMENT_NAME)
             .buildObject(FaultCode.DEFAULT_ELEMENT_NAME);
-        final FaultString faultStringObj =  (FaultString) builderFactory.getBuilder(FaultString.DEFAULT_ELEMENT_NAME)
+        final FaultString faultStringObj =  (FaultString) builderFactory.ensureBuilder(FaultString.DEFAULT_ELEMENT_NAME)
             .buildObject(FaultString.DEFAULT_ELEMENT_NAME);
         
         faultCodeObj.setValue(faultCode);
@@ -425,7 +434,7 @@ public final class SOAPSupport {
         faultObj.setMessage(faultStringObj);
         
         if (faultActor != null) {
-            final FaultActor faultActorObj =  (FaultActor) builderFactory.getBuilder(FaultActor.DEFAULT_ELEMENT_NAME)
+            final FaultActor faultActorObj =  (FaultActor) builderFactory.ensureBuilder(FaultActor.DEFAULT_ELEMENT_NAME)
                 .buildObject(FaultActor.DEFAULT_ELEMENT_NAME);
             faultActorObj.setURI(faultActor);
             faultObj.setActor(faultActorObj);
@@ -433,14 +442,14 @@ public final class SOAPSupport {
             
         Detail detailObj = null;
         if (detailChildren != null && !detailChildren.isEmpty()) {
-            detailObj = (Detail) builderFactory.getBuilder(Detail.DEFAULT_ELEMENT_NAME)
+            detailObj = (Detail) builderFactory.ensureBuilder(Detail.DEFAULT_ELEMENT_NAME)
                 .buildObject(Detail.DEFAULT_ELEMENT_NAME);
             detailObj.getUnknownXMLObjects().addAll(detailChildren);
         }
         
         if (detailAttributes != null && !detailAttributes.isEmpty()) {
             if (detailObj == null) {
-                detailObj = (Detail) builderFactory.getBuilder(Detail.DEFAULT_ELEMENT_NAME)
+                detailObj = (Detail) builderFactory.ensureBuilder(Detail.DEFAULT_ELEMENT_NAME)
                     .buildObject(Detail.DEFAULT_ELEMENT_NAME);
             }
             for (final Entry<QName,String> entry : detailAttributes.entrySet()) {
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Action.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Action.java
index aaedbb775..510060234 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Action.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Action.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:Action> element.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface Action extends AttributedURI {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "Action";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Action";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Address.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Address.java
index ce5735973..a01baf3e1 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Address.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Address.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:Address> element.
  * 
@@ -29,15 +31,15 @@ import javax.xml.namespace.QName;
 public interface Address extends AttributedURI {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "Address";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Address";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSAddressingConstants.WSA_NS, ELEMENT_LOCAL_NAME, WSAddressingConstants.WSA_PREFIX);
 
     /** Anonymous address URI. */
-    @Nonnull public static final String ANONYMOUS = WSAddressingConstants.WSA_NS + "/anonymous";
+    @Nonnull @NotEmpty public static final String ANONYMOUS = WSAddressingConstants.WSA_NS + "/anonymous";
 
     /** None address URI. */
-    @Nonnull public static final String NONE = WSAddressingConstants.WSA_NS + "/none";
+    @Nonnull @NotEmpty public static final String NONE = WSAddressingConstants.WSA_NS + "/none";
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedQName.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedQName.java
index 06c13746e..5e1e4f476 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedQName.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedQName.java
@@ -23,6 +23,8 @@ import javax.xml.namespace.QName;
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.schema.XSQName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for type <wsa:AttributedQName>.
  * 
@@ -32,7 +34,7 @@ import org.opensaml.core.xml.schema.XSQName;
 public interface AttributedQName extends XSQName, AttributeExtensibleXMLObject, WSAddressingObject {
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "AttributedQNameType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "AttributedQNameType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedURI.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedURI.java
index a9b2b5d74..0a1813856 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedURI.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedURI.java
@@ -23,6 +23,8 @@ import javax.xml.namespace.QName;
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.schema.XSURI;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element of type <wsa:AttributedURIType>.
  * 
@@ -32,7 +34,7 @@ import org.opensaml.core.xml.schema.XSURI;
 public interface AttributedURI extends XSURI, AttributeExtensibleXMLObject, WSAddressingObject {
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "AttributedURIType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "AttributedURIType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedUnsignedLong.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedUnsignedLong.java
index b30ae2c46..9d17d9f58 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedUnsignedLong.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/AttributedUnsignedLong.java
@@ -18,10 +18,13 @@
 package org.opensaml.soap.wsaddressing;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for type <wsa:AttributedUnsignedLongType>.
  * 
@@ -31,7 +34,7 @@ import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 public interface AttributedUnsignedLong extends AttributeExtensibleXMLObject, WSAddressingObject {
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "AttributedUnsignedLongType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "AttributedUnsignedLongType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
@@ -42,13 +45,13 @@ public interface AttributedUnsignedLong extends AttributeExtensibleXMLObject, WS
      * 
      * @return the element's value
      */
-    public Long getValue();
+    @Nullable public Long getValue();
 
     /**
      * Sets the element's value.
      * 
      * @param newValue the new element value
      */
-    public void setValue(Long newValue);
+    public void setValue(@Nullable final Long newValue);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/EndpointReference.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/EndpointReference.java
index 40b0f634c..2ee0b2c5b 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/EndpointReference.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/EndpointReference.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:EndpointReference> element.
  * 
@@ -32,7 +34,7 @@ import javax.xml.namespace.QName;
 public interface EndpointReference extends EndpointReferenceType {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "EndpointReference";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "EndpointReference";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/EndpointReferenceType.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/EndpointReferenceType.java
index fbc787c45..98128b9af 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/EndpointReferenceType.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/EndpointReferenceType.java
@@ -18,11 +18,14 @@
 package org.opensaml.soap.wsaddressing;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element of type {@link EndpointReferenceType}.
  * 
@@ -33,7 +36,7 @@ public interface EndpointReferenceType
         extends AttributeExtensibleXMLObject, ElementExtensibleXMLObject, WSAddressingObject {
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "EndpointReferenceType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "EndpointReferenceType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
@@ -44,41 +47,41 @@ public interface EndpointReferenceType
      * 
      * @return the {@link Address} child element or <code>null</code>
      */
-    public Address getAddress();
+    @Nullable public Address getAddress();
 
     /**
      * Sets the <wsa:Address> child element.
      * 
      * @param address the {@link Address} child element to set.
      */
-    public void setAddress(Address address);
+    public void setAddress(@Nullable final Address address);
 
     /**
      * Returns the optional <wsa:Metadata> child element.
      * 
      * @return the {@link Metadata} child element or <code>null</code>.
      */
-    public Metadata getMetadata();
+    @Nullable public Metadata getMetadata();
 
     /**
      * Sets the <wsa:Metadata> child element.
      * 
      * @param metadata the {@link Metadata} child element to set.
      */
-    public void setMetadata(Metadata metadata);
+    public void setMetadata(@Nullable final Metadata metadata);
 
     /**
      * Returns the optional <wsa:ReferenceParameters> child element.
      * 
      * @return the {@link ReferenceParameters} child element or <code>null</code>.
      */
-    public ReferenceParameters getReferenceParameters();
+    @Nullable public ReferenceParameters getReferenceParameters();
 
     /**
      * Sets the <wsa:ReferenceParameters> child element.
      * 
      * @param referenceParameters the {@link ReferenceParameters} child element to set.
      */
-    public void setReferenceParameters(ReferenceParameters referenceParameters);
+    public void setReferenceParameters(@Nullable final ReferenceParameters referenceParameters);
 
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/FaultTo.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/FaultTo.java
index e74eec34d..a312c4ea0 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/FaultTo.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/FaultTo.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:FaultTo> element.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface FaultTo extends EndpointReferenceType {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "FaultTo";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "FaultTo";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/From.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/From.java
index be530c9c8..aae2e6de9 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/From.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/From.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:From> element.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface From extends EndpointReferenceType {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "From";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "From";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/IsReferenceParameterBearing.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/IsReferenceParameterBearing.java
index acbec79fb..63cef7ca6 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/IsReferenceParameterBearing.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/IsReferenceParameterBearing.java
@@ -18,10 +18,13 @@
 package org.opensaml.soap.wsaddressing;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.schema.XSBooleanValue;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element having a <code>@wsa:IsReferenceParameter</code> attribute.
  * 
@@ -29,7 +32,7 @@ import org.opensaml.core.xml.schema.XSBooleanValue;
 public interface IsReferenceParameterBearing {
 
     /** the <code>IsReferenceParameter</code> attribute local name. */
-    @Nonnull public static final String WSA_IS_REFERENCE_PARAMETER_ATTR_LOCAL_NAME = "IsReferenceParameter";
+    @Nonnull @NotEmpty public static final String WSA_IS_REFERENCE_PARAMETER_ATTR_LOCAL_NAME = "IsReferenceParameter";
 
     /** the <code>wsa:IsReferenceParameter</code> qualified attribute name. */
     @Nonnull public static final QName WSA_IS_REFERENCE_PARAMETER_ATTR_NAME =
@@ -41,27 +44,27 @@ public interface IsReferenceParameterBearing {
      * 
      * @return The <code>@wsa:IsReferenceParameter</code> attribute value or <code>null</code>.
      */
-    public Boolean isWSAIsReferenceParameter();
+    @Nullable public Boolean isWSAIsReferenceParameter();
 
     /**
      * Returns the <code>@wsa:IsReferenceParameter</code> attribute value.
      * 
      * @return The <code>@wsa:IsReferenceParameter</code> attribute value or <code>null</code>.
      */
-    public XSBooleanValue isWSAIsReferenceParameterXSBoolean();
+    @Nullable public XSBooleanValue isWSAIsReferenceParameterXSBoolean();
 
     /**
      * Sets the <code>@wsa:IsReferenceParameter</code> attribute value.
      * 
      * @param newIsReferenceParameter The <code>@wsa:IsReferenceParameter</code> attribute value
      */
-    public void setWSAIsReferenceParameter(Boolean newIsReferenceParameter);
+    public void setWSAIsReferenceParameter(@Nullable final Boolean newIsReferenceParameter);
     
     /**
      * Sets the <code>@wsa:IsReferenceParameter</code> attribute value.
      * 
      * @param newIsReferenceParameter The <code>@wsa:IsReferenceParameter</code> attribute value
      */
-    public void setWSAIsReferenceParameter(XSBooleanValue newIsReferenceParameter);
+    public void setWSAIsReferenceParameter(@Nullable final XSBooleanValue newIsReferenceParameter);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/MessageID.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/MessageID.java
index cd661b396..26ed839b0 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/MessageID.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/MessageID.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:MessageID> element.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface MessageID extends AttributedURI {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "MessageID";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "MessageID";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Metadata.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Metadata.java
index 6884c9efb..7c88c4d97 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Metadata.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/Metadata.java
@@ -23,6 +23,8 @@ import javax.xml.namespace.QName;
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The optional <wsa:Metadata> element.
  * 
@@ -32,14 +34,14 @@ import org.opensaml.core.xml.ElementExtensibleXMLObject;
 public interface Metadata extends AttributeExtensibleXMLObject, ElementExtensibleXMLObject, WSAddressingObject {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "Metadata";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Metadata";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSAddressingConstants.WSA_NS, ELEMENT_LOCAL_NAME, WSAddressingConstants.WSA_PREFIX);
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "MetadataType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "MetadataType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemAction.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemAction.java
index cc9e6e3b4..c461dc73e 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemAction.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemAction.java
@@ -18,10 +18,13 @@
 package org.opensaml.soap.wsaddressing;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element <wsa:ProblemAction>.
  * 
@@ -31,14 +34,14 @@ import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 public interface ProblemAction extends AttributeExtensibleXMLObject, WSAddressingObject {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "ProblemAction";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "ProblemAction";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSAddressingConstants.WSA_NS, ELEMENT_LOCAL_NAME, WSAddressingConstants.WSA_PREFIX);
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "ProblemActionType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "ProblemActionType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
@@ -49,26 +52,26 @@ public interface ProblemAction extends AttributeExtensibleXMLObject, WSAddressin
      * 
      * @return the Action child element
      */
-    public Action getAction();
+    @Nullable public Action getAction();
     
     /**
      * Set the Action child element.
      * 
      * @param newAction the new Action child element
      */
-    public void setAction(Action newAction);
+    public void setAction(@Nullable final Action newAction);
 
     /**
      * Get the SoapAction child element.
      * 
      * @return the SoapAction child element
      */
-    public SoapAction getSoapAction();
+    @Nullable public SoapAction getSoapAction();
     
     /**
      * Set the SoapAction child element.
      * 
      * @param newSoapAction the new SoapAction child element
      */
-    public void setSoapAction(SoapAction newSoapAction);
+    public void setSoapAction(@Nullable final SoapAction newSoapAction);
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemHeaderQName.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemHeaderQName.java
index ae4cfb0cc..1bbec4e8b 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemHeaderQName.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemHeaderQName.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element <wsa:ProblemHeaderQName>.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface ProblemHeaderQName extends AttributedQName {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "ProblemHeaderQName";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "ProblemHeaderQName";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemIRI.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemIRI.java
index e729cf806..59877f0ec 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemIRI.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ProblemIRI.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:ProblemIRI> element.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface ProblemIRI extends AttributedURI {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "ProblemIRI";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "ProblemIRI";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ReferenceParameters.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ReferenceParameters.java
index b36df2a84..082459b45 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ReferenceParameters.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ReferenceParameters.java
@@ -23,6 +23,8 @@ import javax.xml.namespace.QName;
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The optional <wsa:ReferenceParameters> element.
  * 
@@ -33,14 +35,14 @@ public interface ReferenceParameters
         extends AttributeExtensibleXMLObject, ElementExtensibleXMLObject, WSAddressingObject {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "ReferenceParameters";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "ReferenceParameters";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSAddressingConstants.WSA_NS, ELEMENT_LOCAL_NAME, WSAddressingConstants.WSA_PREFIX);
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "ReferenceParametersType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "ReferenceParametersType"; 
         
     /** QName of the XSI type. */
     @Nonnull  public static final QName TYPE_NAME = 
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/RelatesTo.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/RelatesTo.java
index 4deebc2f0..fe994d1cf 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/RelatesTo.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/RelatesTo.java
@@ -18,11 +18,14 @@
 package org.opensaml.soap.wsaddressing;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.schema.XSURI;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element <wsa:RelatesTo>.
  * 
@@ -32,37 +35,37 @@ import org.opensaml.core.xml.schema.XSURI;
 public interface RelatesTo extends XSURI, AttributeExtensibleXMLObject, WSAddressingObject {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "RelatesTo";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "RelatesTo";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSAddressingConstants.WSA_NS, ELEMENT_LOCAL_NAME, WSAddressingConstants.WSA_PREFIX);
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "RelatesToType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "RelatesToType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
         new QName(WSAddressingConstants.WSA_NS, TYPE_LOCAL_NAME, WSAddressingConstants.WSA_PREFIX);
     
     /** The RelationshipType attribute name. */
-    @Nonnull public static final String RELATIONSHIP_TYPE_ATTRIB_NAME = "RelationshipType";
+    @Nonnull @NotEmpty public static final String RELATIONSHIP_TYPE_ATTRIB_NAME = "RelationshipType";
     
     /** RelationshipType attribute - Reply URI. */
-    @Nonnull public static final String RELATIONSHIP_TYPE_REPLY = WSAddressingConstants.WSA_NS + "/reply";
+    @Nonnull @NotEmpty public static final String RELATIONSHIP_TYPE_REPLY = WSAddressingConstants.WSA_NS + "/reply";
     
     /**
      * Returns the RelationshipType attribute URI value.
      * 
      * @return the RelationshipType attribute value or <code>null</code>.
      */
-    public String getRelationshipType();
+    @Nullable public String getRelationshipType();
 
     /**
      * Sets the RelationshipType attribute URI value.
      * 
      * @param newRelationshipType the RelationshipType attribute value.
      */
-    public void setRelationshipType(String newRelationshipType);
+    public void setRelationshipType(@Nullable final String newRelationshipType);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ReplyTo.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ReplyTo.java
index 4e713960e..821e42efb 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ReplyTo.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/ReplyTo.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:ReplyTo> element.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface ReplyTo extends EndpointReferenceType {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "ReplyTo";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "ReplyTo";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/RetryAfter.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/RetryAfter.java
index 3ec52f8b4..ecaeba638 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/RetryAfter.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/RetryAfter.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element <wsa:RetryAfter>.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface RetryAfter extends AttributedUnsignedLong {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "RetryAfter";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "RetryAfter";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/SoapAction.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/SoapAction.java
index a0a9dd8b2..d6cf0b214 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/SoapAction.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/SoapAction.java
@@ -22,6 +22,8 @@ import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.schema.XSURI;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element of type <wsa:SoapAction>.
  * 
@@ -31,7 +33,7 @@ import org.opensaml.core.xml.schema.XSURI;
 public interface SoapAction extends XSURI, WSAddressingObject {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "SoapAction";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "SoapAction";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/To.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/To.java
index 481c6c715..039b1d4a1 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/To.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/To.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wsaddressing;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsa:To> element.
  * 
@@ -29,7 +31,7 @@ import javax.xml.namespace.QName;
 public interface To extends AttributedURI {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "To";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "To";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/WSAddressingObjectBuilder.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/WSAddressingObjectBuilder.java
index 6b5d53717..1e411143e 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/WSAddressingObjectBuilder.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/WSAddressingObjectBuilder.java
@@ -17,6 +17,8 @@
 
 package org.opensaml.soap.wsaddressing;
 
+import javax.annotation.Nonnull;
+
 import org.opensaml.core.xml.XMLObjectBuilder;
 
 /**
@@ -33,5 +35,5 @@ public interface WSAddressingObjectBuilder<WSAddressingObjectType extends WSAddr
      * 
      * @return the built object
      */
-    public WSAddressingObjectType buildObject();
+    @Nonnull public WSAddressingObjectType buildObject();
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/messaging/WSAddressingContext.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/messaging/WSAddressingContext.java
index a2ee1b767..599d27a7f 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/messaging/WSAddressingContext.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/messaging/WSAddressingContext.java
@@ -17,6 +17,8 @@
 
 package org.opensaml.soap.wsaddressing.messaging;
 
+import javax.annotation.Nullable;
+
 import org.opensaml.messaging.context.BaseContext;
 
 import net.shibboleth.shared.primitive.StringSupport;
@@ -29,26 +31,26 @@ public class WSAddressingContext extends BaseContext {
     //TODO implement support for remaining items of WS-Addressing data model
     
     /** The Action URI value. */
-    private String actionURI;
+    @Nullable private String actionURI;
     
     /** The Fault Action URI value. */
-    private String faultActionURI;
+    @Nullable private String faultActionURI;
     
     /** The MessageID URI value. */
-    private String messageIDURI;
+    @Nullable private String messageIDURI;
     
     /** The RelatesTo URI value. */
-    private String relatesToURI;
+    @Nullable private String relatesToURI;
     
     /** The RelatesTo RelationshipType attribute value. */
-    private String relatesToRelationshipType;
+    @Nullable private String relatesToRelationshipType;
     
     /**
      * Get the Action URI value.
      * 
      * @return the action URI.
      */
-    public String getActionURI() {
+    @Nullable public String getActionURI() {
         return actionURI;
     }
 
@@ -57,7 +59,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @param uri the new Action URI value
      */
-    public void setActionURI(final String uri) {
+    public void setActionURI(@Nullable final String uri) {
         actionURI = StringSupport.trimOrNull(uri);
     }
     
@@ -66,7 +68,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @return the fault action URI.
      */
-    public String getFaultActionURI() {
+    @Nullable public String getFaultActionURI() {
         return faultActionURI;
     }
 
@@ -75,7 +77,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @param uri the new Fault Action URI value
      */
-    public void setFaultActionURI(final String uri) {
+    public void setFaultActionURI(@Nullable final String uri) {
         faultActionURI = StringSupport.trimOrNull(uri);
     }
     
@@ -84,7 +86,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @return the MessageID URI
      */
-    public String getMessageIDURI() {
+    @Nullable public String getMessageIDURI() {
         return messageIDURI;
     }
 
@@ -93,7 +95,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @param uri the new MessageID URI value
      */
-    public void setMessageIDURI(final String uri) {
+    public void setMessageIDURI(@Nullable final String uri) {
         messageIDURI = StringSupport.trimOrNull(uri);
     }
 
@@ -102,7 +104,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @return the RelatesTo URI
      */
-    public String getRelatesToURI() {
+    @Nullable public String getRelatesToURI() {
         return relatesToURI;
     }
 
@@ -111,7 +113,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @param uri the RelatesTo URI value
      */
-    public void setRelatesToURI(final String uri) {
+    public void setRelatesToURI(@Nullable final String uri) {
         relatesToURI = StringSupport.trimOrNull(uri);
     }
 
@@ -120,7 +122,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @return the RelatesTo RelationshipType attribute value
      */
-    public String getRelatesToRelationshipType() {
+    @Nullable public String getRelatesToRelationshipType() {
         return relatesToRelationshipType;
     }
 
@@ -129,7 +131,7 @@ public class WSAddressingContext extends BaseContext {
      * 
      * @param value the RelatesTo RelationshipType attribute value
      */
-    public void setRelatesToRelationshipType(final String value) {
+    public void setRelatesToRelationshipType(@Nullable final String value) {
         relatesToRelationshipType = StringSupport.trimOrNull(value);
     }
 
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/util/WSAddressingSupport.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/util/WSAddressingSupport.java
index e38b12e68..09cf06d97 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/util/WSAddressingSupport.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsaddressing/util/WSAddressingSupport.java
@@ -68,7 +68,10 @@ public final class WSAddressingSupport {
         if (soapObject instanceof IsReferenceParameterBearing) {
             final XSBooleanValue value = ((IsReferenceParameterBearing)soapObject).isWSAIsReferenceParameterXSBoolean();
             if (value != null) {
-                return value.getValue();
+                final Boolean flag = value.getValue();
+                if (flag != null) {
+                    return flag;
+                }
             }
         }
         if (soapObject instanceof AttributeExtensibleXMLObject) {
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/Address.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/Address.java
index 2fde08ea3..634a3bf2b 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/Address.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/Address.java
@@ -18,6 +18,7 @@
 package org.opensaml.soap.wsfed;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 /**
@@ -29,8 +30,8 @@ public interface Address extends WSFedObject {
     @Nonnull public static final String DEFAULT_ELEMENT_LOCAL_NAME = "Address";
 
     /** Default element name. */
-    @Nonnull public static final QName DEFAULT_ELEMENT_NAME = new QName(WSFedConstants.WSADDRESS_NS, DEFAULT_ELEMENT_LOCAL_NAME,
-            WSFedConstants.WSADDRESS_PREFIX);
+    @Nonnull public static final QName DEFAULT_ELEMENT_NAME =
+            new QName(WSFedConstants.WSADDRESS_NS, DEFAULT_ELEMENT_LOCAL_NAME, WSFedConstants.WSADDRESS_PREFIX);
 
     /** Local name of the XSI type. */
     @Nonnull public static final String TYPE_LOCAL_NAME = "AddressType";
@@ -44,12 +45,12 @@ public interface Address extends WSFedObject {
      * 
      * @return the end point address
      */
-    public String getValue();
+    @Nullable public String getValue();
 
     /**
      * Sets the end point reference address.
      * 
      * @param value the end point address
      */
-    public void setValue(String value);
+    public void setValue(@Nullable final String value);
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/AppliesTo.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/AppliesTo.java
index 2fd818afb..3899c5eb6 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/AppliesTo.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/AppliesTo.java
@@ -18,6 +18,7 @@
 package org.opensaml.soap.wsfed;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 /**
@@ -29,8 +30,8 @@ public interface AppliesTo extends WSFedObject {
     @Nonnull public static final String DEFAULT_ELEMENT_LOCAL_NAME = "AppliesTo";
 
     /** Default element name. */
-    @Nonnull public static final QName DEFAULT_ELEMENT_NAME = new QName(WSFedConstants.WSPOLICY_NS, DEFAULT_ELEMENT_LOCAL_NAME,
-            WSFedConstants.WSPOLICY_PREFIX);
+    @Nonnull public static final QName DEFAULT_ELEMENT_NAME =
+            new QName(WSFedConstants.WSPOLICY_NS, DEFAULT_ELEMENT_LOCAL_NAME, WSFedConstants.WSPOLICY_PREFIX);
 
     /** Local name of the XSI type. */
     @Nonnull public static final String TYPE_LOCAL_NAME = "AppliesToType";
@@ -44,12 +45,12 @@ public interface AppliesTo extends WSFedObject {
      * 
      * @return the endpoint reference of the entity applicable entity
      */
-    public EndPointReference getEndPointReference();
+    @Nullable public EndPointReference getEndPointReference();
 
     /**
      * Sets the endpoint reference of the entity applicable entity.
      * 
      * @param newEndPointReference the endpoint reference of the entity applicable entity
      */
-    public void setEndPointReference(EndPointReference newEndPointReference);
+    public void setEndPointReference(@Nullable final EndPointReference newEndPointReference);
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/EndPointReference.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/EndPointReference.java
index 6473b0d9d..aba001484 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/EndPointReference.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/EndPointReference.java
@@ -18,6 +18,7 @@
 package org.opensaml.soap.wsfed;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 /**
@@ -30,8 +31,8 @@ public interface EndPointReference extends WSFedObject {
     @Nonnull public static final String DEFAULT_ELEMENT_LOCAL_NAME = "EndPointReference";
 
     /** Default element name. */
-    @Nonnull public static final QName DEFAULT_ELEMENT_NAME = new QName(WSFedConstants.WSADDRESS_NS, DEFAULT_ELEMENT_LOCAL_NAME,
-            WSFedConstants.WSADDRESS_PREFIX);
+    @Nonnull public static final QName DEFAULT_ELEMENT_NAME =
+            new QName(WSFedConstants.WSADDRESS_NS, DEFAULT_ELEMENT_LOCAL_NAME, WSFedConstants.WSADDRESS_PREFIX);
 
     /** Local name of the XSI type. */
     @Nonnull public static final String TYPE_LOCAL_NAME = "EndPointReferenceType";
@@ -45,12 +46,12 @@ public interface EndPointReference extends WSFedObject {
      * 
      * @return the end point address
      */
-    public Address getAddress();
+    @Nullable public Address getAddress();
 
     /**
      * Sets the end point address as an object.
      * 
      * @param address the end point address
      */
-    public void setAddress(Address address);
+    public void setAddress(@Nullable final Address address);
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/RequestSecurityTokenResponse.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/RequestSecurityTokenResponse.java
index 6bc684971..43c28f3d2 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/RequestSecurityTokenResponse.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/RequestSecurityTokenResponse.java
@@ -20,6 +20,7 @@ package org.opensaml.soap.wsfed;
 import java.util.List;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 /**
@@ -32,8 +33,8 @@ public interface RequestSecurityTokenResponse extends WSFedObject {
     @Nonnull public static final String DEFAULT_ELEMENT_LOCAL_NAME = "RequestSecurityTokenResponse";
 
     /** Default element name. */
-    @Nonnull public static final QName DEFAULT_ELEMENT_NAME = new QName(WSFedConstants.WSFED11P_NS, DEFAULT_ELEMENT_LOCAL_NAME,
-            WSFedConstants.WSFED1P_PREFIX);
+    @Nonnull public static final QName DEFAULT_ELEMENT_NAME =
+            new QName(WSFedConstants.WSFED11P_NS, DEFAULT_ELEMENT_LOCAL_NAME, WSFedConstants.WSFED1P_PREFIX);
 
     /** Local name of the XSI type. */
     @Nonnull public static final String TYPE_LOCAL_NAME = "RequestSecurityTokenResponseType";
@@ -47,19 +48,19 @@ public interface RequestSecurityTokenResponse extends WSFedObject {
      * 
      * @return the entity to which the token applies
      */
-    public AppliesTo getAppliesTo();
+    @Nullable public AppliesTo getAppliesTo();
 
     /**
      * Set the entity to which the token applies.
      * 
      * @param appliesTo the entity to which the token applies
      */
-    public void setAppliesTo(AppliesTo appliesTo);
+    public void setAppliesTo(@Nullable final AppliesTo appliesTo);
 
     /**
      * Return the list of Security Token child elements.
      * 
      * @return the list of RequestedSecurityToken child elements.
      */
-    public List<RequestedSecurityToken> getRequestedSecurityToken();
+    @Nonnull public List<RequestedSecurityToken> getRequestedSecurityToken();
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/RequestedSecurityToken.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/RequestedSecurityToken.java
index 9ceda84d2..c08634ef1 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/RequestedSecurityToken.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/RequestedSecurityToken.java
@@ -34,8 +34,8 @@ public interface RequestedSecurityToken extends WSFedObject {
     @Nonnull public static final String DEFAULT_ELEMENT_LOCAL_NAME = "RequestedSecurityToken";
 
     /** Default element name. */
-    @Nonnull public static final QName DEFAULT_ELEMENT_NAME = new QName(WSFedConstants.WSFED11P_NS, DEFAULT_ELEMENT_LOCAL_NAME,
-            WSFedConstants.WSFED1P_PREFIX);
+    @Nonnull public static final QName DEFAULT_ELEMENT_NAME =
+            new QName(WSFedConstants.WSFED11P_NS, DEFAULT_ELEMENT_LOCAL_NAME, WSFedConstants.WSFED1P_PREFIX);
 
     /** Local name of the XSI type. */
     @Nonnull public static final String TYPE_LOCAL_NAME = "RequestedSecurityTokenType";
@@ -49,5 +49,5 @@ public interface RequestedSecurityToken extends WSFedObject {
      * 
      * @return the list security tokens
      */
-    public List<XMLObject> getSecurityTokens();
+    @Nonnull public List<XMLObject> getSecurityTokens();
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/WSFedConstants.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/WSFedConstants.java
index 99cf18a0d..1d803589b 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/WSFedConstants.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/WSFedConstants.java
@@ -19,26 +19,28 @@ package org.opensaml.soap.wsfed;
 
 import javax.annotation.Nonnull;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /** WS-Federation Constants. */
 public final class WSFedConstants {
 
     /** WSFED 1.1 protocol XML namespace. */
-    @Nonnull public static final String WSFED11P_NS = "http://schemas.xmlsoap.org/ws/2005/02/trust";
+    @Nonnull @NotEmpty public static final String WSFED11P_NS = "http://schemas.xmlsoap.org/ws/2005/02/trust";
 
     /** WSFED 1.X Protocol QName prefix. */
-    @Nonnull public static final String WSFED1P_PREFIX = "wst";
+    @Nonnull @NotEmpty public static final String WSFED1P_PREFIX = "wst";
 
     /** WSFED 1.X Policy XML namespace. */
-    @Nonnull public static final String WSPOLICY_NS = "http://schemas.xmlsoap.org/ws/2004/09/policy";
+    @Nonnull @NotEmpty public static final String WSPOLICY_NS = "http://schemas.xmlsoap.org/ws/2004/09/policy";
 
     /** WSFED 1.X Policy QName prefix. */
-    @Nonnull public static final String WSPOLICY_PREFIX = "wsp";
+    @Nonnull @NotEmpty public static final String WSPOLICY_PREFIX = "wsp";
 
     /** WSFED 1.X Address XML namespace. */
-    @Nonnull public static final String WSADDRESS_NS = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
+    @Nonnull @NotEmpty public static final String WSADDRESS_NS = "http://schemas.xmlsoap.org/ws/2004/08/addressing";
 
     /** WSFED 1.X Address QName prefix. */
-    @Nonnull public static final String WSADDRESS_PREFIX = "wsa";
+    @Nonnull @NotEmpty public static final String WSADDRESS_PREFIX = "wsa";
     
     /** Constructor. */
     private WSFedConstants() {
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/WSFedObjectBuilder.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/WSFedObjectBuilder.java
index 0b533c216..71a0faac4 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/WSFedObjectBuilder.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wsfed/WSFedObjectBuilder.java
@@ -17,6 +17,8 @@
 
 package org.opensaml.soap.wsfed;
 
+import javax.annotation.Nonnull;
+
 import org.opensaml.core.xml.XMLObjectBuilder;
 
 /**
@@ -31,5 +33,5 @@ public interface WSFedObjectBuilder<WSFedObjectType extends WSFedObject> extends
      * 
      * @return the constructed object
      */
-    public WSFedObjectType buildObject();
+    @Nonnull public WSFedObjectType buildObject();
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/All.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/All.java
index 42e5a5d89..808885467 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/All.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/All.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wspolicy;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The wsp:All element.
  * 
@@ -28,7 +30,7 @@ import javax.xml.namespace.QName;
 public interface All extends OperatorContentType {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "All";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "All";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/AppliesTo.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/AppliesTo.java
index 214de2154..d212acedb 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/AppliesTo.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/AppliesTo.java
@@ -17,11 +17,14 @@
 
 package org.opensaml.soap.wspolicy;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The wsp:AppliesTo element.
  * 
@@ -31,10 +34,10 @@ import org.opensaml.core.xml.ElementExtensibleXMLObject;
 public interface AppliesTo extends AttributeExtensibleXMLObject, ElementExtensibleXMLObject, WSPolicyObject {
 
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME= "AppliesTo";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME= "AppliesTo";
 
     /** Default element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSPolicyConstants.WSP_NS, ELEMENT_LOCAL_NAME, WSPolicyConstants.WSP_PREFIX);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/ExactlyOne.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/ExactlyOne.java
index 87b1cb688..05c20b0ba 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/ExactlyOne.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/ExactlyOne.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wspolicy;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The wsp:ExactlyOne element.
  * 
@@ -28,7 +30,7 @@ import javax.xml.namespace.QName;
 public interface ExactlyOne extends OperatorContentType {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "ExactlyOne";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "ExactlyOne";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/OperatorContentType.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/OperatorContentType.java
index e427ed760..c06a1c751 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/OperatorContentType.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/OperatorContentType.java
@@ -24,13 +24,15 @@ import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.XMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The OperatorContentType complex type.
  */
 public interface OperatorContentType extends WSPolicyObject {
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "OperatorContentType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "OperatorContentType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
@@ -41,36 +43,35 @@ public interface OperatorContentType extends WSPolicyObject {
      * 
      * @return the list of {@link Policy} elements
      */
-    public List<Policy> getPolicies();
+    @Nonnull public List<Policy> getPolicies();
     
     /**
      * Get the list of {@link All} elements.
      * 
      * @return the list of {@link All} elements
      */
-    public List<All> getAlls();
+    @Nonnull public List<All> getAlls();
     
     /**
      * Get the list of {@link ExactlyOne} elements.
      * 
      * @return the list of {@link ExactlyOne} elements
      */
-    public List<ExactlyOne> getExactlyOnes();
+    @Nonnull public List<ExactlyOne> getExactlyOnes();
     
     /**
      * Get the list of {@link PolicyReference} elements.
      * 
      * @return the list of {@link PolicyReference} elements
      */
-    public List<PolicyReference> getPolicyReferences();
-    
+    @Nonnull public List<PolicyReference> getPolicyReferences();
     
     /**
      * Get the complete modifiable list of XMLObject children.
      * 
      * @return the list of {@link XMLObject} instances
      */
-    public List<XMLObject> getXMLObjects();
+    @Nonnull public List<XMLObject> getXMLObjects();
     
     /**
      * Get the modifiable sublist of XMLObject children which match the specified
@@ -80,6 +81,6 @@ public interface OperatorContentType extends WSPolicyObject {
      * 
      * @return the list of {@link XMLObject} instances
      */
-    public List<XMLObject> getXMLObjects(QName typeOrName);
+    @Nonnull public List<XMLObject> getXMLObjects(QName typeOrName);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/OptionalBearing.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/OptionalBearing.java
index daa6b44d9..e862d0f39 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/OptionalBearing.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/OptionalBearing.java
@@ -18,17 +18,20 @@
 package org.opensaml.soap.wspolicy;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.schema.XSBooleanValue;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element having a <code>@wsp:Optional</code> attribute.
  */
 public interface OptionalBearing {
     
     /** The wsp:@Optional attribute local name. */
-    @Nonnull public static final String WSP_OPTIONAL_ATTR_LOCAL_NAME = "Optional";
+    @Nonnull @NotEmpty public static final String WSP_OPTIONAL_ATTR_LOCAL_NAME = "Optional";
 
     /** The wsp:@Optional qualified attribute name. */
     @Nonnull public static final QName WSP_OPTIONAL_ATTR_NAME =
@@ -39,27 +42,27 @@ public interface OptionalBearing {
      * 
      * @return return the attribute value
      */
-    public Boolean isWSP12Optional();
+    @Nullable public Boolean isWSP12Optional();
     
     /**
      * Get the attribute value.
      * 
      * @return return the attribute value
      */
-    public XSBooleanValue isWSP12OptionalXSBoolean();
+    @Nullable public XSBooleanValue isWSP12OptionalXSBoolean();
     
     /**
      * Set the attribute value.
      * 
      * @param newOptional the new attribute value
      */
-    public void setWSP12Optional(Boolean newOptional);
+    public void setWSP12Optional(@Nullable final Boolean newOptional);
     
     /**
      * Set the attribute value.
      * 
      * @param newOptional the new attribute value
      */
-    public void setWSP12Optional(XSBooleanValue newOptional);
+    public void setWSP12Optional(@Nullable final XSBooleanValue newOptional);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/Policy.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/Policy.java
index 94ccb933a..dbf4e8865 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/Policy.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/Policy.java
@@ -18,11 +18,14 @@
 package org.opensaml.soap.wspolicy;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.soap.wssecurity.IdBearing;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The wsp:Policy element.
  * 
@@ -32,27 +35,27 @@ import org.opensaml.soap.wssecurity.IdBearing;
 public interface Policy extends OperatorContentType, AttributeExtensibleXMLObject, IdBearing {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "Policy";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Policy";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSPolicyConstants.WSP_NS, ELEMENT_LOCAL_NAME, WSPolicyConstants.WSP_PREFIX);
 
     /** The wsp:Policy/@Name attribute local name. */
-    @Nonnull public static final String NAME_ATTRIB_NAME = "Name";
+    @Nonnull @NotEmpty public static final String NAME_ATTRIB_NAME = "Name";
 
     /**
      * Returns the wsp:Policy/@Name attribute value.
      * 
      * @return the <code>Name</code> attribute value or <code>null</code>.
      */
-    public String getName();
+    @Nullable public String getName();
 
     /**
      * Sets the wsp:Policy/@Name attribute value.
      * 
      * @param name the <code>Name</code> attribute value to set.
      */
-    public void setName(String name);
+    public void setName(@Nullable final String name);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyAttachment.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyAttachment.java
index 986d2fc1a..394a470a3 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyAttachment.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyAttachment.java
@@ -20,11 +20,14 @@ package org.opensaml.soap.wspolicy;
 import java.util.List;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The wsp:PolicyAttachment element.
  * 
@@ -33,7 +36,7 @@ import org.opensaml.core.xml.ElementExtensibleXMLObject;
 public interface PolicyAttachment extends WSPolicyObject, ElementExtensibleXMLObject, AttributeExtensibleXMLObject {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "PolicyAttachment";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "PolicyAttachment";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
@@ -44,27 +47,27 @@ public interface PolicyAttachment extends WSPolicyObject, ElementExtensibleXMLOb
      * 
      * @return the child element
      */
-    public AppliesTo getAppliesTo();
+    @Nullable public AppliesTo getAppliesTo();
     
     /**
      * Set the AppliesTo child element.
      * 
      * @param newAppliesTo the new child element
      */
-    public void setAppliesTo(AppliesTo newAppliesTo);
+    public void setAppliesTo(@Nullable final AppliesTo newAppliesTo);
     
     /**
      * Get the list of Policy child elements.
      * 
      * @return the list of child elements
      */
-    public List<Policy> getPolicies();
+    @Nonnull public List<Policy> getPolicies();
     
     /**
      * Get the list of PolicyReference child elements.
      * 
      * @return the list of child elements
      */
-    public List<PolicyReference> getPolicyReferences();
+    @Nonnull public List<PolicyReference> getPolicyReferences();
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyReference.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyReference.java
index 0f779461d..dc764f9ad 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyReference.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyReference.java
@@ -18,10 +18,13 @@
 package org.opensaml.soap.wspolicy;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The wsp:PolicyReference element.
  * 
@@ -31,64 +34,64 @@ import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 public interface PolicyReference extends AttributeExtensibleXMLObject, WSPolicyObject {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "PolicyReference";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "PolicyReference";
 
     /** Default element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSPolicyConstants.WSP_NS, ELEMENT_LOCAL_NAME, WSPolicyConstants.WSP_PREFIX);
 
     /** The wsp:PolicyReference/@URI attribute local name. */
-    @Nonnull public static final String URI_ATTRIB_NAME = "URI";
+    @Nonnull @NotEmpty public static final String URI_ATTRIB_NAME = "URI";
 
     /** The wsp:PolicyReference/@Digest attribute local name. */
-    @Nonnull public static final String DIGEST_ATTRIB_NAME = "Digest";
+    @Nonnull @NotEmpty public static final String DIGEST_ATTRIB_NAME = "Digest";
 
     /** The wsp:PolicyReference/@Digest attribute local name. */
-    @Nonnull public static final String DIGEST_ALGORITHM_ATTRIB_NAME = "DigestAlgorithm";
+    @Nonnull @NotEmpty public static final String DIGEST_ALGORITHM_ATTRIB_NAME = "DigestAlgorithm";
 
     /** The default wsp:PolicyReference/@DigestAlgorithm attribute value. */
-    @Nonnull public static final String DIGEST_ALGORITHM_SHA1EXC = WSPolicyConstants.WSP_NS + "/Sha1Exc";
+    @Nonnull @NotEmpty public static final String DIGEST_ALGORITHM_SHA1EXC = WSPolicyConstants.WSP_NS + "/Sha1Exc";
 
     /**
      * Returns the wsp:PolicyReference/@URI attribute value.
      * 
      * @return the URI attribute value.
      */
-    public String getURI();
+    @Nullable public String getURI();
 
     /**
      * Sets the wsp:PolicyReference/@URI attribute value.
      * 
      * @param uri the URI attribute value to set.
      */
-    public void setURI(String uri);
+    public void setURI(@Nullable final String uri);
 
     /**
      * Returns the wsp:PolicyReference/@Digest attribute URI value.
      * 
      * @return the Digest attribute URI value.
      */
-    public String getDigest();
+    @Nullable public String getDigest();
 
     /**
      * Sets the wsp:PolicyReference/@Digest attribute URI value.
      * 
      * @param digest the Digest attribute URI value to set.
      */
-    public void setDigest(String digest);
+    public void setDigest(@Nullable final String digest);
 
     /**
      * Returns the wsp:PolicyReference/@DigestAlgoritm attribute Base64 binary value.
      * 
      * @return the DigestAlgoritm attribute Base64 binary value.
      */
-    public String getDigestAlgorithm();
+    @Nullable public String getDigestAlgorithm();
 
     /**
      * Sets the wsp:PolicyReference/@DigestAlgoritm attribute Base64 binary value.
      * 
      * @param digestAlgorithm the DigestAlgoritm attribute Base64 binary value to set.
      */
-    public void setDigestAlgorithm(String digestAlgorithm);
+    public void setDigestAlgorithm(@Nullable final String digestAlgorithm);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyURIsBearing.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyURIsBearing.java
index 69a02c589..cafd1ddd9 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyURIsBearing.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/PolicyURIsBearing.java
@@ -20,15 +20,18 @@ package org.opensaml.soap.wspolicy;
 import java.util.List;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element having a <code>@wsp:PolicyURIs</code> attribute.
  */
 public interface PolicyURIsBearing {
     
     /** The wsp:@PolicyURIs attribute local name. */
-    @Nonnull public static final String WSP_POLICY_URIS_ATTR_LOCAL_NAME = "PolicyURIs";
+    @Nonnull @NotEmpty public static final String WSP_POLICY_URIS_ATTR_LOCAL_NAME = "PolicyURIs";
 
     /** The wsp:@PolicyURIs qualified attribute name. */
     @Nonnull public static final QName WSP_POLICY_URIS_ATTR_NAME =
@@ -39,13 +42,13 @@ public interface PolicyURIsBearing {
      * 
      * @return return the list of attribute values
      */
-    public List<String> getWSP12PolicyURIs();
+    @Nullable public List<String> getWSP12PolicyURIs();
     
     /**
      * Set the attribute value.
      * 
      * @param newPolicyURIs the new list of attribute values
      */
-    public void setWSP12PolicyURIs(List<String> newPolicyURIs);
+    public void setWSP12PolicyURIs(@Nullable final List<String> newPolicyURIs);
 
-}
+}
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/WSPolicyConstants.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/WSPolicyConstants.java
index c948a5a9a..8a01f35ab 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/WSPolicyConstants.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/WSPolicyConstants.java
@@ -19,6 +19,8 @@ package org.opensaml.soap.wspolicy;
 
 import javax.annotation.Nonnull;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * WS-Policy 1.2 constants.
  * 
@@ -28,10 +30,10 @@ import javax.annotation.Nonnull;
 public final class WSPolicyConstants {
 
     /** WS-Policy namespace. */
-    @Nonnull public static final String WSP_NS= "http://schemas.xmlsoap.org/ws/2004/09/policy";
+    @Nonnull @NotEmpty public static final String WSP_NS= "http://schemas.xmlsoap.org/ws/2004/09/policy";
 
     /** WS-Policy namespace prefix. */
-    @Nonnull public static final String WSP_PREFIX= "wsp";
+    @Nonnull @NotEmpty public static final String WSP_PREFIX= "wsp";
     
     /** Constructor. Private to prevent instantiation. */
     private WSPolicyConstants() { }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/WSPolicyObjectBuilder.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/WSPolicyObjectBuilder.java
index 9b8261f66..67ccf7ace 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/WSPolicyObjectBuilder.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wspolicy/WSPolicyObjectBuilder.java
@@ -17,6 +17,8 @@
 
 package org.opensaml.soap.wspolicy;
 
+import javax.annotation.Nonnull;
+
 import org.opensaml.core.xml.XMLObjectBuilder;
 
 /**
@@ -32,5 +34,5 @@ public interface WSPolicyObjectBuilder<WSPolicyObjectType extends WSPolicyObject
      * 
      * @return the built object
      */
-    public WSPolicyObjectType buildObject();
+    @Nonnull public WSPolicyObjectType buildObject();
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedDateTime.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedDateTime.java
index d4aaec37c..48059f25a 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedDateTime.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedDateTime.java
@@ -20,11 +20,14 @@ package org.opensaml.soap.wssecurity;
 import java.time.Instant;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.schema.XSString;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for elements of complex type AttributedDateTime.
  * 
@@ -32,7 +35,7 @@ import org.opensaml.core.xml.schema.XSString;
 public interface AttributedDateTime extends XSString, IdBearing, AttributeExtensibleXMLObject, WSSecurityObject  {
 
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "AttributedDateTime"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "AttributedDateTime"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
@@ -43,7 +46,7 @@ public interface AttributedDateTime extends XSString, IdBearing, AttributeExtens
      * 
      * @return the {@link Instant} object.
      */
-    public Instant getDateTime();
+    @Nullable public Instant getDateTime();
 
     /**
      * Sets the Instant content or attribute value.
@@ -51,6 +54,6 @@ public interface AttributedDateTime extends XSString, IdBearing, AttributeExtens
      * @param dateTime
      *            the {@link Instant} object to set.
      */
-    public void setDateTime(Instant dateTime);
+    public void setDateTime(@Nullable final Instant dateTime);
     
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedString.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedString.java
index fdb953a9f..b5f52a955 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedString.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedString.java
@@ -23,13 +23,15 @@ import javax.xml.namespace.QName;
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.schema.XSString;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for elements of complex type AttributedString.
  */
 public interface AttributedString extends XSString, IdBearing, AttributeExtensibleXMLObject, WSSecurityObject {
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "AttributedString"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "AttributedString"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedURI.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedURI.java
index 9c54914df..96e67ab4c 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedURI.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/AttributedURI.java
@@ -23,13 +23,15 @@ import javax.xml.namespace.QName;
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.schema.XSURI;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for elements of complex type AttributedURI.
  */
 public interface AttributedURI extends XSURI, IdBearing, AttributeExtensibleXMLObject, WSSecurityObject {
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "AttributedURI"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "AttributedURI"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/BinarySecurityToken.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/BinarySecurityToken.java
index 3d7e962d3..0312da8d4 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/BinarySecurityToken.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/BinarySecurityToken.java
@@ -18,43 +18,46 @@
 package org.opensaml.soap.wssecurity;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse:BinarySecurityToken> element.
  */
 public interface BinarySecurityToken extends EncodedString {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "BinarySecurityToken";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "BinarySecurityToken";
 
     /** Qualified element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "BinarySecurityTokenType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "BinarySecurityTokenType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** The ValueType attribute name. */
-    @Nonnull public static final String VALUE_TYPE_ATTRIB_NAME = "ValueType";
+    @Nonnull @NotEmpty public static final String VALUE_TYPE_ATTRIB_NAME = "ValueType";
     
     /**
      * Returns the ValueType attribute URI value.
      * 
      * @return the ValueType attribute value or <code>null</code>.
      */
-    public String getValueType();
+    @Nullable public String getValueType();
 
     /**
      * Sets the ValueType attribute URI value.
      * 
      * @param newValueType the ValueType attribute value.
      */
-    public void setValueType(String newValueType);
+    public void setValueType(@Nullable final String newValueType);
 
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Created.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Created.java
index 01aaa5480..12b63c99f 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Created.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Created.java
@@ -20,6 +20,8 @@ package org.opensaml.soap.wssecurity;
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsu:Created> element.
  * 
@@ -27,7 +29,7 @@ import javax.xml.namespace.QName;
 public interface Created extends AttributedDateTime {
 
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "Created";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Created";
 
     /** Qualified element name. */
     @Nonnull public static final QName ELEMENT_NAME =
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Embedded.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Embedded.java
index aae8fe1cd..484085193 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Embedded.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Embedded.java
@@ -18,11 +18,14 @@
 package org.opensaml.soap.wssecurity;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * the <wsse:Embedded> element.
  * 
@@ -30,34 +33,34 @@ import org.opensaml.core.xml.ElementExtensibleXMLObject;
 public interface Embedded extends AttributeExtensibleXMLObject, ElementExtensibleXMLObject, WSSecurityObject {
     
     /** Element local name. */
-    @Nonnull public static final String ELEMENT_LOCAL_NAME = "Embedded";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Embedded";
 
     /** Qualified element name. */
     @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** Local name of the XSI type. */
-    @Nonnull public static final String TYPE_LOCAL_NAME = "EmbeddedType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "EmbeddedType"; 
         
     /** QName of the XSI type. */
     @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
 
     /** The wsse:Embedded/@ValueType attribute local name. */
-    @Nonnull public static final String VALUE_TYPE_ATTRIB_NAME= "ValueType";
+    @Nonnull @NotEmpty public static final String VALUE_TYPE_ATTRIB_NAME= "ValueType";
 
     /**
      * Returns the ValueType attribute URI value.
      * 
      * @return the ValueType attribute value or <code>null</code>.
      */
-    public String getValueType();
+    @Nullable public String getValueType();
 
     /**
      * Sets the ValueType attribute URI value.
      * 
      * @param newValueType the ValueType attribute value.
      */
-    public void setValueType(String newValueType);
+    public void setValueType(@Nullable final String newValueType);
     
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/EncodedString.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/EncodedString.java
index 5e460356b..866a0c7c5 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/EncodedString.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/EncodedString.java
@@ -17,24 +17,29 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for elements of complex type EncodedString.
  */
 public interface EncodedString extends AttributedString {
     
     /** Local name of the XSI type. */
-    public static final String TYPE_LOCAL_NAME = "EncodedString"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "EncodedString"; 
         
     /** QName of the XSI type. */
-    public static final QName TYPE_NAME = 
+    @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** The EncodingType attribute name. */
-    public static final String ENCODING_TYPE_ATTRIB_NAME = "EncodingType";
+    @Nonnull @NotEmpty public static final String ENCODING_TYPE_ATTRIB_NAME = "EncodingType";
     
     /** The EncodingType attribute value <code>#Base64Binary</code>. */
+    @Nonnull @NotEmpty
     public static final String ENCODING_TYPE_BASE64_BINARY = WSSecurityConstants.WS_SECURITY_NS + "#Base64Binary";
     
     /**
@@ -42,13 +47,13 @@ public interface EncodedString extends AttributedString {
      * 
      * @return the EncodingType attribute value.
      */
-    public String getEncodingType();
+    @Nullable public String getEncodingType();
 
     /**
      * Sets the EncodingType attribute value.
      * 
      * @param newEncodingType the EncodingType attribute value.
      */
-    public void setEncodingType(String newEncodingType);
+    public void setEncodingType(@Nullable final String newEncodingType);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/EncryptedHeader.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/EncryptedHeader.java
index c54c1ae7e..59b793426 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/EncryptedHeader.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/EncryptedHeader.java
@@ -17,6 +17,8 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.soap.soap11.ActorBearing;
@@ -25,6 +27,8 @@ import org.opensaml.soap.soap12.RelayBearing;
 import org.opensaml.soap.soap12.RoleBearing;
 import org.opensaml.xmlsec.encryption.EncryptedData;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse:EncryptedHeader> element.
  * 
@@ -36,17 +40,17 @@ public interface EncryptedHeader extends IdBearing, MustUnderstandBearing, Actor
         org.opensaml.soap.soap12.MustUnderstandBearing, RoleBearing, RelayBearing, WSSecurityObject {
     
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "EncryptedHeader";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "EncryptedHeader";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE11_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE11_PREFIX);
     
     /** Local name of the XSI type. */
-    public static final String TYPE_LOCAL_NAME = "EncryptedHeaderType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "EncryptedHeaderType"; 
         
     /** QName of the XSI type. */
-    public static final QName TYPE_NAME = 
+    @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE11_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE11_PREFIX);
     
     /**
@@ -54,13 +58,13 @@ public interface EncryptedHeader extends IdBearing, MustUnderstandBearing, Actor
      * 
      * @return the EncryptedData child element
      */
-    public EncryptedData getEncryptedData();
+    @Nullable public EncryptedData getEncryptedData();
     
     /**
      * Sets the EncryptedData child element.
      * 
      * @param newEncryptedData the new EncryptedData child element
      */
-    public void setEncryptedData(EncryptedData newEncryptedData);
+    public void setEncryptedData(@Nullable final EncryptedData newEncryptedData);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Expires.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Expires.java
index 14ce054e9..2cca55b8c 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Expires.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Expires.java
@@ -17,8 +17,11 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsu:Expires> element.
  * 
@@ -26,10 +29,10 @@ import javax.xml.namespace.QName;
 public interface Expires extends AttributedDateTime {
 
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "Expires";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Expires";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSU_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSU_PREFIX);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/IdBearing.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/IdBearing.java
index e0da58ccb..7a91c6755 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/IdBearing.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/IdBearing.java
@@ -17,8 +17,12 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element having a <code>@wsu:Id</code> attribute.
  * 
@@ -26,10 +30,10 @@ import javax.xml.namespace.QName;
 public interface IdBearing {
 
     /** the <code>Id</code> attribute local name. */
-    public static final String WSU_ID_ATTR_LOCAL_NAME = "Id";
+    @Nonnull @NotEmpty public static final String WSU_ID_ATTR_LOCAL_NAME = "Id";
 
     /** the <code>wsu:Id</code> qualified attribute name. */
-    public static final QName WSU_ID_ATTR_NAME =
+    @Nonnull public static final QName WSU_ID_ATTR_NAME =
         new QName(WSSecurityConstants.WSU_NS, WSU_ID_ATTR_LOCAL_NAME, WSSecurityConstants.WSU_PREFIX);
 
     /**
@@ -37,13 +41,13 @@ public interface IdBearing {
      * 
      * @return The <code>@wsu:Id</code> attribute value or <code>null</code>.
      */
-    public String getWSUId();
+    @Nullable public String getWSUId();
 
     /**
      * Sets the <code>@wsu:Id</code> attribute value.
      * 
      * @param newId The <code>@wsu:Id</code> attribute value
      */
-    public void setWSUId(String newId);
+    public void setWSUId(@Nullable final String newId);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Iteration.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Iteration.java
index 249d0c56b..8f1912db3 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Iteration.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Iteration.java
@@ -17,10 +17,12 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.schema.XSInteger;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.xml.XMLConstants;
 
 /**
@@ -33,16 +35,17 @@ import net.shibboleth.shared.xml.XMLConstants;
 public interface Iteration extends XSInteger, WSSecurityObject {
     
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "Iteration";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Iteration";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE11_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE11_PREFIX);
     
     /** Local name of the XSI type. */
-    public static final String TYPE_LOCAL_NAME = "unsignedInt"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "unsignedInt"; 
         
     /** QName of the XSI type. */
-    public static final QName TYPE_NAME = new QName(XMLConstants.XSD_NS, TYPE_LOCAL_NAME, XMLConstants.XSD_PREFIX);
+    @Nonnull public static final QName TYPE_NAME =
+            new QName(XMLConstants.XSD_NS, TYPE_LOCAL_NAME, XMLConstants.XSD_PREFIX);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/KeyIdentifier.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/KeyIdentifier.java
index 24b88bbff..5ac77140d 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/KeyIdentifier.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/KeyIdentifier.java
@@ -17,8 +17,12 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse:KeyIdentifier> element.
  * 
@@ -29,34 +33,34 @@ import javax.xml.namespace.QName;
 public interface KeyIdentifier extends EncodedString {
 
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "KeyIdentifier";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "KeyIdentifier";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** Local name of the XSI type. */
-    public static final String TYPE_LOCAL_NAME = "KeyIdentifierType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "KeyIdentifierType"; 
         
     /** QName of the XSI type. */
-    public static final QName TYPE_NAME = 
+    @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** The ValueType attribute name. */
-    public static final String VALUE_TYPE_ATTRIB_NAME = "ValueType";
+    @Nonnull @NotEmpty public static final String VALUE_TYPE_ATTRIB_NAME = "ValueType";
     
     /**
      * Returns the ValueType attribute URI value.
      * 
      * @return the ValueType attribute value or <code>null</code>.
      */
-    public String getValueType();
+    @Nullable public String getValueType();
 
     /**
      * Sets the ValueType attribute URI value.
      * 
      * @param newValueType the ValueType attribute value.
      */
-    public void setValueType(String newValueType);
+    public void setValueType(@Nullable final String newValueType);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Nonce.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Nonce.java
index 857f9b38a..6c6bddbbc 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Nonce.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Nonce.java
@@ -17,8 +17,11 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse:Nonce> element within a <wsse:UsernameToken> element.
  * 
@@ -28,10 +31,10 @@ import javax.xml.namespace.QName;
 public interface Nonce extends EncodedString {
     
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "Nonce";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Nonce";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Password.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Password.java
index 7b6cd8ef7..c8e0ebc5a 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Password.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Password.java
@@ -48,7 +48,8 @@ public interface Password extends AttributedString {
     /**
      * The <code>wsse:Password/@Type</code> attribute URI value <code>#PasswordDigest</code>.
      */
-    @Nonnull @NotEmpty public static final String TYPE_PASSWORD_DIGEST = WSSecurityConstants.WSSE_NS + "#PasswordDigest";
+    @Nonnull @NotEmpty
+    public static final String TYPE_PASSWORD_DIGEST = WSSecurityConstants.WSSE_NS + "#PasswordDigest";
 
     /**
      * Returns the <code>wsse:Password/@Type</code> attribute URI value.
@@ -62,6 +63,6 @@ public interface Password extends AttributedString {
      * 
      * @param type the <code>Type</code> attribute URI value to set.
      */
-    public void setType(@Nullable String type);
+    public void setType(@Nullable final String type);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Reference.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Reference.java
index 684d24484..f30ae8db8 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Reference.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Reference.java
@@ -17,10 +17,14 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse:Reference> empty element.
  * 
@@ -30,51 +34,51 @@ import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 public interface Reference extends AttributeExtensibleXMLObject, WSSecurityObject {
 
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "Reference";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Reference";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** Local name of the XSI type. */
-    public static final String TYPE_LOCAL_NAME = "ReferenceType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "ReferenceType"; 
         
     /** QName of the XSI type. */
-    public static final QName TYPE_NAME = 
+    @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
 
     /** The wsse:Reference/@URI attribute local name. */
-    public static final String URI_ATTRIB_NAME= "URI";
+    @Nonnull @NotEmpty public static final String URI_ATTRIB_NAME= "URI";
     
     /** The wsse:Reference/@ValueType attribute local name. */
-    public static final String VALUE_TYPE_ATTRIB_NAME= "ValueType";
+    @Nonnull @NotEmpty public static final String VALUE_TYPE_ATTRIB_NAME= "ValueType";
 
     /**
      * Returns the wsse:Reference/@URI attribute value.
      * 
      * @return the URI attribute value.
      */
-    public String getURI();
+    @Nullable public String getURI();
 
     /**
      * Sets the wsse:Reference/@URI attribute value.
      * 
      * @param newURI the URI to set.
      */
-    public void setURI(String newURI);
+    public void setURI(@Nullable final String newURI);
     
     /**
      * Returns the ValueType attribute URI value.
      * 
      * @return the ValueType attribute value or <code>null</code>.
      */
-    public String getValueType();
+    @Nullable public String getValueType();
 
     /**
      * Sets the ValueType attribute URI value.
      * 
      * @param newValueType the ValueType attribute value.
      */
-    public void setValueType(String newValueType);
+    public void setValueType(@Nullable final String newValueType);
     
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Salt.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Salt.java
index 644959a29..a43d697cc 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Salt.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Salt.java
@@ -17,10 +17,13 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.schema.XSBase64Binary;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse11:Salt> element within the <wsse:UsernameToken>
  * element.
@@ -31,10 +34,10 @@ import org.opensaml.core.xml.schema.XSBase64Binary;
 public interface Salt extends XSBase64Binary, WSSecurityObject {
     
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "Salt";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Salt";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE11_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE11_PREFIX);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/SecurityTokenReference.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/SecurityTokenReference.java
index 6aaab08d6..7ec5d040c 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/SecurityTokenReference.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/SecurityTokenReference.java
@@ -17,11 +17,14 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse:SecurityTokenReference> element.
  * 
@@ -33,17 +36,17 @@ public interface SecurityTokenReference extends IdBearing, UsageBearing, Attribu
         ElementExtensibleXMLObject, WSSecurityObject {
 
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "SecurityTokenReference";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "SecurityTokenReference";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** Local name of the XSI type. */
-    public static final String TYPE_LOCAL_NAME = "SecurityTokenReferenceType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "SecurityTokenReferenceType"; 
         
     /** QName of the XSI type. */
-    public static final QName TYPE_NAME = 
+    @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/SignatureConfirmation.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/SignatureConfirmation.java
index 141a2011c..4ef514d54 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/SignatureConfirmation.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/SignatureConfirmation.java
@@ -17,42 +17,46 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse11:SignatureConfirmation> element.
  */
 public interface SignatureConfirmation extends IdBearing, WSSecurityObject {
     
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "SignatureConfirmation";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "SignatureConfirmation";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE11_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE11_PREFIX);
     
     /** Local name of the XSI type. */
-    public static final String TYPE_LOCAL_NAME = "SignatureConfirmationType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "SignatureConfirmationType"; 
         
     /** QName of the XSI type. */
-    public static final QName TYPE_NAME = 
+    @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE11_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE11_PREFIX);
     
     /** The Value attribute name. */
-    public static final String VALUE_ATTRIB_NAME = "Value";
+    @Nonnull @NotEmpty public static final String VALUE_ATTRIB_NAME = "Value";
     
     /**
      * Returns the Value attribute value.
      * 
      * @return the Value attribute value or <code>null</code>.
      */
-    public String getValue();
+    @Nullable public String getValue();
 
     /**
      * Sets the Value attribute value.
      * 
      * @param newValue the Value attribute value.
      */
-    public void setValue(String newValue);
+    public void setValue(@Nullable final String newValue);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Timestamp.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Timestamp.java
index 966463686..1c425be28 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Timestamp.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Timestamp.java
@@ -17,11 +17,15 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsu:Timestamp> element.
  * 
@@ -33,10 +37,10 @@ public interface Timestamp extends IdBearing, AttributeExtensibleXMLObject,
         ElementExtensibleXMLObject, WSSecurityObject {
 
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "Timestamp";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Timestamp";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSU_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSU_PREFIX);
 
     /**
@@ -44,7 +48,7 @@ public interface Timestamp extends IdBearing, AttributeExtensibleXMLObject,
      * 
      * @return the {@link Created} child element or <code>null</code>.
      */
-    public Created getCreated();
+    @Nullable public Created getCreated();
 
     /**
      * Sets the <wsu:Created> child element.
@@ -52,14 +56,14 @@ public interface Timestamp extends IdBearing, AttributeExtensibleXMLObject,
      * @param created
      *            the {@link Created} child element to set.
      */
-    public void setCreated(Created created);
+    public void setCreated(@Nullable final Created created);
 
     /**
      * Returns the <wsu:Expires> child element.
      * 
      * @return the {@link Expires} child element or <code>null</code>.
      */
-    public Expires getExpires();
+    @Nullable public Expires getExpires();
 
     /**
      * Sets the <wsu:Expires> child element.
@@ -67,6 +71,6 @@ public interface Timestamp extends IdBearing, AttributeExtensibleXMLObject,
      * @param expires
      *            the {@link Expires} child element or <code>null</code>.
      */
-    public void setExpires(Expires expires);
+    public void setExpires(@Nullable final Expires expires);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/TokenTypeBearing.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/TokenTypeBearing.java
index 05495674e..2afe5527b 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/TokenTypeBearing.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/TokenTypeBearing.java
@@ -17,8 +17,12 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element having a <code>@wsse11:TokenType</code>; attribute.
  * 
@@ -30,12 +34,12 @@ public interface TokenTypeBearing {
     /**
      * The <code>@wsse11:TokenType</code> attribute local name.
      */
-    public static final String WSSE11_TOKEN_TYPE_ATTR_LOCAL_NAME = "TokenType";
+    @Nonnull @NotEmpty public static final String WSSE11_TOKEN_TYPE_ATTR_LOCAL_NAME = "TokenType";
 
     /**
      * The <code>@wsse11:TokenType</code> qualified attribute name.
      */
-    public static final QName WSSE11_TOKEN_TYPE_ATTR_NAME =
+    @Nonnull public static final QName WSSE11_TOKEN_TYPE_ATTR_NAME =
         new QName(WSSecurityConstants.WSSE11_NS, WSSE11_TOKEN_TYPE_ATTR_LOCAL_NAME, WSSecurityConstants.WSSE11_PREFIX);
 
     /**
@@ -43,13 +47,13 @@ public interface TokenTypeBearing {
      * 
      * @return the <code>@wsse11:TokenType</code> attribute value or <code>null</code>.
      */
-    public String getWSSE11TokenType();
+    @Nullable public String getWSSE11TokenType();
 
     /**
      * Sets the <code>@wsse11:TokenType</code> attribute value.
      * 
      * @param tokenType the <code>@wsse11:TokenType</code> attribute value to set.
      */
-    public void setWSSE11TokenType(String tokenType);
+    public void setWSSE11TokenType(@Nullable final String tokenType);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/TransformationParameters.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/TransformationParameters.java
index ee28c234e..c0533f5a9 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/TransformationParameters.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/TransformationParameters.java
@@ -17,11 +17,14 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.ElementExtensibleXMLObject;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse:TransformationParameters> element.
  * 
@@ -30,17 +33,17 @@ public interface TransformationParameters
         extends AttributeExtensibleXMLObject, ElementExtensibleXMLObject, WSSecurityObject {
 
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "TransformationParameters";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "TransformationParameters";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
     
     /** Local name of the XSI type. */
-    public static final String TYPE_LOCAL_NAME = "TransformationParametersType"; 
+    @Nonnull @NotEmpty public static final String TYPE_LOCAL_NAME = "TransformationParametersType"; 
         
     /** QName of the XSI type. */
-    public static final QName TYPE_NAME = 
+    @Nonnull public static final QName TYPE_NAME = 
         new QName(WSSecurityConstants.WSSE_NS, TYPE_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
 
 }
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/UsageBearing.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/UsageBearing.java
index 906422310..34c99b34c 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/UsageBearing.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/UsageBearing.java
@@ -19,18 +19,22 @@ package org.opensaml.soap.wssecurity;
 
 import java.util.List;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Interface for element having a <code>@wsse:Usage</code> attribute.
  */
 public interface UsageBearing {
     
     /** The wsse:@Usage attribute local name. */
-    public static final String WSSE_USAGE_ATTR_LOCAL_NAME = "Usage";
+    @Nonnull @NotEmpty public static final String WSSE_USAGE_ATTR_LOCAL_NAME = "Usage";
 
     /** The wsse:@Usage qualified attribute name. */
-    public static final QName WSSE_USAGE_ATTR_NAME =
+    @Nonnull public static final QName WSSE_USAGE_ATTR_NAME =
         new QName(WSSecurityConstants.WSSE_NS, WSSE_USAGE_ATTR_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
 
     /**
@@ -38,13 +42,13 @@ public interface UsageBearing {
      * 
      * @return the list of attribute values
      */
-    public List<String> getWSSEUsages();
+    @Nullable public List<String> getWSSEUsages();
 
     /**
      * Sets the list of <code>wsse:@Usage</code> attributes value.
      * 
      * @param usages the list of attribute values
      */
-    public void setWSSEUsages(List<String> usages);
+    public void setWSSEUsages(@Nullable final List<String> usages);
     
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Username.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Username.java
index 0e41f5412..4595c7a5b 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Username.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/Username.java
@@ -17,8 +17,11 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * The <wsse:Username> element within the <wsse:UsernameToken>
  * element.
@@ -29,10 +32,10 @@ import javax.xml.namespace.QName;
 public interface Username extends AttributedString {
     
     /** Element local name. */
-    public static final String ELEMENT_LOCAL_NAME = "Username";
+    @Nonnull @NotEmpty public static final String ELEMENT_LOCAL_NAME = "Username";
 
     /** Qualified element name. */
-    public static final QName ELEMENT_NAME =
+    @Nonnull public static final QName ELEMENT_NAME =
         new QName(WSSecurityConstants.WSSE_NS, ELEMENT_LOCAL_NAME, WSSecurityConstants.WSSE_PREFIX);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/UsernameToken.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/UsernameToken.java
index d0c1c2d8e..6e0f281da 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/UsernameToken.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/UsernameToken.java
@@ -62,6 +62,6 @@ public interface UsernameToken extends IdBearing, AttributeExtensibleXMLObject,
      * @param username
      *            the {@link Username} child element to set.
      */
-    public void setUsername(@Nullable Username username);
+    public void setUsername(@Nullable final Username username);
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/WSSecurityConstants.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/WSSecurityConstants.java
index d491e8d79..01775c092 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/WSSecurityConstants.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/WSSecurityConstants.java
@@ -17,8 +17,11 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+
 /**
  * Constants for the WS-Security 2004.
  * 
@@ -30,136 +33,136 @@ public final class WSSecurityConstants {
     // Namespaces and prefixes.
 
     /** WS-Security SOAP Message Security 1.0 namespace. */
-    public static final String WS_SECURITY_NS =
+    @Nonnull @NotEmpty public static final String WS_SECURITY_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0";
 
     /** WS-Security SOAP Message Security 1.1 namespace. */
-    public static final String WS_SECURITY11_NS =
+    @Nonnull @NotEmpty public static final String WS_SECURITY11_NS =
         "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1";
 
     /** WS-Security Utility 1.0 namespace. */
-    public static final String WSU_NS =
+    @Nonnull @NotEmpty public static final String WSU_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
     /** WS-Security Utility 1.0 prefix. */
-    public static final String WSU_PREFIX = "wsu";
+    @Nonnull @NotEmpty public static final String WSU_PREFIX = "wsu";
 
     /** WS-Security Security Extension 1.0 namespace. */
-    public static final String WSSE_NS =
+    @Nonnull @NotEmpty public static final String WSSE_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 
     /** WS-Security Security Extension 1.0 prefix. */
-    public static final String WSSE_PREFIX = "wsse";
+    @Nonnull @NotEmpty public static final String WSSE_PREFIX = "wsse";
 
     /** WS-Security Security Extension 1.1 namespace. */
-    public static final String WSSE11_NS =
+    @Nonnull @NotEmpty public static final String WSSE11_NS =
         "http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd";
 
     /** WS-Security Security Extension 1.1 prefix. */
-    public static final String WSSE11_PREFIX = "wsse11";
+    @Nonnull @NotEmpty public static final String WSSE11_PREFIX = "wsse11";
 
     /** WS-Security SAML Token Profile 1.0 namespace. */
-    public static final String WSSE_SAML_TOKEN_PROFILE_NS =
+    @Nonnull @NotEmpty public static final String WSSE_SAML_TOKEN_PROFILE_NS =
         "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0";
 
     /** WS-Security SAML Token Profile 1.1 namespace. */
-    public static final String WSSE11_SAML_TOKEN_PROFILE_NS =
+    @Nonnull @NotEmpty public static final String WSSE11_SAML_TOKEN_PROFILE_NS =
         "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1";
 
     /** WS-Security Username Token Profile 1.0 namespace. */
-    public static final String WSSE_USERNAME_TOKEN_PROFILE_NS =
+    @Nonnull @NotEmpty public static final String WSSE_USERNAME_TOKEN_PROFILE_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0";
 
     /** WS-Security X509 Token Profile 1.0 namespace. */
-    public static final String WSSE_X509_TOKEN_PROFILE_NS =
+    @Nonnull @NotEmpty public static final String WSSE_X509_TOKEN_PROFILE_NS =
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0";
 
     /** WS-Security Kerberos Token Profile 1.1 namespace. */
-    public static final String WSSE_KERBEROS_TOKEN_PROFILE_NS =
+    @Nonnull @NotEmpty public static final String WSSE_KERBEROS_TOKEN_PROFILE_NS =
         "http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1";
     
     // SOAP fault codes.
     
     /** WS-Security SOAP fault code: SOAP"wsse:UnsupportedSecurityToken". */
-    public static final QName SOAP_FAULT_UNSUPPORTED_SECURITY_TOKEN =
+    @Nonnull public static final QName SOAP_FAULT_UNSUPPORTED_SECURITY_TOKEN =
         new QName(WSSE_NS, "UnsupportedSecurityToken", WSSE_PREFIX);
     
     /** WS-Security SOAP fault code: "wsse:UnsupportedAlgorithm". */
-    public static final QName SOAP_FAULT_UNSUPPORTED_ALGORITHM =
+    @Nonnull public static final QName SOAP_FAULT_UNSUPPORTED_ALGORITHM =
         new QName(WSSE_NS, "UnsupportedAlgorithm", WSSE_PREFIX);
     
     /** WS-Security SOAP fault code: "wsse:InvalidSecurity". */
-    public static final QName SOAP_FAULT_INVALID_SECURITY =
+    @Nonnull public static final QName SOAP_FAULT_INVALID_SECURITY =
         new QName(WSSE_NS, "InvalidSecurity", WSSE_PREFIX);
     
     /** WS-Security SOAP fault code: "wsse:InvalidSecurityToken". */
-    public static final QName SOAP_FAULT_INVALID_SECURITY_TOKEN =
+    @Nonnull public static final QName SOAP_FAULT_INVALID_SECURITY_TOKEN =
         new QName(WSSE_NS, "InvalidSecurityToken", WSSE_PREFIX);
     
     /** WS-Security SOAP fault code: "wsse:FailedAuthentication". */
-    public static final QName SOAP_FAULT_FAILED_AUTHENTICATION =
+    @Nonnull public static final QName SOAP_FAULT_FAILED_AUTHENTICATION =
         new QName(WSSE_NS, "FailedAuthentication", WSSE_PREFIX);
     
     /** WS-Security SOAP fault code: "wsse:FailedCheck". */
-    public static final QName SOAP_FAULT_FAILED_CHECK =
+    @Nonnull public static final QName SOAP_FAULT_FAILED_CHECK =
         new QName(WSSE_NS, "FailedCheck", WSSE_PREFIX);
     
     /** WS-Security SOAP fault code: "wsse:SecurityTokenUnavailable". */
-    public static final QName SOAP_FAULT_SECURITY_TOKEN_UNAVAILABLE =
+    @Nonnull public static final QName SOAP_FAULT_SECURITY_TOKEN_UNAVAILABLE =
         new QName(WSSE_NS, "SecurityTokenUnavailable", WSSE_PREFIX);
     
     /** WS-Security SOAP fault code: "wsu:MessageExpired". */
-    public static final QName SOAP_FAULT_MESSAGE_EXPIRED =
+    @Nonnull public static final QName SOAP_FAULT_MESSAGE_EXPIRED =
         new QName(WSU_NS, "MessageExpired", WSU_PREFIX);
     
     // Other constants
     
     /** WS-Security - Username Token Profile - UsernameToken. */
-    public static final String USERNAME_TOKEN =
+    @Nonnull @NotEmpty public static final String USERNAME_TOKEN =
         WSSE_USERNAME_TOKEN_PROFILE_NS + "#UsernameToken";
 
     /** WS-Security - X.509 Token Profile - X509V3. */
-    public static final String X509_V3 =
+    @Nonnull @NotEmpty public static final String X509_V3 =
         WSSE_X509_TOKEN_PROFILE_NS + "#X509v3";
 
     /** WS-Security - X.509 Token Profile - X509V1. */
-    public static final String X509_V1 =
+    @Nonnull @NotEmpty public static final String X509_V1 =
         WSSE_X509_TOKEN_PROFILE_NS + "#X509v1";
 
     /** WS-Security - X.509 Token Profile - X509PKIPathv1. */
-    public static final String X509_PKI_PATH_V1 =
+    @Nonnull @NotEmpty public static final String X509_PKI_PATH_V1 =
         WSSE_X509_TOKEN_PROFILE_NS + "#X509PKIPathv1";
 
     /** WS-Security - X.509 Token Profile - PKCS7. */
-    public static final String X509_PKCS7 =
+    @Nonnull @NotEmpty public static final String X509_PKCS7 =
         WSSE_X509_TOKEN_PROFILE_NS + "#PKCS7";
     
     /** WS-Security - X.509 Token Profile - X509SubjectKeyIdentifier. */
-    public static final String X509_SUBJECT_KEY_IDENTIFIER =
+    @Nonnull @NotEmpty public static final String X509_SUBJECT_KEY_IDENTIFIER =
         WSSE_X509_TOKEN_PROFILE_NS + "#X509SubjectKeyIdentifier";
 
     /** WS-Security - Kerberos Token Profile - Kerberosv5_AP_REQ. */
-    public static final String KERBEROS_AP_REQ =
+    @Nonnull @NotEmpty public static final String KERBEROS_AP_REQ =
         WSSE_KERBEROS_TOKEN_PROFILE_NS + "#Kerberosv5_AP_REQ";
 
     /** WS-Security - Kerberos Token Profile - GSS_Kerberosv5_AP_REQ. */
-    public static final String GSS_KERBEROS_AP_REQ =
+    @Nonnull @NotEmpty public static final String GSS_KERBEROS_AP_REQ =
         WSSE_KERBEROS_TOKEN_PROFILE_NS + "#GSS_Kerberosv5_AP_REQ";
 
     /** WS-Security - Kerberos Token Profile - Kerberosv5_AP_REQ1510. */
-    public static final String KERBEROS_AP_REQ_1510 =
+    @Nonnull @NotEmpty public static final String KERBEROS_AP_REQ_1510 =
         WSSE_KERBEROS_TOKEN_PROFILE_NS + "#Kerberosv5_AP_REQ1510";
 
     /** WS-Security - Kerberos Token Profile - GSS_Kerberosv5_AP_REQ1510. */
-    public static final String GSS_KERBEROS_AP_REQ_1510 =
+    @Nonnull @NotEmpty public static final String GSS_KERBEROS_AP_REQ_1510 =
         WSSE_KERBEROS_TOKEN_PROFILE_NS + "#GSS_Kerberosv5_AP_REQ1510";
 
     /** WS-Security - KeyIdentifier - ThumbPrintSHA1.*/
-    public static final String THUMB_PRINT_SHA1 =
+    @Nonnull @NotEmpty public static final String THUMB_PRINT_SHA1 =
         WS_SECURITY_NS + "#ThumbPrintSHA1";
 
     /** WS-Security - KeyIdentifier - EncryptedKeySHA1.*/
-    public static final String ENCRYPTED_KEY_SHA1 =
+    @Nonnull @NotEmpty public static final String ENCRYPTED_KEY_SHA1 =
         WS_SECURITY_NS + "#EncryptedKeySHA1";
     
     /**
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/WSSecurityObjectBuilder.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/WSSecurityObjectBuilder.java
index 0a39706e1..6ec99f190 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/WSSecurityObjectBuilder.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/WSSecurityObjectBuilder.java
@@ -17,6 +17,8 @@
 
 package org.opensaml.soap.wssecurity;
 
+import javax.annotation.Nonnull;
+
 import org.opensaml.core.xml.XMLObjectBuilder;
 
 /**
@@ -32,6 +34,6 @@ public interface WSSecurityObjectBuilder<WSSecurityObjectType extends WSSecurity
      * 
      * @return the built object
      */
-    public WSSecurityObjectType buildObject();
+    @Nonnull public WSSecurityObjectType buildObject();
 
 }
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/AbstractToken.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/AbstractToken.java
index 68bba3525..09997aae2 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/AbstractToken.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/AbstractToken.java
@@ -29,10 +29,10 @@ import net.shibboleth.shared.logic.Constraint;
 public abstract class AbstractToken<TokenType> implements Token<TokenType> {
     
     /** The wrapped token object instance. */
-    private TokenType wrappedToken;
+    @Nonnull private final TokenType wrappedToken;
     
     /** Token validation status. */
-    private ValidationStatus validationStatus;
+    @Nonnull private ValidationStatus validationStatus;
     
     /**
      * Constructor.
@@ -63,4 +63,4 @@ public abstract class AbstractToken<TokenType> implements Token<TokenType> {
         validationStatus = Constraint.isNotNull(status, "Validation status may not be null");
     }
 
-}
+}
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/WSSecurityContext.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/WSSecurityContext.java
index c7f20ac9f..b513ea7f3 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/WSSecurityContext.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/WSSecurityContext.java
@@ -35,17 +35,16 @@ public final class WSSecurityContext extends BaseContext {
     //TODO implement support for remaining items of WS-Security data model
     
     /** List of known WS-Security tokens. */
-    private LazyList<Token<?>> tokens;
+    @Nonnull private LazyList<Token<?>> tokens;
     
     /** Value for Timestamp Created. */
-    private Instant timestampCreated;
+    @Nullable private Instant timestampCreated;
  
     /** Value for Timestamp Expires. */
-    private Instant timestampExpires;
+    @Nullable private Instant timestampExpires;
     
     /** Constructor. */
     public WSSecurityContext() {
-        super();
         tokens = new LazyList<>();
     }
     
@@ -94,4 +93,4 @@ public final class WSSecurityContext extends BaseContext {
         timestampExpires = value;
     }
 
-}
+}
\ No newline at end of file
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/WSSecurityMessagingSupport.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/WSSecurityMessagingSupport.java
index f1349ef0e..813c7c2f6 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/WSSecurityMessagingSupport.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/messaging/WSSecurityMessagingSupport.java
@@ -82,6 +82,7 @@ public final class WSSecurityMessagingSupport {
         Security security = null;
         for (final XMLObject header : securityHeaders) {
             final Security candidate = (Security) header;
+            assert candidate != null;
             final boolean candidateMustUnderstand = SOAPMessagingSupport.isMustUnderstand(messageContext, candidate);
             if (mustUnderstand == candidateMustUnderstand) {
                 security = candidate;
diff --git a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/util/WSSecuritySupport.java b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/util/WSSecuritySupport.java
index dc3545815..872951983 100644
--- a/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/util/WSSecuritySupport.java
+++ b/opensaml-soap-api/src/main/java/org/opensaml/soap/wssecurity/util/WSSecuritySupport.java
@@ -19,6 +19,10 @@ package org.opensaml.soap.wssecurity.util;
 
 import java.util.List;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
 import net.shibboleth.shared.collection.LazyList;
 import net.shibboleth.shared.primitive.StringSupport;
 import net.shibboleth.shared.xml.XMLConstants;
@@ -47,7 +51,7 @@ public final class WSSecuritySupport {
      * @param soapObject the SOAP object to add the attribute to
      * @param id the Id value
      */
-    public static void addWSUId(final XMLObject soapObject, final String id) {
+    public static void addWSUId(@Nonnull final XMLObject soapObject, @Nonnull @NotEmpty final String id) {
         if (soapObject instanceof IdBearing) {
             ((IdBearing)soapObject).setWSUId(id);
         } else if (soapObject instanceof AttributeExtensibleXMLObject) {
@@ -65,7 +69,7 @@ public final class WSSecuritySupport {
      * 
      * @return the value of the Id attribute, or null if not present
      */
-    public static String getWSUId(final XMLObject soapObject) {
+    @Nullable public static String getWSUId(@Nonnull final XMLObject soapObject) {
         String value = null;
         if (soapObject instanceof IdBearing) {
             value = StringSupport.trimOrNull(((IdBearing)soapObject).getWSUId());
@@ -87,7 +91,7 @@ public final class WSSecuritySupport {
      * @param soapObject the SOAP object to add the attribute to
      * @param tokenType the tokenType value
      */
-    public static void addWSSE11TokenType(final XMLObject soapObject, final String tokenType) {
+    public static void addWSSE11TokenType(@Nonnull final XMLObject soapObject, @Nullable final String tokenType) {
         if (soapObject instanceof TokenTypeBearing) {
             ((TokenTypeBearing)soapObject).setWSSE11TokenType(tokenType);
         } else if (soapObject instanceof AttributeExtensibleXMLObject) {
@@ -105,7 +109,7 @@ public final class WSSecuritySupport {
      * 
      * @return the value of the tokenType attribute, or null if not present
      */
-    public static String getWSSE11TokenType(final XMLObject soapObject) {
+    @Nullable public static String getWSSE11TokenType(@Nonnull final XMLObject soapObject) {
         String value = null;
         if (soapObject instanceof TokenTypeBearing) {
             value = StringSupport.trimOrNull(((TokenTypeBearing)soapObject).getWSSE11TokenType());
@@ -128,7 +132,7 @@ public final class WSSecuritySupport {
      * @param soapObject the SOAP object to add the attribute to
      * @param usage the usage to add
      */
-    public static void addWSSEUsage(final XMLObject soapObject, final String usage) {
+    public static void addWSSEUsage(@Nonnull final XMLObject soapObject, @Nonnull @NotEmpty final String usage) {
         if (soapObject instanceof UsageBearing) {
             final UsageBearing usageBearing = (UsageBearing) soapObject;
             List<String> list = usageBearing.getWSSEUsages();
@@ -157,7 +161,7 @@ public final class WSSecuritySupport {
      * @param soapObject the SOAP object to add the attribute to
      * @param usages the list of usages to add
      */
-    public static void addWSSEUsages(final XMLObject soapObject, final List<String> usages) {
+    public static void addWSSEUsages(@Nonnull final XMLObject soapObject, @Nonnull final List<String> usages) {
         if (soapObject instanceof UsageBearing) {
             ((UsageBearing)soapObject).setWSSEUsages(usages);
         } else if (soapObject instanceof AttributeExtensibleXMLObject) {
@@ -176,7 +180,7 @@ public final class WSSecuritySupport {
      * 
      * @return the list of usages, or null if not present
      */
-    public static List<String> getWSSEUsages(final XMLObject soapObject) {
+    @Nullable public static List<String> getWSSEUsages(@Nonnull final XMLObject soapObject) {
         if (soapObject instanceof UsageBearing) {
             final List<String> value = ((UsageBearing)soapObject).getWSSEUsages();
             if (value != null) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list