<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://java.sys-con.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Hibernate | JSF | Spring</title>
 <link>http://java.sys-con.com/</link>
 <description>Latest articles from Hibernate | JSF | Spring</description>
 <language>en</language>
 <copyright>Copyright 2009 Ulitzer.com</copyright>
 <generator>Ulitzer.com</generator>
 <lastBuildDate>Mon, 09 Nov 2009 03:08:09 EST</lastBuildDate>
 <docs>http://backend.userland.com/rss</docs>
 <ttl>10</ttl>
<item>
 <title>One-Way SSL with JAX-WS Using JDeveloper 11gR1 and WLS 10.3.1</title>
 <link>http://java.sys-con.com/node/1075471</link>
 <description>A while back Gerard Davison blogged some simple examples of using &lt;a href=&quot;http://kingsfleet.blogspot.com/2009/01/security-policy-worked-example.html&quot;&gt;WS-Security Policies&lt;/a&gt;.  Gerard&#039;s specific example dealt with the WLS policy Wssp1.2-2007-Wss1.1-UsernameToken-Plain-X509-Basic256.xml.  As Gerard notes the said policy (further documented in the WLS 10.3.1 doco &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13713/message.htm#i210119&quot;&gt;here&lt;/a&gt;) implements user name tokens, encryption of the tokens and signing of the whole SOAP payload.&lt;br /&gt;&lt;br /&gt;The following post strips back Gerard&#039;s example to instead to consider the steps in setting up and testing One-Way SSL for a JAX-WS web service generated via JDeveloper 11gR1 and installed in WLS 10.3.1, using the WLS policy Wssp1.2-2007-Https.xml.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Assumptions&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This article assumes the reader has the following basic knowledge:&lt;br /&gt;&lt;br /&gt;* HTTPS/SSL&lt;br /&gt;* Digital certificates and trusted/certificate authorities (CAs)&lt;br /&gt;* Oracle&#039;s WebLogic Server, WLS managed servers and the WLS console&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;One-Way SSL vs Two-Way SSL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For those not familiar with either, Oracle&#039;s WLS documentation has a good explanation of the implementation of and differences between One-Way SSL and Two-Way SSL in the &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13710/concepts.htm#i1122990&quot;&gt;Understanding Security for Oracle WebLogic Server&lt;/a&gt; manual.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Steps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To implement a One-Way SSL example we&#039;ll run through the following steps:&lt;br /&gt;&lt;br /&gt;1) Create a basic JAX-WS web service with JDeveloper 11gR1&lt;br /&gt;2) Generate the digital certificates required for the WLS server&lt;br /&gt;3) Modify the web service to use the Wssp1.2-2007-Https.xml WLS policy&lt;br /&gt;4) Deploy the running web service to WLS&lt;br /&gt;5) Test the running web service via JDeveloper&#039;s HTTP Analyzer&lt;br /&gt;6) Test the running web service via SoapUI&lt;br /&gt;7) Test the running web service via a JAX-WS client&lt;br /&gt;8) Inspect the web service packets on the wire to verify the traffic is indeed encrypted&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1) Create a basic JAX-WS web service with JDeveloper 11gR1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This step is documented in a previous &lt;a href=&quot;http://one-size-doesnt-fit-all.blogspot.com/2008/11/creating-jax-ws-web-services-via-wsdl.html&quot;&gt;blog&lt;/a&gt; post Creating JAX-WS web services via a WSDL in JDev 11g.  There are also a number of viewlet demonstrations available from Oracle&#039;s &lt;a href=&quot;http://www.oracle.com/technology/products/jdev/viewlets/11/index.html&quot;&gt;OTN&lt;/a&gt; which show how to construct the WSDL in a drag&#039;n&#039;drop fashion. &lt;br /&gt;&lt;br /&gt;The resulting web service we&#039;ll demonstrate here is a very simple one.  It is comprised of the following solutions:&lt;br /&gt;&lt;br /&gt;OneWaySSLExample.xsd&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;windows-1252&quot; ?&gt;&lt;br /&gt;&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns=&quot;http://www.sagecomputing.com.au&quot;&lt;br /&gt;            targetNamespace=&quot;http://www.sagecomputing.com.au&quot; elementFormDefault=&quot;qualified&quot;&gt;&lt;br /&gt;  &lt;xsd:element name=&quot;inputElement&quot; type=&quot;xsd:string&quot;/&gt;&lt;br /&gt;  &lt;xsd:element name=&quot;outputElement&quot; type=&quot;xsd:string&quot;/&gt;&lt;br /&gt;&lt;/xsd:schema&gt;&lt;/pre&gt;The inputElement and the outputElement will constitute the incoming and outgoing payloads of a simple HelloWorld web service.&lt;br /&gt;&lt;br /&gt;OneWaySSLExample.wsdl&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;br /&gt;&lt;definitions targetNamespace=&quot;urn:OneWaySSLExample.wsdl&quot; xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot;&lt;br /&gt;             xmlns:tns=&quot;urn:OneWaySSLExample.wsdl&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;br /&gt;             xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:mime=&quot;http://schemas.xmlsoap.org/wsdl/mime/&quot;&lt;br /&gt;             xmlns:soap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:wsca=&quot;http://www.sagecomputing.com.au&quot;&gt;&lt;br /&gt;  &lt;types&gt;&lt;br /&gt;    &lt;xsd:schema&gt;&lt;br /&gt;      &lt;xsd:import schemaLocation=&quot;../xsd/OneWaySSLExample.xsd&quot; namespace=&quot;http://www.sagecomputing.com.au&quot;/&gt;&lt;br /&gt;    &lt;/xsd:schema&gt;&lt;br /&gt;  &lt;/types&gt;&lt;br /&gt;  &lt;message name=&quot;InputMessage&quot;&gt;&lt;br /&gt;    &lt;part name=&quot;part&quot; element=&quot;wsca:inputElement&quot;/&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;message name=&quot;OutputMessage&quot;&gt;&lt;br /&gt;    &lt;part name=&quot;part&quot; element=&quot;wsca:outputElement&quot;/&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;portType name=&quot;OneWaySSLPortType&quot;&gt;&lt;br /&gt;    &lt;operation name=&quot;OneWaySSLOperation&quot;&gt;&lt;br /&gt;      &lt;input message=&quot;tns:InputMessage&quot;/&gt;&lt;br /&gt;      &lt;output message=&quot;tns:OutputMessage&quot;/&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/portType&gt;&lt;br /&gt;  &lt;binding name=&quot;OneWaySSLBinding&quot; type=&quot;tns:OneWaySSLPortType&quot;&gt;&lt;br /&gt;    &lt;soap12:binding style=&quot;document&quot; transport=&quot;http://schemas.xmlsoap.org/soap/http&quot;/&gt;&lt;br /&gt;    &lt;operation name=&quot;OneWaySSLOperation&quot;&gt;&lt;br /&gt;      &lt;soap12:operation style=&quot;document&quot; soapAction=&quot;urn:OneWaySSLExample.wsdl/OneWaySSLOperation&quot;/&gt;&lt;br /&gt;      &lt;input&gt;&lt;br /&gt;        &lt;soap12:body use=&quot;literal&quot; parts=&quot;part&quot;/&gt;&lt;br /&gt;      &lt;/input&gt;&lt;br /&gt;      &lt;output&gt;&lt;br /&gt;        &lt;soap12:body use=&quot;literal&quot; parts=&quot;part&quot;/&gt;&lt;br /&gt;      &lt;/output&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/binding&gt;&lt;br /&gt;  &lt;service name=&quot;OneWaySSLService&quot;&gt;&lt;br /&gt;    &lt;port name=&quot;OneWaySSLPortTypePort&quot; binding=&quot;tns:OneWaySSLBinding&quot;&gt;&lt;br /&gt;      &lt;soap12:address location=&quot;http://www.sagecomputing.com.au &quot;/&gt;&lt;br /&gt;    &lt;/port&gt;&lt;br /&gt;  &lt;/service&gt;&lt;br /&gt;&lt;/definitions&gt;&lt;/pre&gt;&lt;br /&gt;The overall web service comprises of a single operation accepting the inputElement and outputElement strings as specified in the XSD.&lt;br /&gt;&lt;br /&gt;OneWaySSLPortTypeImpl.java&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;package au.com.sagecomputing.ws;&lt;br /&gt;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;import javax.xml.ws.BindingType;&lt;br /&gt;import javax.xml.ws.soap.SOAPBinding;&lt;br /&gt;&lt;br /&gt;@WebService(serviceName = &quot;OneWaySSLService&quot;,&lt;br /&gt;            targetNamespace = &quot;urn:OneWaySSLExample.wsdl&quot;,&lt;br /&gt;            portName = &quot;OneWaySSLPortTypePort&quot;,&lt;br /&gt;            endpointInterface = &quot;au.com.sagecomputing.ws.OneWaySSLPortType&quot;,&lt;br /&gt;            wsdlLocation = &quot;/WEB-INF/wsdl/OneWaySSLExample.wsdl&quot;)&lt;br /&gt;@BindingType(SOAPBinding.SOAP12HTTP_BINDING)&lt;br /&gt;public class OneWaySSLPortTypeImpl {&lt;br /&gt;&lt;br /&gt;  public String oneWaySSLOperation(String part) {&lt;br /&gt;    return &quot;Hello &quot; + part;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;A very basic JAX-WS web service accepting the inputElement String and returning the outputElement String prefixed with &quot;Hello &quot;.&lt;br /&gt;&lt;br /&gt;Example request SOAP payload&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;env:Envelope xmlns:env=&quot;http://www.w3.org/2003/05/soap-envelope&quot; xmlns:ns1=&quot;http://www.sagecomputing.com.au&quot;&gt;&lt;br /&gt;   &lt;env:Header/&gt;&lt;br /&gt;   &lt;env:Body&gt;&lt;br /&gt;      &lt;ns1:inputElement&gt;Chris&lt;/ns1:inputElement&gt;&lt;br /&gt;   &lt;/env:Body&gt;&lt;br /&gt;&lt;/env:Envelope&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Example response SOAP payload&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version = &#039;1.0&#039; encoding = &#039;UTF-8&#039;?&gt;&lt;br /&gt;&lt;S:Envelope xmlns:S=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;&lt;br /&gt;   &lt;S:Body&gt;&lt;br /&gt;      &lt;outputElement xmlns=&quot;http://www.sagecomputing.com.au&quot;&gt;Hello Chris&lt;/outputElement&gt;&lt;br /&gt;   &lt;/S:Body&gt;&lt;br /&gt;&lt;/S:Envelope&gt;&lt;/pre&gt;The overall application/project structure will look as follows in JDeveloper&#039;s Application Navigator:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOW0MlyI/AAAAAAAAAz0/Yh6wVO5dzNI/s1600-h/sslExamplePic0.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 254px; height: 400px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOW0MlyI/AAAAAAAAAz0/Yh6wVO5dzNI/s400/sslExamplePic0.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199743003203362&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2) Generate the digital certificates required for the WLS server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order for a client to undertake a SSL connection with our web service on the WLS server, the WLS server must be configured with a valid digital certificate.  &lt;br /&gt;&lt;br /&gt;Again note from the Oracle &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13710/concepts.htm#i1122990&quot;&gt;documentation&lt;/a&gt; how One-Way SSL works at runtime:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;With one-way SSL authentication, the target (the server) is required to present a digital certificate to the initiator (the client) to prove its identity. The client performs two checks to validate the digital certificate:&lt;br /&gt;&lt;br /&gt;1. The client verifies that the certificate is trusted (meaning, it was issued by the client&#039;s trusted CA), is valid (not expired), and satisfies the other certificate constraints.&lt;br /&gt;2. The client checks that the certificate Subject&#039;s common name (CN) field value matches the host name of the server to which the client is trying to connect&lt;br /&gt;&lt;br /&gt;If both of the above checks return true, the SSL connection is established.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In this section we consider the digital certificates required for the WLS server.&lt;br /&gt;&lt;br /&gt;WLS is an interesting application server in that it keeps two separate Java keystores, 1 for storing the digital certificates for such actions as SSL, and another which is typically used for storing CA digital certificates.  The former is referred to as the identity keystore, the later the trust keystore.&lt;br /&gt;&lt;br /&gt;The WLS manual Securing Oracle WebLogic Server section 11 &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1202182&quot;&gt;Configuring Identity and Trust&lt;/a&gt; has a detailed explanation of this setup.&lt;br /&gt;&lt;br /&gt;By default WLS comes with demonstration identity and trust keystores containing demonstration digital certificates.  As the WLS documentation takes great pains to explain these are for development purposes only and should never be used in a production environment.  For the purposes of this blog post if you&#039;re testing One-Way SSL in a development environment you can in fact skip this entire step as the demonstration WLS keystores will suffice.&lt;br /&gt;&lt;br /&gt;To check that the demonstration keystores are currently installed login to your WLS console, select your server, and under the Configurations -&gt; Keystores tab you&#039;ll see the following entries:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tO5JWl1I/AAAAAAAAAz8/bD2U_1xqnnA/s1600-h/sslExamplePic1.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 376px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tO5JWl1I/AAAAAAAAAz8/bD2U_1xqnnA/s400/sslExamplePic1.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199752218744658&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Your entries for the file locations of the keystore will be different from my example here dependent on where you installed WLS.&lt;br /&gt;&lt;br /&gt;However using the demonstration keystores avoids the whole learning exercise of configuring your own custom digital certificates in WLS which is an important lesson.  The following describes those steps in detail, as based off Gerard&#039;s original &lt;a href=&quot;http://kingsfleet.blogspot.com/2009/01/security-policy-worked-example.html&quot;&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To install our own digital certificate we followed these general steps:&lt;br /&gt;&lt;br /&gt;a) Open a command prompt and set the WLS environment&lt;br /&gt;b) Generate our own trusted certificate authority digital certificate&lt;br /&gt;c) Store the private key and digital certificate and import into the identity keystore&lt;br /&gt;d) Store the same digital certificate into the trust keystore.&lt;br /&gt;e) Configure the new keystores in WLS&#039;s identity and trust keystore&lt;br /&gt;&lt;br /&gt;The following describes those steps in detail.  In order to do this we&#039;ve used WLS utilities to do as much of the work as possible.&lt;br /&gt;&lt;br /&gt;a) Open a command prompt and set the WLS environment&lt;br /&gt;&lt;br /&gt;Under Windows open a command prompt on the same machine as where WLS is installed, create a temporary directory in your favourite place and cd to that directory, and run your WLS server&#039;s setDomainEnv.cmd command.  Something like:&lt;br /&gt;&lt;br /&gt;&quot;C:\&lt;wls_home&gt;\setDomainEnv.cmd&quot;&lt;br /&gt;&lt;br /&gt;Once run ensure you&#039;re still in your new directory.&lt;br /&gt;&lt;br /&gt;b) Generate our own trusted certificate authority digital certificate&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;java utils.CertGen -certfile ServerCACert -keyfile ServerCAKey -keyfilepass ServerCAKey -selfsigned -e &lt;a href=&quot;mailto:somebody@xxxx.com.au&quot;&gt;somebody@xxxx.com.au&lt;/a&gt; -ou FOR-DEVELOPMENT-ONLY -o XXXX -l PERTH -s WA -c AU&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This generates 4 files: ServerCACert.der, ServerCACert.pem, ServerCAKey.der, ServerCAKey.pem&lt;br /&gt;&lt;br /&gt;The utils.CertGen utility is useful for development purposes, but as per the WLS documentation, should not be used for production purposes.  Alternatively &lt;a href=&quot;http://www.openssl.org&quot;&gt;OpenSSL&lt;/a&gt; could be used instead.&lt;br /&gt;&lt;br /&gt;Note the use of selfsigned flag.  This implies this digital certificate will be used both as the CA in the trust keystore and the served digital certificate in the identity keystore.  This is not what we&#039;d do for a production environment using commercial Certificate Authorities, but is sufficient for demonstration purposes in this post.&lt;br /&gt;&lt;br /&gt;More information on:&lt;br /&gt;&lt;br /&gt;* the WLS CertGen utility can be found &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1198919&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;* .der vs .pem files can be found &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1196582&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://e-docs.bea.com/wls/docs92/secmanage/identity_trust.html#wp1195506&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;* WLS provides two utilities &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1218395&quot;&gt;der2pem&lt;/a&gt; and &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1185185&quot;&gt;pem2der&lt;/a&gt; can be used to convert between the two file types.&lt;br /&gt;&lt;br /&gt;Under Windows you can double click on the ServerCACert.der file to show its contents:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPTY5fuI/AAAAAAAAA0E/C8rY0ol90MA/s1600-h/sslExamplePic2.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 322px; height: 400px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPTY5fuI/AAAAAAAAA0E/C8rY0ol90MA/s400/sslExamplePic2.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199759263268578&quot; /&gt;&lt;/a&gt;&lt;br /&gt;If you have access to the openSSL command line tool you can use it to query the certificate we just created:&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;openssl x509 -text -inform der -in ServerCACert.der&lt;br /&gt;&lt;br /&gt;Certificate:&lt;br /&gt;    Data:&lt;br /&gt;        Version: 3 (0x2)&lt;br /&gt;        Serial Number:&lt;br /&gt;            0d:a9:d1:4a:0f:0b:b2:61:13:90:89:f5:40:4d:4f:e2&lt;br /&gt;        Signature Algorithm: md5WithRSAEncryption&lt;br /&gt;        Issuer: C=AU, ST=WA, L=PERTH, O=SAGECOMPUTING, OU=FOR-DEVELOPMENT-ONLY, CN=&lt;hostname obscured - CM&gt;/emailAddress=somebody@sagecomputing.com.au&lt;br /&gt;        Validity&lt;br /&gt;            Not Before: Jul  9 07:06:49 2009 GMT&lt;br /&gt;            Not After : Jul 10 07:06:49 2029 GMT&lt;br /&gt;        Subject: C=AU, ST=WA, L=PERTH, O=SAGECOMPUTING, OU=FOR-DEVELOPMENT-ONLY, CN=&lt;hostname obscured - CM&gt;/emailAddress=somebody@sagecomputing.com.au&lt;br /&gt;        Subject Public Key Info:&lt;br /&gt;            Public Key Algorithm: rsaEncryption&lt;br /&gt;            RSA Public Key: (1024 bit)&lt;br /&gt;                Modulus (1024 bit):&lt;br /&gt;                    00:df:cb:6c:ed:86:75:4c:5b:66:cd:aa:3d:34:8f:&lt;br /&gt;                    &lt;snip&gt;&lt;br /&gt;                    73:f6:9c:b5:ed:82:9c:c3:15&lt;br /&gt;                Exponent: 65537 (0x10001)&lt;br /&gt;        X509v3 extensions:&lt;br /&gt;            X509v3 Key Usage: critical&lt;br /&gt;                Certificate Sign&lt;br /&gt;            X509v3 Basic Constraints: critical&lt;br /&gt;                CA:TRUE, pathlen:1&lt;br /&gt;    Signature Algorithm: md5WithRSAEncryption&lt;br /&gt;        b7:fa:1b:8f:c4:ee:af:6b:1d:f0:dc:f4:cf:35:20:f1:df:eb:&lt;br /&gt;        &lt;snip&gt;&lt;br /&gt;        0c:fe&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;MIIC8zCCAlygAwIBAgIQDanRSg8LsmETkIn1QE1P4jANBgkqhkiG9w0BAQQFADCB&lt;br /&gt;&lt;snip&gt;&lt;br /&gt;i7Pd63d03mWkI85tvsr5Q+40yitOL5JnLsbyHSrM+1aK8kkY7Qz+&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;&lt;snip&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This identifies information that maybe useful later if we make a mistake, such as the encryption algorithm used (RSA), the size of the keys (1024bit), the serial number of the certificate (a hex number).&lt;br /&gt;&lt;br /&gt;c) Store the private key and the digital certificate in the identity keystore&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;java utils.ImportPrivateKey -certfile ServerCACert.der -keyfile ServerCAKey.der -keyfilepass ServerCAKey -keystore ServerIdentity.jks -storepass ServerCAKey -alias identity -keypass ServerCAKey&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;d) Store the same digital certificate into the trust keystore&lt;br /&gt;Import the certificate generated in step b into a trust keystore.&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;keytool -import -v -trustcacerts -alias identity -file ServerCACert.der -keystore ServerTrust.jks -storepass ServerTrustStorePass&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;e) Configure the new keystores in WLS&#039;s identity and trust keystore&lt;br /&gt;&lt;br /&gt;To configure the keystores in WLS enter the WLS console, select the managed server you&#039;re interested in, then make the following changes under the following tabs:&lt;br /&gt;&lt;br /&gt;Configuration tab -&gt; General subtab&lt;br /&gt;&lt;br /&gt;SSL Listed Port Enabled = checkbox&lt;br /&gt;SSL Listen Port = 7102 (and different from the Listen Port)&lt;br /&gt;&lt;br /&gt;Configuration tab -&gt; Keystores subtab&lt;br /&gt;&lt;br /&gt;Keystores = Custom Identity and Custom Trust&lt;br /&gt;Custom Identity Keystore = &lt;path&gt;\ServerIdentity.jks, such as c:\temp\ServerIdentity.jks&lt;br /&gt;Custom Identity Keystore Type = jks&lt;br /&gt;Custom Identity Keystore Passphrase = ServerCAKey&lt;br /&gt;Confirm Custom Identity Keystore Passphrase = ServerCAKey&lt;br /&gt;&lt;br /&gt;Custom Trust Keystore = &lt;path&gt;\ServerTrust.jks, such as c:\temp\ServerTrust.jks&lt;br /&gt;Custom Trust Keystore Type = jks&lt;br /&gt;Custom Trust Keystore Passphrase = ServerTrustStorePass&lt;br /&gt;Confirm Custom Trust Keystore Passphrase = ServerTrustStorePass&lt;br /&gt;&lt;br /&gt;Configuration tab -&gt; SSL subtab&lt;br /&gt;&lt;br /&gt;Identify and Trust Locations = Keystores&lt;br /&gt;Private key alias = identity&lt;br /&gt;Private Key Passphrase = ServerCAKey&lt;br /&gt;Confirm Private Key Passphrase = ServerCAKey&lt;br /&gt;&lt;br /&gt;Then save.&lt;br /&gt;&lt;br /&gt;After this restart your WLS server and you should see similar messages to the following in the WLS logs:&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;Jul 14, 2009 2:12:03 PM GMT+05:30&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090171&gt; &lt;Loading the identity certificate and private key stored under the alias identity from the JKS keystore file C:\Temp\Server Identity.jks.&gt;&lt;br /&gt;&lt;Jul 14, 2009 2:12:03 PM GMT+05:30&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090169&gt; &lt;Loading trusted certificates from the JKS keystore file C:\Temp\ServerTrust.jks.&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Alternatively is you see the following messages you have made a mistake in your configuration:&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;10/07/2009 4:08:30 PM WST&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090171&gt; &lt;Loading the identity certificate and private key stored under the alias identity from the jks keystore file c:\temp\ServerIdentity.jks.&gt; &lt;br /&gt;&lt;10/07/2009 4:08:30 PM WST&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090169&gt; &lt;Loading trusted certificates from the jks keystore file c:\temp\ServerTrust.jks.&gt; &lt;br /&gt;&lt;10/07/2009 4:08:30 PM WST&gt; &lt;Warning&gt; &lt;Security&gt; &lt;BEA-090172&gt; &lt;No trusted certificates have been loaded. Server will not trust to any certificate it receives.&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3) Modify the web service to use the Wssp1.2-2007-Https.xml WLS policy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This can be done in a number of ways in JDeveloper, the easiest of which for this blog post at least is just to insert the @Policy annotation into the JAX-WS endpoint as follows:&lt;br /&gt;&lt;br /&gt;(Note if you&#039;re using earlier versions of JDeveloper or Eclipse, this mechanism wont work, you must manually add the policies to the WSDL).&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;package au.com.sagecomputing.ws;&lt;br /&gt;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;import javax.xml.ws.BindingType;&lt;br /&gt;import javax.xml.ws.soap.SOAPBinding;&lt;br /&gt;&lt;br /&gt;import weblogic.jws.Policy;&lt;br /&gt;&lt;br /&gt;@WebService(serviceName = &quot;OneWaySSLService&quot;,&lt;br /&gt;            targetNamespace = &quot;urn:OneWaySSLExample.wsdl&quot;,&lt;br /&gt;            portName = &quot;OneWaySSLPortTypePort&quot;,&lt;br /&gt;            endpointInterface = &quot;au.com.sagecomputing.ws.OneWaySSLPortType&quot;,&lt;br /&gt;            wsdlLocation = &quot;/WEB-INF/wsdl/OneWaySSLExample.wsdl&quot;)&lt;br /&gt;@BindingType(SOAPBinding.SOAP12HTTP_BINDING)&lt;br /&gt;@Policy(uri = &quot;policy:Wssp1.2-2007-Https.xml&quot;) &lt;br /&gt;public class OneWaySSLPortTypeImpl {&lt;br /&gt;&lt;br /&gt;  public String oneWaySSLOperation(String part) {&lt;br /&gt;    return &quot;Hello &quot; + part;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4) Deploy the running web service to WLS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Within JDeveloper to deploy and run from the integrated WLS, it&#039;s simply a case of right clicking on the JAX-WS file and selecting Run.&lt;br /&gt;&lt;br /&gt;If you click on the hyperlink provided in the log window, this will open the HTTP Analyzer.  From the HTTP Analyzer you can open the WSDL at the top of the window:&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version=&#039;1.0&#039; encoding=&#039;UTF-8&#039;?&gt;&lt;!-- Published by JAX-WS RI at &lt;a href=&quot;http://jax-ws.dev.java.net&quot; title=&quot;http://jax-ws.dev.java.net&quot;&gt;http://jax-ws.dev.java.net&lt;/a&gt;. RI&#039;s version is Oracle JAX-WS 2.1.4. --&gt;&lt;definitions xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns:tns=&quot;urn:OneWaySSLExample.wsdl&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:mime=&quot;http://schemas.xmlsoap.org/wsdl/mime/&quot; xmlns:soap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:wsca=&quot;http://www.sagecomputing.com.au&quot; targetNamespace=&quot;urn:OneWaySSLExample.wsdl&quot; xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot; xmlns:wssutil=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;&gt;&lt;wsp:UsingPolicy wssutil:Required=&quot;true&quot; /&gt;&lt;wsp:Policy wssutil:Id=&quot;Wssp1.2-2007-Https.xml&quot;&gt;&lt;ns0:TransportBinding xmlns:ns0=&quot;http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&quot;&gt;&lt;wsp:Policy&gt;&lt;ns0:TransportToken&gt;&lt;wsp:Policy&gt;&lt;ns0:HttpsToken /&gt;&lt;/wsp:Policy&gt;&lt;/ns0:TransportToken&gt;&lt;ns0:AlgorithmSuite&gt;&lt;wsp:Policy&gt;&lt;ns0:Basic256 /&gt;&lt;/wsp:Policy&gt;&lt;/ns0:AlgorithmSuite&gt;&lt;ns0:Layout&gt;&lt;wsp:Policy&gt;&lt;ns0:Lax /&gt;&lt;/wsp:Policy&gt;&lt;/ns0:Layout&gt;&lt;ns0:IncludeTimestamp /&gt;&lt;/wsp:Policy&gt;&lt;/ns0:TransportBinding&gt;&lt;/wsp:Policy&gt;&lt;br /&gt;  &lt;types&gt;&lt;br /&gt;    &lt;xsd:schema&gt;&lt;br /&gt;      &lt;xsd:import schemaLocation=&quot;http://localhost:7101/WebServiceSSLExamples-OneWaySSLExample-context-root/OneWaySSLPortTypePort?xsd=1&quot; namespace=&quot;http://www.sagecomputing.com.au&quot; /&gt;&lt;br /&gt;    &lt;/xsd:schema&gt;&lt;br /&gt;  &lt;/types&gt;&lt;br /&gt;  &lt;message name=&quot;InputMessage&quot;&gt;&lt;br /&gt;    &lt;part name=&quot;part&quot; element=&quot;wsca:inputElement&quot; /&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;message name=&quot;OutputMessage&quot;&gt;&lt;br /&gt;    &lt;part name=&quot;part&quot; element=&quot;wsca:outputElement&quot; /&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;portType name=&quot;OneWaySSLPortType&quot;&gt;&lt;br /&gt;    &lt;operation name=&quot;OneWaySSLOperation&quot;&gt;&lt;br /&gt;      &lt;input message=&quot;tns:InputMessage&quot; /&gt;&lt;br /&gt;      &lt;output message=&quot;tns:OutputMessage&quot; /&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/portType&gt;&lt;br /&gt;  &lt;binding name=&quot;OneWaySSLBinding&quot; type=&quot;tns:OneWaySSLPortType&quot;&gt;&lt;wsp:PolicyReference URI=&quot;#Wssp1.2-2007-Https.xml&quot; /&gt;&lt;br /&gt;    &lt;soap12:binding style=&quot;document&quot; transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; /&gt;&lt;br /&gt;    &lt;operation name=&quot;OneWaySSLOperation&quot;&gt;&lt;br /&gt;      &lt;soap12:operation style=&quot;document&quot; soapAction=&quot;urn:OneWaySSLExample.wsdl/OneWaySSLOperation&quot; /&gt;&lt;br /&gt;      &lt;input&gt;&lt;br /&gt;        &lt;soap12:body use=&quot;literal&quot; parts=&quot;part&quot; /&gt;&lt;br /&gt;      &lt;/input&gt;&lt;br /&gt;      &lt;output&gt;&lt;br /&gt;        &lt;soap12:body use=&quot;literal&quot; parts=&quot;part&quot; /&gt;&lt;br /&gt;      &lt;/output&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/binding&gt;&lt;br /&gt;  &lt;service name=&quot;OneWaySSLService&quot;&gt;&lt;br /&gt;    &lt;port name=&quot;OneWaySSLPortTypePort&quot; binding=&quot;tns:OneWaySSLBinding&quot;&gt;&lt;br /&gt;      &lt;soap12:address location=&quot;https://localhost:7102/WebServiceSSLExamples-OneWaySSLExample-context-root/OneWaySSLPortTypePort&quot; /&gt;&lt;br /&gt;    &lt;/port&gt;&lt;br /&gt;  &lt;/service&gt;&lt;br /&gt;&lt;/definitions&gt;&lt;/pre&gt;Note on deployment to WLS you can see that the Wssp1.2-2007-Https.xml policy has been added to the binding to enforce One-Way SSL, and in addition the service address now runs from HTTPS, not HTTP, on the now enabled SSL port.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5) Test the running web service via JDeveloper&#039;s HTTP Analyzer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JDeveloper out of the box includes HTTP Analyzer for testing your web services.  It&#039;s particularly useful as you don&#039;t have to leave the confines of your IDE to test your web services.&lt;br /&gt;&lt;br /&gt;In order to run the HTTP Analyzer with SSL&#039;ed web service traffic, you need to make some changes to the configuration of JDeveloper.  Selecting the Tools-&gt;Preferences menu option, followed by Https and Truststore Settings, you can configure the Client and Server keystores HTTP Analyzer needs to run with SSL.&lt;br /&gt;&lt;br /&gt;If you followed my exact instructions on setting up a selfsigned CA into the WLS identity and trust keystores, you need to enter the following options in the Preferences Https and Trusting Settings page:&lt;br /&gt;&lt;br /&gt;Client Trusted Certificate Keystore: c:\temp\ServerTrust.jks&lt;br /&gt;Client Trusted Keystore Password: ServerTrustStorePass&lt;br /&gt;&lt;br /&gt;Server Keystore: c:\temp\ServerIdentity.jks&lt;br /&gt;Server Keystore Password: ServerCAKey&lt;br /&gt;Server Private Key Password: ServerCAKey&lt;br /&gt;&lt;br /&gt;When you run your web service you can access the HTTP Analyzer by clicking on the URL of your served web service in the JDev IDE log window, among other methods.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tds-LA1I/AAAAAAAAA0c/SHX8Xt6G2Fg/s1600-h/sslExamplePic6.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 135px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tds-LA1I/AAAAAAAAA0c/SHX8Xt6G2Fg/s400/sslExamplePic6.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368200006648660818&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This presents the following HTTP Analyzer screens:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdyoISaI/AAAAAAAAA0k/XZECMIMtqAo/s1600-h/sslExamplePic7.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 318px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdyoISaI/AAAAAAAAA0k/XZECMIMtqAo/s400/sslExamplePic7.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368200008166820258&quot; /&gt;&lt;/a&gt;&lt;br /&gt;In the top of the screen you&#039;ll see the HTTP Analyzer has formed a dummy request for you to send out based on the web service&#039;s WSDL.  In my example picture I&#039;ve filled out the part field and pressed Send Request, of which you can see the reply from the web service on the right hand side.&lt;br /&gt;&lt;br /&gt;At the bottom of the screen you can the individual request/responses that were generated in order to service the request.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;6) Test the running web service via SoapUI&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.soapui.org&quot;&gt;SoapUI&lt;/a&gt; is a popular web service testing tool.  I wanted to show how to configure it here to show similar results to the HTTP Analyzer.  The following steps were built with SoapUI v3.0.&lt;br /&gt;&lt;br /&gt;a) Create a new Project via File -&gt; New soapUI Project&lt;br /&gt;b) In the New SoapUI Project dialog, enter a custom project name, then your WSDL, leave the rest of the fields as default.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPyT8L9I/AAAAAAAAA0M/02PavQnXVWk/s1600-h/sslExamplePic3.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 199px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPyT8L9I/AAAAAAAAA0M/02PavQnXVWk/s400/sslExamplePic3.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199767563972562&quot; /&gt;&lt;/a&gt;&lt;br /&gt;c) In the Project list expand your new project to the last Request 1 node, and double click it.&lt;br /&gt;d) This will open the Request 1 window, showing on the left handside the outgoing request payload, where you can modify the inputElement XML element with your name.&lt;br /&gt;e) Pressing the green arrow executes the request against the webservice, you&#039;ll now hopefully see the SOAP response on the right handside of the window.&lt;br /&gt;f) Note at the bottom right of the right handside of the window you have the text SSL Info.  Clicking on this shows another sub-window with the SSL certificate information that was swapped with the WLS server to undertake the SSL communications.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdVNlc2I/AAAAAAAAA0U/mE_WmvxK4dY/s1600-h/sslExamplePic4.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 243px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdVNlc2I/AAAAAAAAA0U/mE_WmvxK4dY/s400/sslExamplePic4.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368200000270857058&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;7) Test the running web service via a JAX-WS client&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assuming under JDeveloper you know how to create a Java Proxy for the deployed web service, you&#039;ll end up with the following code:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;import clientexamples.SSLUtilities;&lt;br /&gt;&lt;br /&gt;import javax.xml.ws.WebServiceRef;&lt;br /&gt;&lt;br /&gt;public class OneWaySSLPortTypePortClient&lt;br /&gt;{&lt;br /&gt;  @WebServiceRef&lt;br /&gt;  private static OneWaySSLService oneWaySSLService;&lt;br /&gt;&lt;br /&gt;  public static void main(String [] args)&lt;br /&gt;  {&lt;br /&gt;    oneWaySSLService = new OneWaySSLService();&lt;br /&gt;    OneWaySSLPortType oneWaySSLPortType = oneWaySSLService.getOneWaySSLPortTypePort();&lt;br /&gt;&lt;br /&gt;    SSLUtilities.trustAllHttpsCertificates(); &lt;br /&gt;&lt;br /&gt;    System.out.println(oneWaySSLPortType.oneWaySSLOperation(&quot;Chris&quot;));&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;Note SSLUtilities is a handy class written by &lt;a href=&quot;http://schrepfler.blogspot.com/2009/06/relaxing-ssl-validation-for-jaxws.html&quot;&gt;Srgjan Srepfler&lt;/a&gt; that includes a number of methods for handling and modifying the default SSL behaviour.  In our case in writing a simple test client we&#039;re not overly concerned about trusting the server&#039;s CA, so we can use SSUtilities.trustAllHttpsCertificates to stop the required checking.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;8) Inspect the web service packets on the wire to verify the traffic is indeed encrypted&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What neither JDeveloper&#039;s HTTP Analyzer nor SoapUI can do is actually confirm for you that the traffic on the network was actually encrypted. To check this we can use a wire sniffing tool called &lt;a href=&quot;http://www.wireshark.org/&quot;&gt;WireShark&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Warning: at some sites using wire sniffing tools like WireShark can be a dismissible offence because you can see private data on the network.  Be careful to check your organisation policies before doing this.&lt;br /&gt;&lt;br /&gt;Note if you&#039;re running the JAX-WS web services via the integrated WLS on the same localhost as SoapUI, you&#039;re most likely running through the localhost address.  For various technical reasons WireShark cannot sniff packets through localhost or the MS loopback adapter in Windows.  Instead we must separate our WLS and SoapUI installations, and place them on different hosts.  Let&#039;s call them Box1 and Box2, with WLS and SoapUI installed respectively&lt;br /&gt;&lt;br /&gt;Once you have both up and running, determine the IP address of Box2.  Let&#039;s say that IP address was: 101.102.103.104&lt;br /&gt;&lt;br /&gt;a) Start WireShark.  In the filter box top left enter: ip.addr == 101.102.103.104&lt;br /&gt;b) Select the filter Apply button.&lt;br /&gt;c) Select the Capture -&gt; Interfaces&lt;br /&gt;d) Select the Start button for your ethernet card&lt;br /&gt;e) WireShark is now sitting listening for traffic from the other ip.address of Box2.&lt;br /&gt;&lt;br /&gt;f) Now in SoapUI execute the request.&lt;br /&gt;g)In WireShark you should see the incoming requests:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOGA54oI/AAAAAAAAAzs/1IjFetqMjdo/s1600-h/sslExample5.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 248px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOGA54oI/AAAAAAAAAzs/1IjFetqMjdo/s400/sslExample5.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199738493100674&quot; /&gt;&lt;/a&gt;&lt;br /&gt;As WireShark works at the network level it sees the individual packets, several of which will comprise the request/response between SoapUI and WLS, effectively an incredible amount of detail.  You can select each packet and look at the data contained within in the bottom window of the display.  This window shows the data in both hex and raw text, so you&#039;ll need to carefully look to see the data contained within.  Obviously if the traffic is encrypted you wont see much meaning at all which is what we want! To see the unencrypted traffic, remove the policy from your web service, redeploy it and run the same scenario again.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Thanks&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I must aim my very strong thanks to Gerard Davison from Oracle UK with assistance with this article, Gerard&#039;s help has been invaluable.  Any mistakes in this post are of course mine however, of which I&#039;m sure there will be a few in such a long post.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-5229552844110935684?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/O59z4Eqp0Uw&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://java.sys-con.com/node/1075471&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 02 Sep 2009 11:00:00 EDT</pubDate>
 <guid isPermaLink="true">http://java.sys-con.com/node/1075471</guid>
