You can specify a standalone timestamp when you configure the consumer
security constraints for either the response consumer or the request consumer.
The response consumer is configured for the client, and the request consumer
is configured for the server.
Before you begin
Prior to completing this task, you must import your application into
an assembly tool.
For information on how to import
your application, see Importing
enterprise applications.
About this task
The timestamp determines if the message is valid based upon the time
that the message is sent by one machine and then received by another machine.
Complete the following steps. You must configure either the client-side extensions
in step 2 or the server-side extensions in step 3.
Procedure
- Start the assembly tool.
- Switch to the Java 2 Platform, Enterprise Edition (J2EE) perspective.
Click Window > Open Perspective > J2EE.
- Optional: Locate the client-side extensions using the
Project Explorer window. The Client Deployment Descriptor window
is displayed. This Web service contains the extensions that you need to configure.
Complete the following steps to locate the client-side extensions:
- Expand the Web Services > Client section and double-click
the name of the Web service.
- Click the WS Extension tab and expand the Response Consumer
Configuration section.
- Optional: Locate the server-side extensions using the
Project Explorer window. The Web Services Editor window is displayed.
This Web service contains the extensions that you need to configure. Complete
the following steps to locate the server-side extensions:
- Expand the Web Services > Services section and double-click
the name of the Web service.
- Click the Extensions tab and expand the Request Consumer
Service Configuration Details section.
- Expand the Add Timestamp section and select Use Add Timestamp option.
When you select this option, a timestamp is added to the message that
is sent.
- Specify an expiration time for the timestamp, which helps defend
against replay attacks. Complete the following steps to configure the timestamp:
- Expand the Expires subsection within the Add Timestamp section.
- Select the Use Expires option.
- Specify an expiration time for the timestamp. The
lexical representation for the duration is the [ISO 8601] extended format PnYnMnDTnHnMnS,
where:
- P
- Precedes the date and time values.
- nY
- Represents the number of years in which the timestamp is in effect. Select
a value from 0 to 99 years.
- nM
- Represents the number of months in which the timestamp is in effect. Select
a value from 0 to 11 months.
- nD
- Represents the number of days in which the timestamp is in effect. Select
a value from 0 to 30 days.
- T
- Separates the date and time values.
- nH
- Represents the number of hours in which the timestamp is in effect. Select
a value from 0 to 23 hours.
- nM
- Represents the number of minutes in which the timestamp is in effect.
Select a value from 0 to 59 minutes.
- nS
- Represents the number of seconds in which the timestamp is in effect.
The number of seconds can include decimal digits to aribrary precision. You
can select a value from 0 to 59 for the seconds and from 0 to 9 for tenths
of a second.
For example, 1 year, 2 months, 3 days, 10 hours, and 30
minutes is represented as P1Y2M3DT10H30M. Typically, you might configure
a message timestamp for between 10 and 30 minutes. For example, 10 minutes
is represented as P0Y0M0DT0H10M0S.