The SOAP Procedure |
SSL and Data Encryption |
SSL enables Web browsers and Web servers to communicate over a secured connection by encrypting data. Both browsers and servers encrypt data before the data is transmitted. The receiving browser or server then decryptes the data before it is processed.
Making PROC SOAP Calls by Using the HTTPS Protocol |
In order to make PROC SOAP calls by using the HTTPS protocol, you must configure a trust source that contains the certificate of the service to be trusted. This trust store and its password must be provided to the SAS session by setting Java system options using jreoptions. You can provide this information on the SAS command line or in a SAS configuration file. Use the following syntax. Be sure to enter the following entry on one line:
-jreoptions (-Djavax.net.ssl.trustStore=full-path-to-the-trust-store -Djavax.net.ssl.trustStorePassword=trustStorePassword)
The following example shows how to use the entry on the SAS command line. The example uses the Windows operating environment. Be sure to enter the following entry on one line:
"C:\Program Files\SAS\SASFoundation\9.2\sas.exe" -CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG" -jreoptions (- Djavax.net.ssl.trustStore=C:\Documents and Settings\mydir\.keystore - Djavax.net.ssl.trustStorePassword=trustpassword)
Tracing the Request and Response |
PROC SOAP uses log4j for logging requests and responses so that you can trace them. To create a log file that contains the request issued and the response received, create a file that has the following contents:
log4j.appender.FILE=org.apache.log4j.FileAppender log4j.appender.FILE.File=wire.log log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern =%d %5p [%c] %m%n
log4j.logger.httpclient.wire=DEBUG, FILE #log4j.logger.org.apache.commons.httpclient=DEBUG, FILE
This configuration logs only the request and response as it is sent and received. To log context information, which includes settings and system information, remove the comment character in the last line of the configuration shown above.
Enable logging by setting a Java system option using jreoptions on the SAS command line or in a SAS configuration file. The following syntax shows how to set the system option: -jreoptions (-Dlog4j.configuration=path-to-log4j-config-file)
The following example shows how to use the entry on the SAS command line. The example uses the Windows operating environment. Be sure to enter the entry on one line:
"C:\Program Files\SAS\SASFoundation\9.2\sas.exe" -CONFIG "C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG" -jreoptions (- Dlog4j.configuration=file:/c:/public/log4j.properties)
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.