</item>
<item>
 <title>RichFaces Region</title>
 <link>http://java.sys-con.com/node/1041893</link>
 <description>The a4j:region tag in RichFaces is probably one of the most misunderstood tags, but it provides one of the most important features in RichFaces. With it, server-side processing can be limited to only certain designated components. 
One reason for misunderstanding could be the tag name. Many believe that the region tag limits what is rendered [...]&lt;p&gt;&lt;a href=&quot;http://java.sys-con.com/node/1041893&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 20 Jul 2009 22:30:00 EDT</pubDate>
 <guid isPermaLink="true">http://java.sys-con.com/node/1041893</guid>
</item>
<item>
 <title>Using Spring as an Object Container</title>
 <link>http://java.sys-con.com/node/672769</link>
 <description>When you work with open source ESBs, you can use other tools and frameworks to help you solve common problems. Spring is one of the tools that extends the basic functionality of the ESBs Mule and ServiceMix and makes solving integration problems a lot easier. Spring is a component framework that makes it easy to work with Plain Old Java Objects (POJOs).&lt;p&gt;&lt;a href=&quot;http://java.sys-con.com/node/672769&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 11 Sep 2008 15:15:00 EDT</pubDate>
 <guid isPermaLink="true">http://java.sys-con.com/node/672769</guid>
