Package org.apache.ws.security.message

Examples of org.apache.ws.security.message.WSSecTimestamp.build()


        WSSecTimestamp timeStampBuilder =
                new WSSecTimestamp();
        timeStampBuilder.setWsConfig(reqData.getWssConfig());
        timeStampBuilder.setTimeToLive(handler.decodeTimeToLive(reqData));
        // add the Timestamp to the SOAP Envelope
        timeStampBuilder.build(doc, reqData.getSecHeader());
    }
}
View Full Code Here


        //
        // add the Timestamp to the SOAP Envelope
        //
        WSSecTimestamp timeStampBuilder = new WSSecTimestamp(reqData.getWssConfig());
        timeStampBuilder.setTimeToLive(handler.decodeTimeToLive(reqData, true));
        timeStampBuilder.build(doc, reqData.getSecHeader());
    }
}
View Full Code Here

        timestampBuilder.setTimeToLive(RampartUtil.getTimeToLive(rmd));
       
        // add the Timestamp to the SOAP Enevelope

        timestampBuilder.build(rmd.getDocument(), rmd
                .getSecHeader());
       
        log.debug("Timestamp id: " + timestampBuilder.getId());

        rmd.setTimestampId(timestampBuilder.getId());
View Full Code Here

        bst.setID("Id-" + bst.hashCode());
        WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), bst.getElement());
       
        WSSecTimestamp timestamp = new WSSecTimestamp();
        timestamp.setTimeToLive(600);
        timestamp.build(doc, secHeader);
       
        WSSecSignature sign = new WSSecSignature();
        sign.setUserInfo("16c73ab6-b892-458f-abf5-2f875f74882e", "security");
        sign.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
       
View Full Code Here

            utBuilder.setPasswordType(WSConstants.PASSWORD_TEXT);
            utBuilder.setUserInfo(username, password);
            utBuilder.build(doc, secHeader);

            WSSecTimestamp tsBuilder = new WSSecTimestamp();
            tsBuilder.build(doc, secHeader);

            /**
             * Set the new SOAPEnvelope
             */
            msgCtx.setEnvelope(Axis2Util.getSOAPEnvelopeFromDOMDocument(doc, false));
View Full Code Here

        timestampBuilder.setTimeToLive(RampartUtil.getTimeToLive(rmd));

        // add the Timestamp to the SOAP Enevelope

        timestampBuilder.build(rmd.getDocument(), rmd.getSecHeader());

        if (log.isDebugEnabled()) {
            log.debug("Timestamp id: " + timestampBuilder.getId());
        }
        rmd.setTimestampId(timestampBuilder.getId());
View Full Code Here

    wsc.setTimeStampStrict( false );
    addTimestamp.setWsConfig( wsc );

    WSSecHeader secHeader = new WSSecHeader();
    secHeader.insertSecurityHeader( doc );
    addTimestamp.build( doc, secHeader );
    return addTimestamp.getElement();
  }

  private static Element setWssUsernameToken( String username, String password, String pwType, Document doc )
  {
View Full Code Here

      wsc.setPrecisionInMilliSeconds( false );
      wsc.setTimeStampStrict( false );
      timestamp.setWsConfig( wsc );
    }

    timestamp.build( doc, secHeader );
  }

  public String getTimeToLive()
  {
    return String.valueOf( timeToLive );
View Full Code Here

      addTimestamp.setTimeToLive( ttl );

      StringWriter writer = new StringWriter();
      WSSecHeader secHeader = new WSSecHeader();
      secHeader.insertSecurityHeader( doc );
      XmlUtils.serializePretty( addTimestamp.build( doc, secHeader ), writer );
      request.setRequestContent( writer.toString() );
    }
    catch( Exception e1 )
    {
      UISupport.showErrorMessage( e1 );
View Full Code Here

        timestampBuilder.setTimeToLive(RampartUtil.getTimeToLive(rmd));
       
        // add the Timestamp to the SOAP Enevelope

        timestampBuilder.build(rmd.getDocument(), rmd
                .getSecHeader());
       
        log.debug("Timestamp id: " + timestampBuilder.getId());

        rmd.setTimestampId(timestampBuilder.getId());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.