JaxView Tools


JaxView includes a number of tools that are useful in working with Web services and debugging JaxView configurations. You access these tools in the Admin tab under the Tools node. This includes:

The following sections describe the Tools and how they can be used.

XPath Validation Tool

This tool is for validating an XPath expression against an XML markup text.

XPath Validation Tool Properties

XML String:
Insert the XML to verify the XPath against in this field.
XPath String:
Insert the XPath string to run. See the Xpath Tutorial for more information

XPath Examples

The following provides some example XPath expressions.

If the following is an example SOAP message from which you want to extract some content, you would copy and paste the SOAP message text into the XML String text box. In this example, the SOAP message contains a greeting text that is returned to the client:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns1:sayHelloResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
      xmlns:ns1="http://DefaultNamespace">
         <sayHelloReturn xsi:type="soapenc:string" 
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
            Hello Valued Customer
         </sayHelloReturn>
      </ns1:sayHelloResponse>
   </soapenv:Body>
</soapenv:Envelope>

In order to extract the greeting text content from this message, you would enter the following XPath expression into the XPath String text field:

Envelope/Body/sayHelloResponse/sayHelloReturn/text()

Note: The XPath expression does not use namespace prefixes that appear in the SOAP message. For example, the root node for the message is Body and not soapenv:Body.


Regular Expression Validation Tool

This tool is for validating a Regular Expression against some Web service message text. Regualr expressions can be used in JaxView to match and retain values from SOAP message or other HTTP message content. Generally it is easier to use XPath expressions to match on XML content. However, if there is a need to extract or check for client information, context metadata, or other authentication data that is normally in the HTTP header portion of a message, you will need to use regular expression matching.

Regular Expression Validation Tool Properties

Text:
Insert the text for the regular expression to run against
Regular Expression:
Insert the regular expression for the string to run. See the Regular Expression Tutorial

Regular Expression Examples

JaxView can do string literal matching or matching using regular expression patterns. It is important to note that when using regular expressions in JaxView that the expression pattern must account for the content preceeding AND following the content you are trying to match. Generally you can do this by appending the .* pattern to the beginning and end of your expression. To have the Regular Expression Tool "retain" and display the content that was matched, you should delimit the portion that you want to display with parentheses: .*(pattern).*.

The following is a example HTTP header text and some regular expression examples showing the syntax that can be used in JaxView.

GET /Hubble/servlet/TreeFrame HTTP/1.1
Host: localhost:9090
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:9090/Hubble/servlet/Delegate;jsessionid=1A4726990495EB1DD84D89FC114704C1?j_username=admin&j_password=tr33sns33ds
Cookie: JSESSIONID=1A4726990495EB1DD84D89FC114704C1

To match on a literal string, enter the string without any regular expression patterns. For example:

localhost:9090

The following example will match a pattern of digits and characters such as the JSESSIONID string in the example text above. Note that the .* pattern is used at the beginning and end of the regular expression pattern. The parentheses are used to retain only the value of the JSESSIONID.

.*JSESSIONID=([A-Z\d]{28,33}).*

The following example will match the username and password strings in the example text above. Note that the .* pattern is used at the beginning and end of the regular expression pattern. The parentheses are used to retain only the values of the two key pairs.

.*j_username=([a-zA-Z\d]{4,24})&j_password=([a-zA-Z\d\w]{4,24}).*


LDAP Validation Tool

This tool is for validating an LDAP authentication query against an LDAP data store.

LDAP Validation Tool Properties

LDAP Provider URL:
Enter the URL to the Directory server to connect to. The URL should include the ldap protocol and the port number that the directory server answers on. For example: ldap://directory.company.com:389.
Security Principal:
Enter the qualified name for the user that has permission to execute the directory query. For example: cn=Manager,dc=company,dc=com.
Password:
Enter the password for the Security Principal user entered above.
Search Filter:
Enter the search filter for this query. For example: (objectclass=person).
Root DN:
Enter the qualified domain component or other element that will be the root distinguished name for the search. For example, entering dc=company,dc=com might be used to search the entire directory.

Note: If the Directory server requires the use of the LDAPv3 protocol, you must add the [LDAP-3] switch parameter to the beginning of the Root DN string. For example: [LDAP-3]dc=company,dc=com.


JMS Message Validation Tool

This tool is to check the JMS connection by sending a sample message to an Enterprise Service Bus (ESB) or a Message Broker.

NOTE: See the section on ESB for more information.

JMS Message Validation Tool Properties

Provider URL:
The URL of the JMS provider
Connection Factory Name:
The name of the connection factory for the JMS connection
Context Factory Name:
The class for initial context factory. This class needs to be in the application classpath.
Username:
Name of the user to access the provider with.
Password:
Password for authentication to the provider
Text message:
The sample message to be sent
Topic Name:
Topic name to send the message to

HTTP Tool

The JaxView HTTP tool allows you to send a test HTTP request to a service URL. Complete the fields in the form as indicated and click the Send button at the bottom of the form to submit the request. JaxView will display the response from the request in the right side panel.

URL
Enter the URL where the HTTP request message will be sent.
Headers
Use this text box to enter any custom HTTP header data to be sent with the request. If you leave this field blank, JaxView will send default HTTP headers. To use custom headers, enter one header key-value pair per line terminated with a carriage return/line feed. For example:
 
     Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
     Accept-Encoding: gzip,deflate
     Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
     Keep-Alive: 300
     Connection: keep-alive
     Referer: http://localhost:9090/Hubble/servlet/LoginServlet
     Cookie: JSESSIONID=1A4726990495EB1DD84D89FC114704C1
Body
Enter the text content for the body of the request. For SOAP-based Web services, this may be the SOAP Envelope message.

 

WS-Policy Tool

You can use the WS-Policy Tool to do one or more of the following actions using WS-Policy expressions:

The following sections describe the steps you use to perform these actions.

To validate a WS-Policy expression

  1. Copy and paste the policy expression into the Main WS-Policy Expression text area in the WS-Policy Tool form
  2. Click the Validate button at the bottom of the form
  3. JaxView parsers the policy expression and reports if it is valid or reports errors such as namespace bindings that are missing.

To merge two WS-Policy expressions

  1. Copy and paste one of the policy expressions into the Main WS-Policy Expression text area in the WS-Policy Tool form
  2. Copy and paste the second the policy expression into the Second WS-Policy Expression text area in the WS-Policy Tool form
  3. Click the Merge button at the bottom of the form
  4. JaxView parsers the policy expression and displays the merged policy statement or reports errors that were encountered

To find the intersection of two WS-Policy expressions

  1. Copy and paste one of the policy expressions into the Main WS-Policy Expression text area in the WS-Policy Tool form
  2. Copy and paste the second the policy expression into the Second WS-Policy Expression text area in the WS-Policy Tool form
  3. Click the Intersect button at the bottom of the form
  4. JaxView parsers the policy expression and displays the policy expression intersection or reports errors that were encountered

To normalize a WS-Policy expression

  1. Copy and paste the compact form of the policy expression into the Main WS-Policy Expression text area in the WS-Policy Tool
  2. Click the Normalize button at the bottom of the form
  3. JaxView parsers the policy expression and displays the normalized form

WS-Policy Tool Properties

Main WS-Policy Expression
Copy and paste WS-Policy expressions into this text area for processing.
Second WS-Policy Expression
For merging or finding policy intersections, copy and paste the second policy expression into this text area.
WS-Policy Result
This text area displays the results of different policy tool actions.