📄 bookclientts.java
字号:
package org.codehaus.xfire.client;import java.net.MalformedURLException;import java.util.Properties;import org.apache.ws.security.handler.WSHandlerConstants;/** * <a href="mailto:tsztelak@gmail.com">Tomasz Sztelak</a> * * Timestamp example : Adds timestamp to message. If message will be received after specified period of time, the message * will be rejected. */public class BookClientTS extends BookClient{ // START SNIPPET: timestamp protected void configureOutProperties(Properties properties) { properties.setProperty(WSHandlerConstants.ACTION,WSHandlerConstants.TIMESTAMP); // How long ( in seconds ) message is valid since send. properties.setProperty(WSHandlerConstants.TTL_TIMESTAMP,"15"); // if you want to use millisecond precision use this //properties.setProperty(WSHandlerConstants.TIMESTAMP_PRECISION,"true"); } // END SNIPPET: timestamp /** * @param args * @throws MalformedURLException */ public static void main(String[] args) throws MalformedURLException { new BookClientTS().executeClient("BookServiceTS"); } protected String getName() { return "TimeStamp Client"; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -