<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Saving token for RestEasy web service
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/sej">Steve Jagels</a> in <i>JBoss Web Services</i> - <a href="https://community.jboss.org/message/741035#741035">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Awhile back I created a jboss jax-ws web service and for security I had it save a token to the session.&#160; It has worked fine.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Now I have a Rest Easy web service and I need it to also save a token to the web service session. I have looked at doing it two ways, but neither one is working.&#160; The first way uses @Resource and the session gets a null pointer exception.&#160; The second way uses @Context and the session is not null, but any attribute saved to it (token) is null.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>First way</strong> (same as is working for the jboss jax-ws web service):</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@Resource</span> <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">private</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> <span style="background: silver;">WebServiceContext</span> </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000c0;">ctx</span>;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;"><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">public</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> String <span style="background: silver;">saveTokenToSession</span>(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@QueryParam</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"consumerName"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) String consumerName, </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@QueryParam</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"token"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) String token){</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; HttpSession session = getTheSession();</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">if</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> (session == </span><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">null</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) {</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">throw</strong> <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">new</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> WebServiceException(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"Error: could not get session for web service."</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">);</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">if</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> (!<em>checkLogin</em>(token)) {</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160; System.</span><em style="color: #0000c0; font-size: 10.0pt; font-family: 'Courier New';">out</em><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">.println(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"Saving token to session - invalid token."</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">);</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">return</strong> <span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"N"</span>;</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; session.setAttribute(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"token"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">, token);</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160; </p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">return</strong> <span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"Y"</span>;</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;"><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">private</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> HttpSession getTheSession() {</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; javax.xml.ws.handler.MessageContext mc = </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000c0;">ctx</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">.getMessageContext();&#160; </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #76923c;">//null pointer exception occurs here</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; HttpServletRequest request = (javax.servlet.http.HttpServletRequest) mc.get(javax.xml.ws.handler.MessageContext.</span><em style="color: #0000c0; font-size: 10.0pt; font-family: 'Courier New';">SERVLET_REQUEST</em><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">);</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; HttpSession session = request.getSession();</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">return</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> session;</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Second way</strong>:</p><p style="margin-bottom: 0.0001pt;"><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">public</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> String <span style="background: silver;">saveTokenToSession</span>(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@QueryParam</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"consumerName"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) String consumerName, </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@QueryParam</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"token"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) String token, </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@Context</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> HttpServletRequest inRequest){</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; HttpSession session = inRequest.getSession();</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">if</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> (session == </span><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">null</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) {&#160; </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #76923c;">//session is not null</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">throw</strong> <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">new</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> WebServiceException(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"Error: could not get session for web service."</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">);</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">if</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> (!<em>checkLogin</em>(token)) {</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160; System.</span><em style="color: #0000c0; font-size: 10.0pt; font-family: 'Courier New';">out</em><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">.println(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"Saving token to session - invalid token."</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">);</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">return</strong> <span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"N"</span>;</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160; session.setAttribute(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"token"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">, token);</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">return</strong> <span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"Y"</span>;</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;"><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">public</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> String getPermissions(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@QueryParam</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"consumerName"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) String consumerName, </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@QueryParam</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"strPermission"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) String strPermission, </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #646464;">@Context</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> HttpServletRequest inRequest) {</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160; List&lt;Permission&gt; toBeReturned = </span><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">null</strong>;</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160; Permission permissionInput = </span><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">null</strong>;</p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">try</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> {</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; String token;</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; HttpSession session = inRequest.getSession();<br/></span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">if</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> (session == </span><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">null</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">) {&#160; </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #76923c;">//session is not null</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">throw</strong> <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">new</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> WebServiceException(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"Error: could not get session for web service."</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">);</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; token = (String) session.getAttribute(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">"token"</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">);&#160; </span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #76923c;">//null</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">if</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> (</span><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">null</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> == token || token.equals(</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">""</span><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">)){</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">return</strong> <span style="font-size: 10.0pt; font-family: 'Courier New'; color: #2a00ff;">""</span>;</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ...<br/></span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ...<br/></span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">return</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"> permissions;</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160; }</span><strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">catch</strong><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">(Exception e){</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; e.printStackTrace();</span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">return</strong> <strong style="color: #7f0055; font-size: 10.0pt; font-family: 'Courier New';">null</strong>;</p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 10.0pt; font-family: 'Courier New'; color: black;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any idea why either of these does not work?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'm using jboss 5.1.2 and jdk 1.6.0.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/741035#741035">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>