chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r785882 - /websites/staging/chemistry/trunk/content/java/opencmis-server-framework.html
Date Mon, 21 Feb 2011 15:44:22 GMT
Author: buildbot
Date: Mon Feb 21 15:44:22 2011
New Revision: 785882

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/java/opencmis-server-framework.html

Modified: websites/staging/chemistry/trunk/content/java/opencmis-server-framework.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/opencmis-server-framework.html (original)
+++ websites/staging/chemistry/trunk/content/java/opencmis-server-framework.html Mon Feb 21
15:44:22 2011
@@ -269,29 +269,29 @@ in <code>/WEB-INF/web.xml</code>.</p>
 <p>For the Web Services binding a new <code>SOAPHandler</code> class has
to be created
 and registered in <code>/WEB-INF/sun-jaxws.xml</code>.</p>
 <p>The <code>handleMessage</code> method should look like this:</p>
-<div class="codehilite"><pre><span class="n">public</span> <span
class="n">boolean</span> <span class="n">handleMessage</span><span
class="p">(</span><span class="n">SOAPMessageContext</span> <span
class="n">context</span><span class="p">)</span> <span class="p">{</span>
-  <span class="n">Boolean</span> <span class="n">outboundProperty</span>
<span class="o">=</span> <span class="p">(</span><span class="n">Boolean</span><span
class="p">)</span>
-        <span class="n">context</span><span class="o">.</span><span
class="n">get</span><span class="p">(</span><span class="n">MessageContext</span><span
class="o">.</span><span class="n">MESSAGE_OUTBOUND_PROPERTY</span><span
class="p">);</span>
-  <span class="k">if</span> <span class="p">(</span><span class="n">outboundProperty</span><span
class="o">.</span><span class="n">booleanValue</span><span class="p">())</span>
<span class="p">{</span>
-    <span class="sr">//</span> <span class="n">we</span> <span
class="n">are</span> <span class="n">only</span> <span class="n">looking</span>
<span class="n">at</span> <span class="n">inbound</span> <span
class="n">messages</span>
-    <span class="k">return</span> <span class="n">true</span><span
class="p">;</span>
-  <span class="p">}</span>
+<div class="codehilite"><pre><span class="kd">public</span> <span
class="kt">boolean</span> <span class="nf">handleMessage</span><span
class="o">(</span><span class="n">SOAPMessageContext</span> <span
class="n">context</span><span class="o">)</span> <span class="o">{</span>
+  <span class="n">Boolean</span> <span class="n">outboundProperty</span>
<span class="o">=</span> <span class="o">(</span><span class="n">Boolean</span><span
class="o">)</span>
+        <span class="n">context</span><span class="o">.</span><span
class="na">get</span><span class="o">(</span><span class="n">MessageContext</span><span
class="o">.</span><span class="na">MESSAGE_OUTBOUND_PROPERTY</span><span
class="o">);</span>
+  <span class="k">if</span> <span class="o">(</span><span class="n">outboundProperty</span><span
class="o">.</span><span class="na">booleanValue</span><span class="o">())</span>
<span class="o">{</span>
+    <span class="c1">// we are only looking at inbound messages</span>
+    <span class="k">return</span> <span class="kc">true</span><span
class="o">;</span>
+  <span class="o">}</span>
 
-  <span class="sr">//</span> <span class="k">do</span> <span class="n">whatever</span>
<span class="n">you</span> <span class="n">have</span> <span class="n">to</span>
<span class="k">do</span> <span class="n">here</span>
+  <span class="c1">// do whatever you have to do here</span>
   <span class="n">String</span> <span class="n">user</span> <span
class="o">=</span> <span class="o">...</span>
   <span class="n">String</span> <span class="n">secret</span> <span
class="o">=</span> <span class="o">...</span>
 
-  <span class="sr">//</span> <span class="n">set</span> <span
class="n">up</span> <span class="n">key</span><span class="o">-</span><span
class="n">value</span> <span class="n">pairs</span> <span class="k">for</span>
<span class="n">the</span> <span class="n">CallContext</span>
-  <span class="n">Map</span><span class="o">&lt;</span><span
class="n">String</span><span class="p">,</span> <span class="n">String</span><span
class="o">&gt;</span> <span class="n">callContextMap</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span
class="o">&lt;</span><span class="n">String</span><span class="p">,</span>
<span class="n">String</span><span class="o">&gt;</span><span
class="p">();</span>
-  <span class="n">callContextMap</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;org.example.opencmis.user&quot;</span><span
class="p">,</span> <span class="n">user</span><span class="p">);</span>
-  <span class="n">callContextMap</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="s">&quot;org.example.opencmis.secret&quot;</span><span
class="p">,</span> <span class="n">secret</span><span class="p">);</span>
-
-  <span class="sr">//</span> <span class="n">add</span> <span
class="n">key</span><span class="o">-</span><span class="n">value</span>
<span class="n">pairs</span> <span class="n">the</span> <span class="n">SOAP</span>
<span class="n">message</span> <span class="n">context</span>
-  <span class="n">context</span><span class="o">.</span><span
class="n">put</span><span class="p">(</span><span class="n">AbstractService</span><span
class="o">.</span><span class="n">CALL_CONTEXT_MAP</span><span class="p">,</span>
<span class="n">callContextMap</span><span class="p">);</span>
-  <span class="n">context</span><span class="o">.</span><span
class="n">setScope</span><span class="p">(</span><span class="n">AbstractService</span><span
class="o">.</span><span class="n">CALL_CONTEXT_MAP</span><span class="p">,</span>
<span class="n">Scope</span><span class="o">.</span><span class="n">APPLICATION</span><span
class="p">);</span>
+  <span class="c1">// set up key-value pairs for the CallContext</span>
+  <span class="n">Map</span><span class="o">&lt;</span><span
class="n">String</span><span class="o">,</span> <span class="n">String</span><span
class="o">&gt;</span> <span class="n">callContextMap</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span
class="o">&lt;</span><span class="n">String</span><span class="o">,</span>
<span class="n">String</span><span class="o">&gt;();</span>
+  <span class="n">callContextMap</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="s">&quot;org.example.opencmis.user&quot;</span><span
class="o">,</span> <span class="n">user</span><span class="o">);</span>
+  <span class="n">callContextMap</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="s">&quot;org.example.opencmis.secret&quot;</span><span
class="o">,</span> <span class="n">secret</span><span class="o">);</span>
+
+  <span class="c1">// add key-value pairs the SOAP message context</span>
+  <span class="n">context</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">AbstractService</span><span
class="o">.</span><span class="na">CALL_CONTEXT_MAP</span><span class="o">,</span>
<span class="n">callContextMap</span><span class="o">);</span>
+  <span class="n">context</span><span class="o">.</span><span
class="na">setScope</span><span class="o">(</span><span class="n">AbstractService</span><span
class="o">.</span><span class="na">CALL_CONTEXT_MAP</span><span class="o">,</span>
<span class="n">Scope</span><span class="o">.</span><span class="na">APPLICATION</span><span
class="o">);</span>
 
-  <span class="k">return</span> <span class="n">true</span><span
class="p">;</span>
-<span class="p">}</span>
+  <span class="k">return</span> <span class="kc">true</span><span
class="o">;</span>
+<span class="o">}</span>
 </pre></div>
 
 



Mime
View raw message