You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2010/11/05 22:18:07 UTC
svn commit: r1031799 - in /axis/axis2/java/core/trunk/src/site:
resources/css/ xdoc/ xdoc/docs/
Author: veithen
Date: Fri Nov 5 21:18:06 2010
New Revision: 1031799
URL: http://svn.apache.org/viewvc?rev=1031799&view=rev
Log:
Some layout improvements.
Modified:
axis/axis2/java/core/trunk/src/site/resources/css/site.css
axis/axis2/java/core/trunk/src/site/xdoc/docs/adv-userguide.xml
axis/axis2/java/core/trunk/src/site/xdoc/docs/axis2config.xml
axis/axis2/java/core/trunk/src/site/xdoc/docs/dii.xml
axis/axis2/java/core/trunk/src/site/xdoc/docs/http-transport.xml
axis/axis2/java/core/trunk/src/site/xdoc/docs/mtom-guide.xml
axis/axis2/java/core/trunk/src/site/xdoc/docs/rest-ws.xml
axis/axis2/java/core/trunk/src/site/xdoc/docs/soapmonitor-module.xml.vm
axis/axis2/java/core/trunk/src/site/xdoc/docs/spring.xml
axis/axis2/java/core/trunk/src/site/xdoc/docs/transport_howto.xml
axis/axis2/java/core/trunk/src/site/xdoc/index.xml
Modified: axis/axis2/java/core/trunk/src/site/resources/css/site.css
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/resources/css/site.css?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/resources/css/site.css (original)
+++ axis/axis2/java/core/trunk/src/site/resources/css/site.css Fri Nov 5 21:18:06 2010
@@ -50,11 +50,13 @@
font-style: italic
}
+/*
.code {
font-family: Courier New;
font-size: 10pt;
color: #800000
}
+*/
/*
-----------------------------------------------------------------------
@@ -78,10 +80,17 @@ body {
width: 980px;
}
+#breadcrumbs {
+ font-size: 0.8em;
+ background-color: transparent;
+ border-top: 2px solid #6895c2;
+ border-bottom: 2px solid #6895c2;
+}
+
#leftColumn {
border: none;
background-color: transparent;
- margin: 0;
+ margin: 1em 0 0 0;
}
#navcolumn {
@@ -113,11 +122,16 @@ body {
color: #333333;
}
-#contentBox p {
- line-height: 1.5em;
+#contentBox p, #contentBox td, #contentBox li {
+ font-family: "Trebuchet MS", Verdana, sans-serif;
+ line-height: 1.5em;
font-size: 0.94em;
}
+#contentBox p, #contentBox li {
+ text-align: justify;
+}
+
a:link {
color: #039;
}
@@ -132,20 +146,16 @@ a.externalLink, a.externalLink:link, a.e
padding: 0;
}
-ul, ol {
- font-size: 11px;
- text-align: left;
- list-style-position: outside;
- display: block;
- white-space: normal;
+table.bodyTable th {
+ background-color: #6f8aa5;
}
-table td {
- font-size: 11px;
- padding: 0px;
- spacing: 0px;
- text-align: left;
- vertical-align: top;
+table.bodyTable tr.a {
+ background-color: #d1dce7;
+}
+
+table.bodyTable tr.b {
+ background-color: #eceef1;
}
h1 {
@@ -173,7 +183,12 @@ h3 {
}
h4 {
- font-size: 13px;
+ color: #333333;
+ font-size: 1em;
+ font-weight: bold;
+ background-color: transparent;
+ border: none;
+ padding: 0;
}
th {
@@ -197,10 +212,19 @@ table {
background-position: left top;
}
-pre {
+pre, div.source {
border: 1px dotted;
background-color: #e2ecf6;
padding: 0.8em;
+ margin: 0;
overflow: auto;
font-size: 0.9em;
-}
\ No newline at end of file
+}
+
+/* Xdoc generates <div class="source"><pre>...</pre></div> for <source> elements.
+ Because we already apply styles to every <pre>, we need to suppress styles here. */
+div.source pre {
+ border: none;
+ background-color: transparent;
+ padding: none;
+}
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/adv-userguide.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/adv-userguide.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/adv-userguide.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/adv-userguide.xml Fri Nov 5 21:18:06 2010
@@ -140,15 +140,15 @@ directory has three operations: echoStri
see how the others will look when they are filled up, see <a
href="src/Axis2SampleDocLitServiceCode.html">Code Listing For
Axis2SampleDocLitService Service</a></p>
-<source><pre>public org.apache.axis2.userguide.xsd.EchoStringReturnDocument
+<pre>public org.apache.axis2.userguide.xsd.EchoStringReturnDocument
echoString(org.apache.axis2.userguide.xsd.EchoStringParamDocument param4) throws Exception {
//Use the factory to create the output document.
org.apache.axis2.userguide.xsd.EchoStringReturnDocument retDoc =
org.apache.axis2.userguide.xsd.EchoStringReturnDocument.Factory.newInstance();
//send the string back.
retDoc.setEchoStringReturn(param4.getEchoStringParam());
- return retDoc;<br/></pre>
-</source><a name="Step4_Create_archive"></a>
+ return retDoc;</pre>
+<a name="Step4_Create_archive"></a>
<h3>Step 3: Create Archive File</h3>
@@ -219,9 +219,8 @@ generation</strong> approach presented b
<p>Let's see how we could generate java code (Stub) to handle the client side
Web Service invocation for you. This can be done by running the WSDL2Java
tool using the following arguments</p>
-<source><pre>wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl -d xmlbeans
+<pre>wsdl2java.sh -uri ../samples/wsdl/Axis2SampleDocLit.wsdl -d xmlbeans
-o ../samples/src -p org.apache.axis2.userguide</pre>
-</source>
<p>This will generate client side stubs and xmlbeans types for your types.
The Stub class that you need to use will be of the form
<strong><service-name>Stub</strong>. In our example, it will be called
@@ -243,7 +242,7 @@ strategies.</p>
<code>Axis2SampleDocLitService</code> that we have already deployed. The code
is extremely simple to understand and the explanations are in the form of
comments.</p>
-<source><pre> try {
+<pre> try {
org.apache.axis2.userguide.Axis2SampleDocLitServiceStub stub
= new org.apache.axis2.userguide.Axis2SampleDocLitServiceStub(null,
"http://localhost:8080/axis2/services/Axis2SampleDocLitService");
@@ -258,7 +257,6 @@ comments.</p>
} catch (java.rmi.RemoteException e) {
e.printStackTrace();
}</pre>
-</source>
<p>First argument of <code>Axis2SampleDocLitPortTypeStub</code> should be the
Axis2 repository for the client. Here we use null to make the stub use
default configurations. However, you can make Axis2 use your own repository
@@ -274,7 +272,7 @@ innovation. For each method in the Servi
<strong>start<method-name></strong>. These methods accept a callback
object, which would be called when the response is received. Sample code that
does an asynchronous interaction is given below.</p>
-<source><pre>try {
+<pre>try {
org.apache.axis2.userguide.Axis2SampleDocLitServiceStub stub
= new org.apache.axis2.userguide.Axis2SampleDocLitServiceStub(null,
"http://localhost:8080/axis2/services/Axis2SampleDocLitService");
@@ -293,7 +291,6 @@ does an asynchronous interaction is give
} catch (java.rmi.RemoteException e) {
e.printStackTrace();
}</pre>
-</source>
<p>Even though the above code does a non-blocking invocation at the client
API, the transport connection may still operate in a blocking fashion. For
example, a single HTTP connection can be used to create a Web Service request
@@ -303,9 +300,8 @@ transport connections are used for the r
the following code segment after creating the stub. It will force Axis2 to
use two transport connections for the request and the response while the
client uses a Callback to process the response.</p>
-<source><pre>stub._getServiceClient().engageModule(new QName("addressing"));
+<pre>stub._getServiceClient().engageModule(new QName("addressing"));
stub._getServiceClient().getOptions().setUseSeparateListener(true);</pre>
-</source>
<p>Once those options are set, Axis2 client does the following:</p>
<ol>
<li>Starts a new Transport Listener(Server) at the client side.</li>
@@ -321,7 +317,7 @@ stub._getServiceClient().getOptions().se
<p>You can also use your own repository with an Axis2 Client. The code below shows how
to do this.</p>
-<source><pre>String axis2Repo = ...
+<pre>String axis2Repo = ...
String axis2xml = ...
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(axis2Repo, axis2xml);
@@ -329,7 +325,6 @@ Service1Stub stub1 = new Service1Stub(co
//invoke Service1
Service2Stub stub2 = new Service2Stub(configContext,...);
//invoke Service2</pre>
-</source>
<p>Note by creating the <code>ConfigurationContext</code> outside and passing
it to the stubs, you could make number of stubs to use same repository, thus
saving the configuration loading overhead from each request.</p>
@@ -399,7 +394,7 @@ the semantics of scope, and how to engag
can be only engaged as global</td>
<td>By adding a <module ref="addressing"/> to the Axis2 xml file
or calling
- <pre>stub._getServiceClient().engageModule(moduleName)</pre>
+ <code>stub._getServiceClient().engageModule(moduleName)</code>
at client side</td>
</tr>
<tr>
@@ -446,7 +441,7 @@ and client sides.</p>
<li>To <strong>engage</strong> the addressing module, you should either add
<module ref="addressing"/> to the axis2.xml file at the client side
or call
- <pre>stub._getServiceClient().engageModule(moduleName)</pre>
+ <code>stub._getServiceClient().engageModule(moduleName)</code>
</li>
</ol>
<a name="advanced"></a>
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/axis2config.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/axis2config.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/axis2config.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/axis2config.xml Fri Nov 5 21:18:06 2010
@@ -73,20 +73,17 @@ element) will be transformed into proper
the top level parameters in the configuration document can be accessed via
AxisConfiguration in the running system. The correct way of defining a
parameter is shown below:</p>
-<source><pre>
- <parameter name="name of the parameter" >parameter value </parameter></pre>
-</source><a name="Receiver"></a>
+<pre><parameter name="name of the parameter" >parameter value </parameter></pre>
+<a name="Receiver"></a>
<h3>Transport Receiver</h3>
<p>Depending on the underlying transport on which Axis2 is going to run, you
need to have different transport receivers. The way you add them to the
-system is as follows:</p> <source>
-<pre>
-<transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
- <parameter name="port" >6060</parameter>
- </transportReceiver>
- </pre>
+system is as follows:</p>
+<pre><transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
+ <parameter name="port" >6060</parameter>
+</transportReceiver></pre>
</source>The above elements show how to define transport receivers in
axis2.xml. Here the "name" attribute of the <transportReceiver/> element identifies the
type of the transport receiver. It can be HTTP, TCP, SMTP, CommonsHTTP, etc.
@@ -135,7 +132,7 @@ you want to add a handler that should go
that by adding a handler element into it. In addition to that, there is no
hard coding work for the handler chain anywhere in Axis2 (at any Axis*). So
all those configurations are also done in the phase order element. The
-complete configurations will look as follows: </p><source>
+complete configurations will look as follows: </p>
<pre><phaseOrder type="InFlow">
<!-- Global phases -->
<phase name="Transport">
@@ -215,7 +212,6 @@ complete configurations will look as fol
<phase name="PolicyDetermination"/>
<phase name="MessageOut"/>
</phaseOrder></pre>
-</source>
<p><strong>type:</strong> the attribute represents the type of the flow. It
can only be one of the following:</p>
<ul>
@@ -228,9 +224,8 @@ can only be one of the following:</p>
<p>In addition to that, the only child element that is allowed inside
"phaseOrder" is the "phase" element which represents the available phases in
the execution chain. The method of specifying phases inside "phaseOrder" is
-as follows:</p><source>
-<pre> <phase name="Transport"/></pre>
-</source>
+as follows:</p>
+<pre><phase name="Transport"/></pre>
<p><strong>name:</strong> Name of the phase. <br/>
</p>
@@ -264,9 +259,8 @@ phaseOrder:</p>
<h3>Module References</h3>
<p>If you want to engage a module, system wide, you can do it by adding a top
-level module element in axis2.xml. It should look as follows:</p><source>
-<pre><module ref="addressing"/> </pre>
-</source>
+level module element in axis2.xml. It should look as follows:</p>
+<pre><module ref="addressing"/></pre>
<p><strong>ref:</strong> the module name which is going to be engaged, system
wide.</p>
<a name="Listeners"></a>
@@ -287,11 +281,10 @@ informed of the following events:</p>
<p>Registering Observers is very useful for additional features such as RSS
feed generation, which will provide service information to subscribers. The
-correct way of registering observers should as follows:</p><source>
+correct way of registering observers should as follows:</p>
<pre><listener class="org.apache.axis2.ObserverIMPL">
<parameter name="RSS_URL" >http://127.0.0.1/rss</parameter>
- </listener></pre>
-</source>
+</listener></pre>
<p><strong>class:</strong> Represents an Implementation class of observer,
and it should be noted that the Implementation class should implement
AxisObserver interface, and the class has to be available in the classpath.
@@ -306,11 +299,11 @@ AxisObserver interface, and the class ha
service archive file needs to have a services.xml in order to be a valid
service and it should be available in the META-INF directory of the archive
file. A very simple services.xml is shown below:</font></p>
-<source><pre><service name="name of the service" scope="name of the scope" class="full qualifide name the service lifecycle class" targetNamespace="target namespase for the service">
+<pre><service name="name of the service" scope="name of the scope" class="full qualifide name the service lifecycle class" targetNamespace="target namespase for the service">
<Description> The description of the service </Description>
<transports>
- <transport>HTTP</transport>
+ <transport>HTTP</transport>
</transports>
<schema schemaNamespace="schema namespace"/>
@@ -320,15 +313,14 @@ file. A very simple services.xml is show
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
- <parameter name="ServiceClass" locked="xsd:false">org.apache.axis2.sample.echo.EchoImpl</parameter>
+ <parameter name="ServiceClass" locked="xsd:false">org.apache.axis2.sample.echo.EchoImpl</parameter>
<operation name="echoString" mep="operation MEP">
<actionMapping>Mapping to action</actionMapping>
<module ref=" a module name "/>
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</operation>
- </service></pre>
-</source>
+</service></pre>
<p><strong>name</strong>: The service name will be the name of the archive
file if the .aar file contains only one service, or else the name of the
service will be the name given by the name attribute.</p>
@@ -370,12 +362,11 @@ methods in that service will be exposed.
has to add the "operation" tag and override it. In a non-Java scenario or if
you do not have a service class, then all the operations the user wants to
expose by the service has to be indicated in the services.xml. It is
-specified as follows:</p> <source>
+specified as follows:</p>
<pre> <operation name="echoString">
<module ref=" a module name "/>
<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
</operation></pre>
-</source>
<p>The only compulsory attribute here is "name", which represents the
operation name that is going to be exposed. Any operation can contain module
references as well as any number of parameters. The most interesting thing is
@@ -395,7 +386,7 @@ module archive file needs to have a modu
and it should be available in the META-INF directory of the archive file. <br/>
</p>
-<p>A very simple module.xml is shown below:</p> <source>
+<p>A very simple module.xml is shown below:</p>
<pre><module class="org.apache.module.Module1Impl">
<InFlow>
.
@@ -421,7 +412,6 @@ and it should be available in the META-I
<parameter name="para1" locked="xsd:true">10</parameter>
</operation>
</module></pre>
-</source>
<p><strong>class:</strong> (Optional attribute) Indicates the module
implementation class. A module may or may not contain a module implementation
class since the module can also be a collection of handlers. If a module
@@ -451,11 +441,10 @@ module.xml. The method of specifying the
in services.xml.</p>
<p><b>handler:</b> The Handler element consists of compulsory and optional
-attributes. The method of defining a handler will look as follows:</p> <source>
+attributes. The method of defining a handler will look as follows:</p>
<pre><handler name="handler1" class="handlerClass ">
<order phase="userphase1" />
- </handler></pre>
-</source>
+</handler></pre>
<p><b><i>Compulsory Attributes</i></b> <br/>
<b>name:</b> Name of the handler.<br/>
<b>class:</b> Handler implementation class.<br/>
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/dii.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/dii.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/dii.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/dii.xml Fri Nov 5 21:18:06 2010
@@ -155,9 +155,7 @@ directory of the binary distribution.</p
<p>The client code below will invoke the "echo" operation of
"MyService" using a pure blocking single-channel invocation.</p>
-<source>
-<pre>
- try {
+<pre> try {
<span style="color: rgb(36, 193, 19);">
OMElement payload = ClientUtil.getEchoOMElement();
Options options = new Options();
@@ -173,7 +171,6 @@ directory of the binary distribution.</p
axisFault.printStackTrace();
}
}</pre>
-</source>
<p>The lines highlighted in green show the set of operations that you need
to perform in order to invoke the Web service in this manner.</p>
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/http-transport.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/http-transport.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/http-transport.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/http-transport.xml Fri Nov 5 21:18:06 2010
@@ -129,7 +129,7 @@ following lines in axis2.xml.</p>
<pre> <parameter name="CONNECTION_TIMEOUT">some_integer_value</parameter></pre>
<br/>
-For runtime configuration, it can be set as follows within the client stub:<source>
+For runtime configuration, it can be set as follows within the client stub:
<pre>
...
Options options = new Options();
@@ -141,7 +141,7 @@ options.setTimeOutInMilliSeconds(timeOut
...
</pre>
-</source><a name="version_config"></a>
+<a name="version_config"></a>
<h2>HTTP Version Configuration</h2>
@@ -203,7 +203,6 @@ HttpTransportProperties.ProxyProperties
create an instance of this object, configure proxy values for it,
and then set it to the MessageContext's property bag via options.setProperty().
For example:</p>
-<source>
<pre>
...
Options options = new Options();
@@ -216,7 +215,6 @@ proxyProperties.setProxyPort(...);
options.setProperty(HttpConstants.PROXY, proxyProperties);
...
</pre>
-</source>
<p>The above code will override the deployment proxy configuration settings.</p>
<a name="preemptive_auth"></a>
@@ -269,7 +267,6 @@ the state of the server to be authentica
set to the Options's property bag with the key as HTTPConstants.AUTHENTICATE.
The following code snippet shows how to configure the transport
framework to use Basic Authentication:</p>
-<source>
<pre>
...
Options options = new Options();
@@ -283,7 +280,6 @@ auth.setPassword("password");
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);
...
</pre>
-</source>
<a name="reusing_httpclient_object"></a>
<h2>Reusing the httpclient object</h2>
@@ -294,9 +290,7 @@ handshake may not be of negligible cost.
object, you can set the relevant property in the Stub:
</p>
- <source>
<pre>options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "true");</pre>
- </source>
<a name="setting_cached_httpclient_object"></a>
<h2>Setting the cached httpclient object</h2>
@@ -308,14 +302,12 @@ set the cached httpclient object when yo
(before any actual axis request). You can set the relevant property in
the Stub:
- <source>
<pre>
MultiThreadedHttpConnectionManager conmgr = new MultiThreadedHttpConnectionManager();
conmgr.getParams().setDefaultMaxConnectionsPerHost(10);
HttpClient client = new HttpClient(conmgr);
configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, client);
</pre>
- </source>
<a name="setting_cached_httpstate_object"></a>
<h2>Setting the cached httpstate object</h2>
@@ -342,12 +334,10 @@ and cookies. This is really complicated
Sample configuration:
- <source>
<pre>
HttpState myHttpState = new HttpState();
options.setProperty(WSClientConstants.CACHED_HTTP_STATE, myHttpState);
</pre>
- </source>
Doing so the HttpState is attached to the client. Respectively this is automatically propagated to all MessageContext objects used by the client.
Underneath this just instructs Axis2 that the CACHED_HTTP_STATE set should be passed as a parameter when HttpClient#executeMethod is invoked.
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/mtom-guide.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/mtom-guide.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/mtom-guide.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/mtom-guide.xml Fri Nov 5 21:18:06 2010
@@ -330,7 +330,7 @@ element at runtime using an MTOM attribu
Furthermore, you can identify what type of data might be expected in the
element using the xmime:expectedContentType. Putting it all together, our
example element becomes:</p>
-<source><pre> <element name="MyBinaryData" xmime:expectedContentTypes='image/jpeg' >
+<pre> <element name="MyBinaryData" xmime:expectedContentTypes='image/jpeg' >
<complexType>
<simpleContent>
<extension base="base64Binary" >
@@ -340,18 +340,17 @@ example element becomes:</p>
</simpleContent>
</complexType>
</element></pre>
-</source>
<p>You can also use the xmime:base64Binary type to express the above
mentioned data much clearly.</p>
-<source><pre> <element name="MyBinaryData" xmime:expectedContentTypes='image/jpeg' type="xmime:base64Binary"/></pre>
-</source><a name="251"></a>
+<pre> <element name="MyBinaryData" xmime:expectedContentTypes='image/jpeg' type="xmime:base64Binary"/></pre>
+<a name="251"></a>
<h3>MTOM Databinding Using ADB</h3>
<p>Let's define a full, validated doc/lit style WSDL that uses the xmime
schema, has a service that receives a file, and saves it in the server using
the given path.</p>
-<source><pre><wsdl:definitions xmlns:tns="http://ws.apache.org/axis2/mtomsample/"
+<pre><wsdl:definitions xmlns:tns="http://ws.apache.org/axis2/mtomsample/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
@@ -437,7 +436,6 @@ the given path.</p>
</wsdl:port>
</wsdl:service>
</wsdl:definitions></pre>
-</source>
<p>The important point here is we import http://www.w3.org/2005/05/xmlmime
and define the element 'binaryData' that utilizes MTOM.</p>
@@ -447,7 +445,7 @@ information. Here, we define an Ant task
Binding) as the databinding implementation. The name we list for the WSDL
above is MTOMSample.wsdl, and we define our package name for our generated
source files to 'sample.mtom.service' . Our Ant task for this example is:</p>
-<source><pre>
+<pre>
<target name="generate.service">
<java classname="org.apache.axis2.wsdl.WSDL2Java">
<arg value="-uri" />
@@ -462,11 +460,10 @@ source files to 'sample.mtom.service' .
<classpath refid="class.path" />
</java>
</target></pre>
-</source>
<p>Now we are ready to code. Let's edit
output/src/sample/mtom/service/MTOMSampleSkeleton.java and fill in the
business logic. Here is an example:</p>
-<source><pre> public org.apache.ws.axis2.mtomsample.AttachmentResponse attachment(
+<pre> public org.apache.ws.axis2.mtomsample.AttachmentResponse attachment(
org.apache.ws.axis2.mtomsample.AttachmentRequest param0) throws Exception
{
AttachmentType attachmentRequest = param0.getAttachmentRequest();
@@ -483,11 +480,10 @@ business logic. Here is an example:</p>
response.setAttachmentResponse("File saved succesfully.");
return response;
}</pre>
-</source>
<p>The code above receives a file and writes it to the disk using the given
file name. It returns a message once it is successful. Now let's define the
client:</p>
-<source><pre> public static void transferFile(File file, String destination)
+<pre> public static void transferFile(File file, String destination)
throws RemoteException {
MTOMSampleStub serviceStub = new MTOMSampleStub();
@@ -517,7 +513,6 @@ client:</p>
AttachmentResponse response = serviceStub.attachment(attachmentRequest);
System.out.println(response.getAttachmentResponse());
}</pre>
-</source>
<p>The last step is to create an AAR with our Skeleton and the services.xml
and then deploy the service. You can find the completed sample in the Axis2
standard binary distribution under the samples/mtom directory</p>
@@ -544,7 +539,7 @@ support Content Location based referenci
<li><strong>Sample service which accesses a received SwA type
attachment</strong></li>
</ul>
-<source><pre>public class SwA {
+<pre>public class SwA {
public SwA() {
}
@@ -565,7 +560,7 @@ support Content Location based referenci
...........
}
}</pre>
-</source><a name="32"></a>
+<a name="32"></a>
<h3>Sending SwA Type Attachments</h3>
@@ -575,13 +570,11 @@ enable MTOM and SwA together. In such a
over SwA.</p>
<p>This can be set using the axis2.xml as follows.</p>
-<source><pre>
+<pre>
<parameter name="enableSwA">true</parameter></pre>
-</source>
<p>"enableSwA" can also be set using the client side Options as follows</p>
-<source><pre>
+<pre>
options.setProperty(Constants.Configuration.ENABLE_SwA, Constants.VALUE_TRUE);</pre>
-</source>
<p>Users are expected to use the attachment API provided in the
MessageContext to specify the binary attachments needed to be attached to the
outgoing message as SwA type attachments. Client side SwA capability can be
@@ -591,7 +584,7 @@ access the MessageContext.</p>
<li><strong>Sample client which sends a message with SwA type
attachments</strong></li>
</ul>
-<source><pre> public void uploadFileUsingSwA(String fileName) throws Exception {
+<pre> public void uploadFileUsingSwA(String fileName) throws Exception {
Options options = new Options();
options.setTo(targetEPR);
@@ -613,7 +606,7 @@ access the MessageContext.</p>
mepClient.addMessageContext(mc);
mepClient.execute(true);
}</pre>
-</source><a name="33"></a>
+<a name="33"></a>
<h3>MTOM Backward Compatibility with SwA</h3>
@@ -629,7 +622,7 @@ SwA message.</p>
<ul>
<li><strong>A sample SwA message from Axis 1.x</strong></li>
</ul>
-<source><pre>Content-Type: multipart/related; type="text/xml";
+<pre>Content-Type: multipart/related; type="text/xml";
start="<9D645C8EBB837CE54ABD027A3659535D>";
boundary="----=_Part_0_1977511.1123163571138"
@@ -652,10 +645,10 @@ Content-Id: <3936AE19FBED55AE4620B81C
<em>Binary Data.....</em>
------=_Part_0_1977511.1123163571138--</pre>
-</source><ul>
+<ul>
<li><strong>Corresponding MTOM message from Axis2</strong></li>
</ul>
-<source><pre>Content-Type: multipart/related; boundary=MIMEBoundary4A7AE55984E7438034;
+<pre>Content-Type: multipart/related; boundary=MIMEBoundary4A7AE55984E7438034;
type="application/xop+xml"; start="<0.09BC7F4BE2E4D3EF1B@apache.org>";
start-info="text/xml; charset=utf-8"
@@ -680,7 +673,7 @@ content-id: <1.A91D6D2E3D7AC4D580@apa
<em>Binary Data.....</em>
--MIMEBoundary4A7AE55984E7438034--</pre>
-</source><a name="4"></a>
+<a name="4"></a>
<h2>Advanced Topics</h2>
<a name="41"></a>
@@ -704,7 +697,7 @@ directory</strong> from time to time.</p
<p>The following parameters need to be set in Axis2.xml in order to enable
file caching.</p>
-<source><pre><axisconfig name="AxisJava2.0">
+<pre><axisconfig name="AxisJava2.0">
<!-- ================================================= -->
<!-- Parameters -->
@@ -716,11 +709,10 @@ file caching.</p>
.........
.........
</axisconfig></pre>
-</source>
<p>Enabling file caching for client side receiving can be done for the by
setting the Options as follows.</p>
-<source><pre>options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS,Constants.VALUE_TRUE);
+<pre>options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS,Constants.VALUE_TRUE);
options.setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR,<em>TempDir</em>);
options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, <em>"4000"</em>);</pre>
-</source></body>
+</body>
</html>
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/rest-ws.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/rest-ws.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/rest-ws.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/rest-ws.xml Fri Nov 5 21:18:06 2010
@@ -93,7 +93,7 @@ usage of the above. It uses the "echo" o
<code>userguide.example1.MyService </code>of the
AXIS2_HOME/samples/userguide/src/userguide/example1.</p>
-<p>The class source will be as follows:</p><source>
+<p>The class source will be as follows:</p>
<pre>public class RESTClient {
private static String toEpr = "http://localhost:8080/axis2/services/MyService";
@@ -133,7 +133,7 @@ AXIS2_HOME/samples/userguide/src/usergui
return method;
}
}</pre>
-</source><a name="rest_with_get"></a>
+<a name="rest_with_get"></a>
<h2>Access a REST Web Service via HTTP GET</h2>
@@ -141,15 +141,14 @@ AXIS2_HOME/samples/userguide/src/usergui
via HTTP GET. For example, the following URL requests the Version Service via
HTTP GET. However, the Web service arriving via GET assumes REST. Other
parameters are converted into XML and put into the SOAP body.</p>
-<source><pre>http://127.0.0.1:8080/axis2/services/Version/getVersion</pre>
-</source>
+<pre>http://127.0.0.1:8080/axis2/services/Version/getVersion</pre>
<p>The result can be shown in the browser as follows:</p>
<img src="images/userguide/http-get-ws.jpg"/>
<p>For example, the following request,</p>
-<source><pre>http://127.0.0.1:8080/axis2/services/Version/getVersion</pre>
-</source>will be converted into the following SOAP message for processing by
-Axis2.<source>
+<pre>http://127.0.0.1:8080/axis2/services/Version/getVersion</pre>
+will be converted into the following SOAP message for processing by
+Axis2.
<pre>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
@@ -157,7 +156,7 @@ Axis2.<source>
</soapenv:Body>
</soapenv:Envelope>
</pre>
-</source>
+
<h2>Resources</h2>
<p>How I Explained REST to My Wife, By Ryan Tomayko- <a
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/soapmonitor-module.xml.vm
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/soapmonitor-module.xml.vm?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/soapmonitor-module.xml.vm (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/soapmonitor-module.xml.vm Fri Nov 5 21:18:06 2010
@@ -53,8 +53,7 @@ for security reasons.</p>
<p>The SOAP Monitor can be engaged by inserting the following in the
axis2.xml file.</p>
-<source><pre> <module ref="soapmonitor"/></pre>
-</source>
+<pre> <module ref="soapmonitor"/></pre>
<p>In the axis2.xml file, define your phase orders for the 'soapmonitorPhase'
referenced in the module.xml of soapmonitor.mars. Below is an example which
should NOT be copied exactly, since the default phases change occasionally.
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/spring.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/spring.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/spring.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/spring.xml Fri Nov 5 21:18:06 2010
@@ -330,21 +330,19 @@ public class TestClient {
axis2-spring-*.jar are under WEB-INF/lib. In such a case, the classes shown
in this tutorial need to be placed in a JAR under WEB-INF/lib. In this
example the JAR layout is:</p>
-<source><pre>./mySpring.jar
+<pre>./mySpring.jar
./META-INF
./META-INF/MANIFEST.MF
./spring
./spring/MyBean.class
./spring/MyBeanImpl.class
./spring/SpringAwareService.class</pre>
-</source>
<p>Since all the user classes are in mySpring.jar in this example, the AAR
merely contains the services.xml file:</p>
-<source><pre>./springExample.aar
+<pre>./springExample.aar
./META-INF
./META-INF/MANIFEST.MF
./META-INF/services.xml</pre>
-</source>
<p>To run this example, make sure you have the axis2-spring*.jar that comes
from the axis2-std-*-bin distro in the server side WEB-INF/lib, as well as
the appropriate Spring jar - most will use the full spring.jar, but the
@@ -374,7 +372,7 @@ will <strong>not</strong> work otherwise
<ul>
<li><strong><a name="261"></a>The Spring inside an AAR layout</strong></li>
</ul>
-<source><pre>./springExample.aar
+<pre>./springExample.aar
./META-INF
./META-INF/MANIFEST.MF
./META-INF/services.xml
@@ -387,7 +385,6 @@ will <strong>not</strong> work otherwise
./spring/MyBeanImpl.class
./spring/SpringAwareService.class
./spring/SpringInit.class </pre>
-</source>
<p>As explained in the <a href="#24">Without a ServletContext</a> section,
the 'Spring inside an AAR' config needs to hook Axis2 and Spring together via
a Spring bean. Place the following in your Spring config file:</p>
@@ -402,7 +399,7 @@ a Spring bean. Place the following in yo
<p>One way to initialize Spring inside the AAR is to use the
org.apache.axis2.engine.ServiceLifeCycle interface. Here we give an
example:</p>
-<source><pre>package spring;
+<pre>package spring;
import org.apache.axis2.engine.ServiceLifeCycle;
import org.apache.axis2.context.ConfigurationContext;
@@ -439,12 +436,11 @@ public class SpringInit implements Servi
public void shutDown(ConfigurationContext ctxIgnore, AxisService ignore) {
}
}</pre>
-</source>
<p>Here's the services.xml that now includes SpringInit and the
SpringAwareService shown above. There is also the composite parameter which
is needed when loading Spring in the AAR - see the <a href="#263">Known
issues running Spring inside the AAR</a> area.</p>
-<source><pre><serviceGroup>
+<pre><serviceGroup>
<!-- Invoke SpringInit on server startup and shutdown -->
<service name="SpringAwareService" class="spring.SpringInit">
<description>
@@ -459,7 +455,7 @@ issues running Spring inside the AAR</a>
</operation>
</service>
</serviceGroup></pre>
-</source><ul>
+<ul>
<li><strong><a name="263"></a>Known issues running Spring inside the
AAR</strong></li>
</ul>
@@ -491,11 +487,11 @@ files in a specific directory under WEB-
for your jar / class locations. Use the wildcards in the following example to list your mapping
locations as shown: </p>
-<source><pre><bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
+<pre><bean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="mappingLocations">
<value>classpath*:**/MyEntity.hbm.xml</value>
</property>
...
</bean> </pre>
-</source></body>
+</body>
</html>
Modified: axis/axis2/java/core/trunk/src/site/xdoc/docs/transport_howto.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/docs/transport_howto.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/docs/transport_howto.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/docs/transport_howto.xml Fri Nov 5 21:18:06 2010
@@ -85,7 +85,7 @@ need a configuration context. The follow
should ideally be only done once for the lifetime of the Transport
receiver.</p>
-<p></p><source>
+<p></p>
<pre>try {
//Create a factory
ConfigurationContextFactory factory = new ConfigurationContextFactory();
@@ -95,14 +95,13 @@ axis2xmllocation);
} catch (Exception e) {
log.info(e.getMessage());
}</pre>
-</source>
<p>Now we need some kind of a Listener to listen to the requests that come
in. You need to implement this according to the transport that you are trying
to build. After a message is received at the Receiver, you can use the
following code to process the request and then forward the message context to
the engine using the engine.receive(msgContext) method. (The following code
is extracted from the MailListener as an example)</p>
-<source><pre>AxisEngine engine = new AxisEngine(configurationContext);
+<pre>AxisEngine engine = new AxisEngine(configurationContext);
MessageContext msgContext = null;
// create and initialize a message context
@@ -159,17 +158,15 @@ try {
log.error(e);
}
}</pre>
-</source>
<p>Now that we have the coding in place, we need to let Axis2 know about our
new transport receiver. We do this by adding an entry into the axis2.xml
file. If you need to pass any properties for the transport to operate, it can
also be done through the axis2.xml file.</p>
-<source><pre> <transportReceiver name="TRANSPORT_NAME" class="org.apache.Axis2.transport.TRANSPORT_NAME.TRANSPORT_LISTNER_CLASS">
+<pre> <transportReceiver name="TRANSPORT_NAME" class="org.apache.Axis2.transport.TRANSPORT_NAME.TRANSPORT_LISTNER_CLASS">
<parameter name="PROPERTY_NAME">PROPERTY_VALUE</parameter>
<parameter name="PROPERTY_NAME_2">PROPERTY_VALUE_2</parameter>
</transportReceiver>
</pre>
-</source>
<p>By using a code fragment like
<code>Utils.getParameterValue(transportOut.getParameter(MailSrvConstants.SMTP_USER))</code>
we can extract the parameters that we inserted into the axis2.xml file.</p>
@@ -185,7 +182,7 @@ org.apache.Axis2.transport.AbstractTrans
<p>The following bit of code from the abstract transport sender will call the
Transport Sender that you wrote.</p>
-<source><pre>// If an EPR is present then the message is going on a different channel.
+<pre>// If an EPR is present then the message is going on a different channel.
if (epr != null) {
out = openTheConnection(epr, msgContext);
OutputStream newOut = startSendWithToAddress(msgContext, out);
@@ -205,7 +202,6 @@ if (epr != null) {
"Both the TO and Property MessageContext.TRANSPORT_WRITER is Null, No way to send response.");
}
}</pre>
-</source>
<p>Therefore, depending on whether your transport is using the same channel
to send the response or using a different channel, you will need to implement
a sub-set of the methods from the abstract class.</p>
@@ -213,12 +209,11 @@ a sub-set of the methods from the abstra
<p>After implementing the necessary methods, you can let Axis2 know about
your new transport sender by adding an entry to the axis2.xml file, like you
did for the TransportReceiver.</p>
-<source><pre> <transportSender name="TRANSPORT_NAME" class="org.apache.Axis2.transport.TRANSPORT_NAME.TRANSPORT_SENDER_CLASS">
+<pre> <transportSender name="TRANSPORT_NAME" class="org.apache.Axis2.transport.TRANSPORT_NAME.TRANSPORT_SENDER_CLASS">
<parameter name="PROPERTY_NAME">PROPERTY_VALUE</parameter>
<parameter name="PROPERTY_NAME_2">PROPERTY_VALUE_2</parameter>
</transportSender>
</pre>
-</source>
<p>Have a look at
org.apache.Axis2.transport.http.CommonsHTTPTransportSender which is used to
send HTTP responses.</p>
Modified: axis/axis2/java/core/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/src/site/xdoc/index.xml?rev=1031799&r1=1031798&r2=1031799&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/src/site/xdoc/index.xml (original)
+++ axis/axis2/java/core/trunk/src/site/xdoc/index.xml Fri Nov 5 21:18:06 2010
@@ -16,17 +16,13 @@
~ specific language governing permissions and limitations
~ under the License.
-->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta name="generator" content=
-"HTML Tidy for Windows (vers 14 June 2007), see www.w3.org" />
-<meta http-equiv="content-type" content="" />
-<title>Apache Axis2/Java - Next Generation Web Services</title>
-</head>
-<body lang="en" xml:lang="en">
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
+ <properties>
+ <title>Apache Axis2/Java - Next Generation Web Services</title>
+ </properties>
+ <body>
<h1>Welcome to Apache Axis2/Java</h1>
<p>Axis2 is a Web Services / SOAP / WSDL engine, the successor to the
widely used <a href=
@@ -301,4 +297,4 @@ Web services related news on the Apache
Online</a></li>
</ul>
</body>
-</html>
+</document>