</item>
<item>
 <title>Polyglot Programmers Minus SQL</title>
 <link>http://java.sys-con.com/node/593522</link>
 <description>In the mid nineties, IT job market was good. PowerBuilder or Visual Basic plus SQL would get you employed in no time. Good old client/server days. Two programming languages was all you need.  When multi-tier architecture became hot and J2EE came into picture, all of a sudden you&#039;d have to learn a lot more languages and technologies, for example, Java, SQL, HTML, JavaScript, XML, JSP, EJB, JMS etc. Surprisingly,the young generation doesn&#039;t mind being polyglot programmers as long as the set does not include SQL.  The popularity of this language is comparable with the popularity of Latin and Esperanto in the real world. Why?&lt;p&gt;&lt;a href=&quot;http://java.sys-con.com/node/593522&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 18 Jun 2008 19:30:00 EDT</pubDate>
 <guid isPermaLink="true">http://java.sys-con.com/node/593522</guid>
</item>
<item>
 <title>Debugging Both Flex and Tomcat Java Programs in Eclipse</title>
 <link>http://java.sys-con.com/node/458994</link>
 <description>If you use Adobe Flex Web applications that connect to Plain Old Java Objects on the server side, chances are you use a popular, robust, and freely available server called Apache Tomcat. If you use Eclipse-based Flex Builder, you can smoothly debug both Flex and Java code without leaving Eclipse. Flex Builder debugger does not need any special configuration. But we need to add a couple of parameters to the startup routine of Tomcat so it&#039;ll engage the Java Platform Debugger Architecture (JPDA), which will allow other applications attach to JVM that runs Tomcat and debug deployed Java classes remotely.&lt;p&gt;&lt;a href=&quot;http://java.sys-con.com/node/458994&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 14 Nov 2007 08:15:00 EST</pubDate>
 <guid isPermaLink="true">http://java.sys-con.com/node/458994</guid>
