<h1>How to Build JBoss.net</h1>

<p> 

<img SRC="../../../../../modules/html/developers/guides/jboss.net/jboss-net.png" align=LEFT>

Before you go on the details, we recommend 
that you have a look at the code and 
<link href="http://xml.apache.org/axis/">the axis site</a>. </p>

<p> <em>To build</em>, you can run either 

<code>
<pre>
cd build
build -Dmodules=jboss.net
</pre>
</code>

or

<code>
<pre>
cd build
build -Dgroups=plugins
</pre>
</code>

or 

<code>
<pre>
cd build
build -Dgroups=optional
</pre>
</code>

or (this is for our friends of logical progression ;-)

<code>
<pre>
cd build
build -Dgroups=optional-plugins
</pre>
</code></p>

<p> <em> To install </em>: JBoss.net relies requires a WebContainer 
installation (Tomcat, Jetty; JBoss.net has currently been tested under Jetty) to realize 
the http transport facility. The necessary runtime libraries (lib/ext/axis.jar, deploy/lib/jboss-net.sar and
client/jboss-net-client.jar) and configuration files  (conf/default/axis-config.xml and client/client-config.xml)
are installed as a part of the above BUILD step.</p>
	 
<p>AxisService will register itself as a .wsr deployer at the <code>org.jboss.system.MainDeployer</code>, hence simply putting a .wsr file (or a .wsr file embedded into some other 
hierarchically structured deployment package, such as an .ear) into your deploy directory is enough. 
If you would like to configure JBoss.net with a different WebContainer, please replace the dependency and 
WarDeployer references in deploy/lib/jboss-net.sar!META_INF/jboss-service.xml (the way that 
code and deployment descriptors are bundled is likely and hopefully to change in RH!) 
by your favorite servlet-runner:

<pre>

&lt;server&gt;

  &lt;mbean code=&quot;org.jboss.net.axis.server.AxisService&quot;
	 name=&quot;jboss.net:service=Axis&quot;&gt;
    &lt;depends&gt;jboss.web:service=Jetty&lt;/depends&gt;
    &lt;attribute name=&quot;WarDeployerName&quot;&gt;jboss.web:service=Jetty&lt;/attribute&gt;
    &lt;attribute name=&quot;RootContext&quot;&gt;axis/&lt;/attribute&gt;
    &lt;attribute name=&quot;SecurityDomain&quot;&gt;java:/jaas/other&lt;/attribute&gt;
  &lt;/mbean&gt;

&lt;/server&gt;
</pre>
</p>
	
<p><em>To test</em>: The successfull installation of JBoss.net will be reported 
during the JBoss boot process (The WebContainer should acknowledge the deployment of 
the _axis_\&lt;RootContext/&gt; web application including the main AxisServlet, where
&lt;RootContext/&gt; is the configurable URL infix that defaults to axis/ and under which the 
deployed Web-Services can be reached, see above).</p>

<p>After that, pointing your browser to <a href="http://localhost:8080/jboss-net/servlet/AxisServlet">http://localhost:8080/jboss-net/servlet/AxisServlet</a> 
(or an equivalent address depending on the configuration of your WebContainer and the RootContext) 
should return the default "hello" response page of the AxisServlet. </p>

<p>When you start JBoss with the -Daxis.enableListQuery=true option (which you usually do not in a security-aware 
productive environment), a <a href="http://localhost:8080/axis/services?list">http://localhost:8080/jboss-net/services?list</a>  
request should return an xml document describing the current configuration of the AxisEngine including the
deployed services. The services section should look like:

<pre>
  &lt;?xml version="1.0" encoding="UTF-8" ?&gt; 
  &lt;deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"&gt;
  &lt;service name="RemoteAdaptor" provider="Handler"&gt;
  &lt;parameter name="handlerClass" value="org.jboss.net.jmx.server.MBeanProvider" /&gt; 
  &lt;parameter name="ObjectName" value="jboss.net:service=Adaptor" /&gt; 
  &lt;/service&gt;
  &lt;service name="Administration" provider="java:MSG"&gt;
  &lt;parameter name="allowedMethods" value="AdminService" /&gt; 
  &lt;parameter name="isStatic" value="true" /&gt; 
  &lt;parameter name="methodName" value="AdminService" /&gt; 
  &lt;parameter name="enableRemoteAdmin" value="false" /&gt; 
  &lt;parameter name="className" value="org.apache.axis.utils.Admin" /&gt; 
  &lt;/service&gt;
  &lt;transport name="http"&gt;
  &lt;requestFlow&gt;
  &lt;handler type="java:org.apache.axis.handlers.http.HTTPActionHandler" /&gt; 
  &lt;handler type="java:org.apache.axis.handlers.http.URLMapper" /&gt; 
  &lt;handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler" /&gt; 
  &lt;handler type="java:org.jboss.net.axis.SetClassLoaderHandler" /&gt; 
  &lt;handler type="java:org.jboss.net.axis.server.JBossAuthenticationHandler" /&gt; 
  &lt;/requestFlow&gt;
  &lt;responseFlow&gt;
  &lt;handler type="java:org.jboss.net.axis.ResetClassLoaderHandler" /&gt; 
  &lt;/responseFlow&gt;
  &lt;/transport&gt;
  &lt;typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" serializer="org.jboss.net.jmx.adaptor.ObjectNameSerializerFactory" deserializer="org.jboss.net.jmx.adaptor.ObjectNameDeserializerFactory" type="java:javax.management.ObjectName" qname="ns1:ObjectNameType" xmlns:ns1="http://net.jboss.org/jmx" /&gt; 
  &lt;/deployment&gt;
</pre>
</p>

<p>We recognize inter alia the already mentioned end-point of the RemoteAdaptor web service that
is mapped (via the <code>org.jboss.net.jmx.server.MBeanProvider</code>) to a dedicated MBean with JMX-ObjectName "jboss.net:service=Adaptor". 
Indeed, if you have a look at your <a ref="http://localhost:8082/">current JMX state</a> there
should be the corresponding service up and running, ready to take your Web Invocations through
the JMX bus.</p>

<p>In the <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/jboss.net/testsuite/">JBoss.net testsuite</a>,
we have assembled some samples and tests that can serve as an inspiration and source of insight. 
You can build and run the testsuite against a running jboss server as follows (after having built the main jboss-all/testsuite!)

<code>
<pre>
cd jboss.net/testsuite
build tests-standard-unit
</pre>
</code></p>

<p>In the output directory, there will be some deployable Web Services
(output/lib/addr.wsr is the JBoss-compatible package containing the Axis Address example, output/lib/hello.ear
is a J2EE application consisting of the hello ejb module from the JBoss main testsuite and
an additional web service layer on top of the HelloBean). In output/bin we also have put
some (non-functional, arrgh) batch files to run the individual tests. </p>

<p>Under samples/win, we have checked-in a tiny C#/.Net-based client application that can be run against
the advanced store-test from the above testsuite. You can play around especially with the "Add Web Reference" 
functionality to see how programming against the live server and the wsdl-descriptions can be achieved. For example, 
you can access the meta-data of the BusinessPartnerService bean under 
<a href="http://localhost:8080:/axis/services/BusinessPartnerService?wsdl">http://localhost:8080:/jboss-net/services/BusinessPartnerService?wsdl</a> once
the store.ear is deployed.</p>

<p>"Dr. Schorsch" (<a ref="mailto:christoph.Jung@jboss.org">christoph.jung@jboss.org</a>) - 2001/09/29, Last update on 2003/10/15</p>

<p><small>All mentioned trademarks on this page are 
copyright of their respective owners ... like that ... </small></p>
