You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by st...@apache.org on 2004/11/15 20:49:51 UTC
svn commit: rev 71509 - in incubator/beehive/site: build/site/wsm src/documentation/content/xdocs/wsm
Author: steveh
Date: Mon Nov 15 11:49:50 2004
New Revision: 71509
Modified:
incubator/beehive/site/build/site/wsm/tutorial_wsm.html
incubator/beehive/site/src/documentation/content/xdocs/wsm/tutorial_wsm.xml
Log:
Fix for BEEHIVE-48: pageflow tutorial-"Code to add appears in red" not in red
With this checkin, all tutorials have bold text to indicate which lines of code are to added/editted.
Modified: incubator/beehive/site/build/site/wsm/tutorial_wsm.html
==============================================================================
--- incubator/beehive/site/build/site/wsm/tutorial_wsm.html (original)
+++ incubator/beehive/site/build/site/wsm/tutorial_wsm.html Mon Nov 15 11:49:50 2004
@@ -357,7 +357,7 @@
<a href="#Step+4%3A+Add+a+Non-Web+Invokable+Method">Step 4: Add a Non-Web Invokable Method</a>
<ul class="minitoc">
<li>
-<a href="#Compile+and+Redeploy+the+Web+Service-N101EF">Compile and Redeploy the Web Service</a>
+<a href="#Compile+and+Redeploy+the+Web+Service-N101F8">Compile and Redeploy the Web Service</a>
</li>
<li>
<a href="#To+Test+the+Non-Web+Invokable+Method">To Test the Non-Web Invokable Method</a>
@@ -557,12 +557,12 @@
<h4>Edit the JWS File</h4>
<div style="margin-left: 0 ; border: 2px">
<p></p>
-<p>Edit the file <span class="codefrag">C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</span> so it appears as follows.</p>
+<p>Edit the file <span class="codefrag">C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</span> so it appears as follows. Code to add appears in bold type.</p>
<pre class="code">package template;
...
import javax.jws.WebMethod;
import javax.jws.WebService;
-import javax.jws.WebParam;
+<strong>import javax.jws.WebParam;</strong>
@WebService
public class Blank
@@ -573,27 +573,25 @@
return "Hello world!";
}
- @WebMethod
+ <strong>@WebMethod
public String sayHello( @WebParam String greetee )
{
-
if( greetee.equals("") )
{ greetee = "World"; }
return "Hello, " + greetee + "!";
-
- }
+ }</strong>
}</pre>
<p>The <span class="codefrag">@WebParam</span> you just added lets you pass a String parameter to the method over the web.</p>
</div>
-<a name="N101BC"></a><a name="Compile+and+Redeploy+the+Web+Service"></a>
+<a name="N101C2"></a><a name="Compile+and+Redeploy+the+Web+Service"></a>
<h4>Compile and Redeploy the Web Service</h4>
<div style="margin-left: 0 ; border: 2px">
<p>At the command prompt, enter the following Ant command:</p>
<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml -Dwebapp.dir=C:\beehive_projects\ws_tutorial -Dcontext.path=ws_tutorial build.webapp redeploy</pre>
<p>This Ant command compiles the app, undeploys it, and then deploys it. Calling <span class="codefrag">ant ... redeploy</span> is equivalent to calling <span class="codefrag">ant ... undeploy deploy</span>.</p>
</div>
-<a name="N101D4"></a><a name="Test+the+Parameterized+Method"></a>
+<a name="N101DA"></a><a name="Test+the+Parameterized+Method"></a>
<h4>Test the Parameterized Method</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Enter the following URL in the address bar of your browser. </p>
@@ -610,10 +608,10 @@
</div>
</div>
-<a name="N101EA"></a><a name="Step+4%3A+Add+a+Non-Web+Invokable+Method"></a>
+<a name="N101F0"></a><a name="Step+4%3A+Add+a+Non-Web+Invokable+Method"></a>
<h3>Step 4: Add a Non-Web Invokable Method</h3>
<div style="margin-left: 0 ; border: 2px">
-<p>Edit the file <span class="codefrag">C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</span> so it appears as follows.</p>
+<p>Edit the file <span class="codefrag">C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</span> so it appears as follows. Code to add appears in bold type.</p>
<pre class="code">package template;
...
import javax.jws.WebMethod;
@@ -632,29 +630,27 @@
@WebMethod
public String sayHello( @WebParam(name="greetee") String greetee )
{
-
- if( greetee.equals("") )
+ if( greetee.equals("") )
{ greetee = "World"; }
-
- return "Hello, " + greetee + "!";
-
- }
- public String sayNothingOverTheWeb()
+ return "Hello, " + greetee + "!";
+ }
+
+ <strong>public String sayNothingOverTheWeb()
{
return "Not for for Web consumption!";
- }
+ }</strong>
}
</pre>
<p>Note that the method added, sayNothingOverTheWeb(), does not have the annotation @WebMethod, indicating that it cannot be invoked by SOAP messages over the web.</p>
-<a name="N101FE"></a><a name="Compile+and+Redeploy+the+Web+Service-N101EF"></a>
+<a name="N10207"></a><a name="Compile+and+Redeploy+the+Web+Service-N101F8"></a>
<h4>Compile and Redeploy the Web Service</h4>
<div style="margin-left: 0 ; border: 2px">
<p>At the command prompt, enter the following Ant command:</p>
<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml -Dwebapp.dir=C:\beehive_projects\ws_tutorial -Dcontext.path=ws_tutorial build.webapp redeploy</pre>
<p>This Ant command compiles the app, undeploys it, and then deploys it. Calling <span class="codefrag">ant ... redeploy</span> is equivalent to calling <span class="codefrag">ant ... undeploy deploy</span>.</p>
</div>
-<a name="N10216"></a><a name="To+Test+the+Non-Web+Invokable+Method"></a>
+<a name="N1021F"></a><a name="To+Test+the+Non-Web+Invokable+Method"></a>
<h4>To Test the Non-Web Invokable Method</h4>
<div style="margin-left: 0 ; border: 2px">
<p>Enter the following URL in the address bar of your browser. </p>
@@ -672,20 +668,20 @@
</soapenv:Body>
</soapenv:Envelope> </pre>
</div>
-<a name="N1022B"></a><a name="Step+5%3A+Change+the+SOAP+Style"></a>
+<a name="N10234"></a><a name="Step+5%3A+Change+the+SOAP+Style"></a>
<h4>Step 5: Change the SOAP Style</h4>
<div style="margin-left: 0 ; border: 2px">
<p>The default SOAP style for JSR-181 web services is DOC-literal. In this step you will change the style to RPC-encoded.</p>
-<p>Edit the file <span class="codefrag">C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</span> so it appears as follows.</p>
+<p>Edit the file <span class="codefrag">C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</span> so it appears as follows. Code to add appears in bold type.</p>
<pre class="code">package template;
...
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.WebParam;
-import javax.jws.soap.SOAPBinding;
+<strong>import javax.jws.soap.SOAPBinding;</strong>
@WebService
-@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.ENCODED)
+<strong>@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.ENCODED)</strong>
public class Blank
{
@WebMethod
@@ -696,13 +692,11 @@
@WebMethod
public String sayHello( @WebParam(name="greetee") String greetee )
- {
-
+ {
if( greetee.equals("") )
{ greetee = "World"; }
return "Hello, " + greetee + "!";
-
}
public String sayNothingOverTheWeb()
@@ -710,13 +704,13 @@
return "Not for for Web consumption!";
}
}</pre>
-<a name="N1023F"></a><a name="Compile+and+Redeploy+the+Web+Service-N1022D"></a>
+<a name="N1024E"></a><a name="Compile+and+Redeploy+the+Web+Service-N1023C"></a>
<h5>Compile and Redeploy the Web Service</h5>
<div style="margin-left: 0 ; border: 2px">
<p>At the command prompt, enter the following Ant command:</p>
<pre class="code">ant -f %BEEHIVE_HOME%\ant\buildWebapp.xml -Dwebapp.dir=C:\beehive_projects\ws_tutorial -Dcontext.path=ws_tutorial build.webapp redeploy</pre>
</div>
-<a name="N1024E"></a><a name="To+Test+the+Non-Web+Invokable+Method-N1023B"></a>
+<a name="N1025D"></a><a name="To+Test+the+Non-Web+Invokable+Method-N1024A"></a>
<h5>To Test the Non-Web Invokable Method</h5>
<div style="margin-left: 0 ; border: 2px">
<p>Enter the following URL in the address bar of your browser. </p>
Modified: incubator/beehive/site/src/documentation/content/xdocs/wsm/tutorial_wsm.xml
==============================================================================
--- incubator/beehive/site/src/documentation/content/xdocs/wsm/tutorial_wsm.xml (original)
+++ incubator/beehive/site/src/documentation/content/xdocs/wsm/tutorial_wsm.xml Mon Nov 15 11:49:50 2004
@@ -168,12 +168,12 @@
<section>
<title>Edit the JWS File</title>
<p/>
- <p>Edit the file <code>C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</code> so it appears as follows.</p>
- <source><![CDATA[package template;
+ <p>Edit the file <code>C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</code> so it appears as follows. Code to add appears in bold type.</p>
+ <source>package template;
...
import javax.jws.WebMethod;
import javax.jws.WebService;
-import javax.jws.WebParam;
+<strong>import javax.jws.WebParam;</strong>
@WebService
public class Blank
@@ -184,17 +184,15 @@
return "Hello world!";
}
- @WebMethod
+ <strong>@WebMethod
public String sayHello( @WebParam String greetee )
{
-
if( greetee.equals("") )
{ greetee = "World"; }
return "Hello, " + greetee + "!";
-
- }
-}]]></source>
+ }</strong>
+}</source>
<p>The <code>@WebParam</code> you just added lets you pass a String parameter to the method over the web.</p>
</section>
<section>
@@ -220,8 +218,8 @@
</section>
<section>
<title>Step 4: Add a Non-Web Invokable Method</title>
- <p>Edit the file <code>C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</code> so it appears as follows.</p>
- <source><![CDATA[package template;
+ <p>Edit the file <code>C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</code> so it appears as follows. Code to add appears in bold type.</p>
+ <source>package template;
...
import javax.jws.WebMethod;
import javax.jws.WebService;
@@ -239,20 +237,18 @@
@WebMethod
public String sayHello( @WebParam(name="greetee") String greetee )
{
-
- if( greetee.equals("") )
+ if( greetee.equals("") )
{ greetee = "World"; }
-
- return "Hello, " + greetee + "!";
-
- }
- public String sayNothingOverTheWeb()
+ return "Hello, " + greetee + "!";
+ }
+
+ <strong>public String sayNothingOverTheWeb()
{
return "Not for for Web consumption!";
- }
+ }</strong>
}
-]]></source>
+</source>
<p>Note that the method added, sayNothingOverTheWeb(), does not have the annotation @WebMethod, indicating that it cannot be invoked by SOAP messages over the web.</p>
<section>
<title>Compile and Redeploy the Web Service</title>
@@ -280,16 +276,16 @@
<section>
<title>Step 5: Change the SOAP Style</title>
<p>The default SOAP style for JSR-181 web services is DOC-literal. In this step you will change the style to RPC-encoded.</p>
- <p>Edit the file <code>C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</code> so it appears as follows.</p>
- <source><![CDATA[package template;
+ <p>Edit the file <code>C:/beehive_projects/ws_tutorial/WEB-INF/src/template/Blank.jws</code> so it appears as follows. Code to add appears in bold type.</p>
+ <source>package template;
...
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.WebParam;
-import javax.jws.soap.SOAPBinding;
+<strong>import javax.jws.soap.SOAPBinding;</strong>
@WebService
-@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.ENCODED)
+<strong>@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.ENCODED)</strong>
public class Blank
{
@WebMethod
@@ -300,20 +296,18 @@
@WebMethod
public String sayHello( @WebParam(name="greetee") String greetee )
- {
-
+ {
if( greetee.equals("") )
{ greetee = "World"; }
return "Hello, " + greetee + "!";
-
}
public String sayNothingOverTheWeb()
{
return "Not for for Web consumption!";
}
-}]]></source>
+}</source>
<section>
<title>Compile and Redeploy the Web Service</title>
<p>At the command prompt, enter the following Ant command:</p>