Package org.apache.ws.sandbox.security.trust2

Examples of org.apache.ws.sandbox.security.trust2.SecurityTokenOrReference


     * @throws NoRequestType
     */
    public void addAction() throws NoRequestType {
        action = TrustConstants.getActionRequest(tokenRequest.getRequestType());
        if (action == null) {
            throw new NoRequestType("Cannot generate standard action element, no requestType specified.");
        }
    }
View Full Code Here


     * @throws NoRequestType
     */
    public void addAction() throws NoRequestType {
        action = TrustConstants.getActionRequest(tokenRequest.getRequestType());
        if (action == null) {
            throw new NoRequestType("Cannot generate standard action element, no requestType specified.");
        }
    }
View Full Code Here

        if (requestType != null) {
            Element requestTypeElement = doc.createElementNS(TrustConstants.WST_NS, TrustConstants.WST_PREFIX + TrustConstants.REQUEST_TYPE);
            setTextContent(requestTypeElement, requestType.toString());
            wstElement.appendChild(requestTypeElement);
        } else {
            throw new NoRequestType("RequestType is a required element that cannot be null.");
        }

        if (base != null) {
            wstElement.appendChild(createTokenOrReferenceElement(TrustConstants.WST_PREFIX + TrustConstants.BASE, base));
        }
View Full Code Here

            actionElement.appendChild(actionContent);
            soapHeader.appendChild(actionElement);
        }
        Element soapBody = WSSecurityUtil.findBodyElement(doc, soapConsts);
        if (soapBody == null) {
            throw new NoSoapBody("A SOAP Body element is needed to insert the <RequestSecurityToken>.");
        }

        setWsuId(soapBody);
        if (tokenRequest != null)
            soapBody.appendChild(tokenRequest.getElement());
View Full Code Here

            actionElement.appendChild(actionContent);
            soapHeader.appendChild(actionElement);
        }
        Element soapBody = WSSecurityUtil.findBodyElement(doc, soapConsts);
        if (soapBody == null) {
            throw new NoSoapBody("A SOAP Body element is needed to insert the <RequestSecurityToken>.");
        }

        setWsuId(soapBody);
        if (tokenRequest != null)
            soapBody.appendChild(tokenRequest.getElement());
View Full Code Here

    public Element getElement() throws TrustException {
        Element wstElement = getElement(TrustConstants.WST_PREFIX + TrustConstants.RESPONSE_TAG);

        if ((requestedSecurityToken == null) && (requestedProofToken == null))
            throw new NoTokenInResponse("Either a RequestedSecurityToken or a RequestedProofToken is required. Both cannot be null.");
        else if (requestedSecurityToken != null)
            wstElement.appendChild(createTokenOrReferenceElement(TrustConstants.WST_PREFIX + TrustConstants.REQUESTED_TOKEN,
                    requestedSecurityToken));
        else if (requestedProofToken != null)
            wstElement.appendChild(createTokenOrReferenceElement(TrustConstants.WST_PREFIX + TrustConstants.REQUESTED_PROOF,
View Full Code Here

TOP

Related Classes of org.apache.ws.sandbox.security.trust2.SecurityTokenOrReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.