Running SOAPSpy SOAPSpy Tool

5.1.2. Using SOAPSpy

The program consists of a call list and a message viewer. Received calls are stored in a list on the left side of the window. Calls can be selected and examined. Unwanted calls can by removed from the list using the Call menu or context pop-up. The message viewer displays the selected call, as shown in Figure 23 . Every call contains HTTP Request and HTTP Response tabs, which contain raw data caught by SOAPSpy. SOAP calls contain two specific panels, SOAP Request and SOAP Response, for advanced manipulation of SOAP messages. The same applies for WSDL calls. Figure 23. Call Types

5.1.3. SOAP Request Tab

The SOAP Request tab, shown in Figure 24 , consists of the SOAP Action, SOAP message and Target URL where the original request was sent. Every file can be edited. Click the Resend to produce a new HTTP request. The resent request appears in the call list. Figure 24. Request Tab 5.1.4. How to Run Clients Using SOAPSpy Java system properties http.proxyHost and http.proxyPort need to be set. Use the command java - Dhttp.proxyHost=CLIENT_COMPUTER_NAME -Dhttp.proxyPort=4444... before running SoapSpy. E.g.: java -Dhttp.proxyHost=CLIENT_COMPUTER_NAME -Dhttp.proxyPort=4444 org.my.FooClient Important Because SoapSpy works with the java.net proxy classes, it will not work with a localhost address. This applies to the endpoint URL that your client calls. If you do not see any activity when using SoapSpy, this is a likely cause. If you want to try running a service locally, simply obtain the machines hostname via the java.net.InetAddress class. Page 636 5.1.4. How to Run Clients Using SOAPSpy

5.2. Logging

Oracle Service Registry wraps the Log4j [http:logging.apache.orglog4jdocsindex.html] logging service to log errors, warnings, and other information. By default: • All such events are logged to REGISTRY_HOME\log\logEvents.log. • All errors including stack traces are logged to REGISTRY_HOME\log\errorEvents.log. • Behavior descriptions are configured in REGISTRY_HOME\conf\log4j.config. To use the same logging mechanism in custom server code such as the Custom Validation Service: 1. Import com.idoox.debug.Category to your java class: import com.idoox.debug.Category; 2. Create static instance with name of the category: private static Category log = Category.getCategorycom.company.MyValidationService; 3. It is a good habit to name the category according to its class name. You can use the category ... try{ ... } catchException e{ log.errorFatal error, e; } ... Page 637

5.2. Logging