cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r843240 - in /websites/production/cxf/content: cache/docs.pageCache docs/webservicecontext.html
Date Thu, 20 Dec 2012 13:48:00 GMT
Author: buildbot
Date: Thu Dec 20 13:48:00 2012
New Revision: 843240

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/webservicecontext.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/webservicecontext.html
==============================================================================
--- websites/production/cxf/content/docs/webservicecontext.html (original)
+++ websites/production/cxf/content/docs/webservicecontext.html Thu Dec 20 13:48:00 2012
@@ -127,32 +127,32 @@ Apache CXF -- WebserviceContext
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <pre class="code-java">
 <span class="code-keyword">public</span> class CustomerServiceImpl <span class="code-keyword">implements</span>
CustomerService {
-@Resource
-WebServiceContext wsContext;
+  @Resource
+  WebServiceContext wsContext;
 
-<span class="code-keyword">public</span> List&lt;Customer&gt; getCustomersByName(<span
class="code-object">String</span> name) <span class="code-keyword">throws</span>
NoSuchCustomerException {
-  Principal pr = wsContext.getUserPrincipal();
+  <span class="code-keyword">public</span> List&lt;Customer&gt; getCustomersByName(<span
class="code-object">String</span> name) <span class="code-keyword">throws</span>
NoSuchCustomerException {
+    Principal pr = wsContext.getUserPrincipal();
 
-  <span class="code-comment">// Only joe may access <span class="code-keyword">this</span>
service operation
-</span>  <span class="code-keyword">if</span> (pr == <span class="code-keyword">null</span>
|| !<span class="code-quote">"joe"</span>.equals(pr.getName())) {
-    <span class="code-keyword">throw</span> <span class="code-keyword">new</span>
RuntimeException(<span class="code-quote">"Access denied"</span>);
+    <span class="code-comment">// Only joe may access <span class="code-keyword">this</span>
service operation
+</span>    <span class="code-keyword">if</span> (pr == <span class="code-keyword">null</span>
|| !<span class="code-quote">"joe"</span>.equals(pr.getName())) {
+      <span class="code-keyword">throw</span> <span class="code-keyword">new</span>
RuntimeException(<span class="code-quote">"Access denied"</span>);
+    }
+
+    <span class="code-comment">// Only the sales role may access <span class="code-keyword">this</span>
operation
+</span>&#160;   <span class="code-keyword">if</span> (!wsContext.isUserInRole(<span
class="code-quote">"sales"</span>)) {
+      <span class="code-keyword">throw</span> <span class="code-keyword">new</span>
RuntimeException(<span class="code-quote">"Access denied"</span>);
+    }
+
+    MessageContext mContext = wsContext.getMessageContext();
+
+    <span class="code-comment">// See which contents the message context has
+</span>    Set&lt;<span class="code-object">String</span>&gt; s
= mContext.keySet();
+
+    <span class="code-comment">// Using <span class="code-keyword">this</span>
cxf specific code you can access the CXF Message and Exchange objects
+</span>    WrappedMessageContext wmc = (WrappedMessageContext)mContext;
+    Message m = wmc.getWrappedMessage();
+    Exchange ex = m.getExchange();
   }
-
-  <span class="code-comment">// Only the sales role may access <span class="code-keyword">this</span>
operation
-</span>&#160; <span class="code-keyword">if</span> (!wsContext.isUserInRole(<span
class="code-quote">"sales"</span>)) {
-    <span class="code-keyword">throw</span> <span class="code-keyword">new</span>
RuntimeException(<span class="code-quote">"Access denied"</span>);
-  }
-
-  MessageContext mContext = wsContext.getMessageContext();
-
-  <span class="code-comment">// See which contents the message context has
-</span>  Set&lt;<span class="code-object">String</span>&gt; s =
mContext.keySet();
-
-  <span class="code-comment">// Using <span class="code-keyword">this</span>
cxf specific code you can access the CXF Message and Exchange objects
-</span>  WrappedMessageContext wmc = (WrappedMessageContext)mContext;
-  Message m = wmc.getWrappedMessage();
-  Exchange ex = m.getExchange();
-}
 }
 </pre>
 </div></div></div>



Mime
View raw message