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.
This tool is for validating an XPath expression against an XML markup text.
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.
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.
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}).*
This tool is for validating an LDAP authentication query against an LDAP data store.
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.
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.
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.
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
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
To merge two WS-Policy expressions
To find the intersection of two WS-Policy expressions
To normalize a WS-Policy expression