</item>
<item>
 <title>An Exclusive Interview With Creator Of MyEclipse IDE</title>
 <link>http://java.sys-con.com/node/292549</link>
 <description>Recently I had a chance to chat with Maher Masri, the CEO of Genuitec, the company that offers the Eclipse-based Java IDE called MyEclipse. My goal was to find out why would I want to purchase this IDE if free Eclipse fits the bill for most of the developers.&lt;p&gt;&lt;a href=&quot;http://java.sys-con.com/node/292549&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 30 Oct 2006 17:30:00 EST</pubDate>
 <guid isPermaLink="true">http://java.sys-con.com/node/292549</guid>
</item>
<item>
 <title>The Promise of Handling Complex Page Navigations in Any Web Application</title>
 <link>http://java.sys-con.com/node/131756</link>
 <description>Page navigation requirements become more demanding as Web applications get bigger and more complex. Hard-coded page flow rules make applications less resilient to changes. In this scenario, reusing business logic is one aspect and reusing page flow becomes another aspect. Especially in situations that demand a wizard-kind behavior, it&#039;s essential to capture application page flow logic in a declarative fashion.&lt;p&gt;&lt;a href=&quot;http://java.sys-con.com/node/131756&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 04 Dec 2005 03:15:00 EST</pubDate>
 <guid isPermaLink="true">http://java.sys-con.com/node/131756</guid>
</item>
<item>
 <title>Uday Kumar&#039;s Java Blog – Getting Hibernate 3.x Up and Running with Tomcat</title>
 <link>http://java.sys-con.com/node/152657</link>
 <description>I was reviewing the Hibernate tutorial at &lt;a href=&quot;http://www.hibernate.org/hib_docs/v3/reference/en/html/quickstart.html&quot; title=&quot;http://www.hibernate.org/hib_docs/v3/reference/en/html/quickstart.html&quot;&gt;http://www.hibernate.org/hib_docs/v3/reference/en/html/quickstart.html&lt;/a&gt; and am publishing a few minor changes which might help the new initiative to get up and running quickly. This link refers to getting Hibernate 3.x up and running with Tomcat 4.1. I ran it with Tomcat 5.5.2.&lt;p&gt;&lt;a href=&quot;http://java.sys-con.com/node/152657&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 13 Nov 2005 03:00:00 EST</pubDate>
 <guid isPermaLink="true">http://java.sys-con.com/node/152657</guid>
</item>
</channel>
</rss>
