The following information explains the difference between using
an XPath expression and using keywords to specify which part of the message
to sign:
- XPath expression
- Specify any part of the message using an XPath expression. XPath is a
language that is used to address parts of an XML document. You can find information
on XPath syntax at the following Web site: http://www.w3.org/TR/1999/REC-xpath-19991116.
- Keywords
- Specify only elements within the message using predefined keywords.
Complete the following steps to specify which message parts to digitally
sign when you configure the generator security constraints for either the
request generator or the response generator. The request generator is configured
for the client and the response generator is configured for the server. In
the following steps, you must configure either the client-side extensions
in step 2 or the server-side extensions in step 3.
- 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.
- Expand the Web Services > Client section and double-click the
name of the Web service.
- Click the WS Extension tab and expand the Request Generator
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.
- Expand the Web Services > Services section and double-click
the name of the Web service.
- Click the Extensions tab and expand the Response Generator
Service Configuration Details section.
- Expand the Integrity section. Integrity refers to digital
signature while confidentiality refers to encryption. Integrity decreases
the risk of data modification when you transmit data across a network. For
more information on digitally signing Simple Object Access Protocol (SOAP)
messages, see XML digital signature.
- Click Add to indicate which parts of the message to sign. The Integrity Dialog window is displayed.
- Specify a name for the integrity element in the Integrity Name
field. For example, you might specify int_xpath.
- Specify an order in the Order field. The value, which
must be a positive integer value, specifies the order in which the digital
signature is processed. An order value of 1 specifies that the signing is
done first.
- Click Add under the Message Parts section of the Integrity
Dialog window.
- Select the Message parts dialect from the Message Parts section
of the Integrity Dialog window. If you select the http://www.w3.org/TR/1999/REC-xpath-19991116
dialect, the message part that will be signed is specified by an XPath expression.
- Specify the message part to be signed using an XPath expression
in the Message parts keyword field. For example, to specify that
the body is signed, you might add the following expression in the Message
parts keyword field as one continuous line:
/*[namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/' and local-name()='Envelope']/*
[namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/' and local-name()='Body']
- Click OK to save the configuration changes.
Note: These
configurations for the generator and the consumer must match.
In
addition to the message parts, you also can specify that WebSphere
® Application
Server sign the nonce and timestamp elements. For more information, see the
following articles: