You are on page 1of 4

Go to the MET-INF after running the tool it will generates the servoces.

xml in the
MET-INF in which it is gping to generate the services.xml and WSDL and open and
observe the services.xml

In services.xml
<messageReceiver mep=""
class="ScoreBoardServiceMessageReceiverInOut"> will be there where this class will
takes the in put xml and converts the obi and vice versa.

<parameter name="useOriginalwsdl">true</parameter>
useOriginalwsdl means use same WSDL that is there in the application but not at the
run time so that we can avoid the performnace issues without creating the WSDL at
run time.
If we want we can change to false so that it will craetes run time WSDL.

Similalry observe we can understand easily.

Got ot D:\DB Reddy\Servers\apache-tomcat-6.0.20\webapps\axis2\WEB-INF\web.xml then


observe
<servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
which will contains AxisServlet of axis2 which is configured as

<url-pattern>/services/*</url-pattern> so that he can take the req from the


consumer.

axis2.xml which is central settings file which will tells how does the run has to
work.
axis2.xml
It contains <parameter name="hotdeployment">true</parameter> so that without re-
stating the server we can deploy and un-deploy the serveices.
<parameter name="enableMTOM">false</parameter> is by default disable that async is
by deault disable if we want we can enable.

Draw the below text based diagram here which is ther in the paint

Axis2ClassLoader (A2CL) (Parent class Loader)


AAR1ClassLoader AAR2ClassLoader
(Child class Loader of A2CL) (Child class Loader of A2CL)

Axis Admin console

<parameter name="userName">admin</parameter>

<parameter name="password">axis2</parameter>

Axis2 supports REST FULL services as well and Following parameter will completely
disable REST handling in Axis2
<parameter name="disableREST" locked="false">false</parameter>

Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated


WSDL files
<parameter name="disableSOAP12" locked="true">false</parameter>

All axis-2 are uses SOAP 1.2 only by default.

Axis2 Supports 3-ways of dev web services


1. POJO Based Dev
2. JAXWS Based Dev
3. Axis2 Based (.aar) Dev

1. POJO Based Dev:


Axis 2 will supports POJO developement and .aar depleoyemnt of the serveices
POJO deployer , this will alow users to drop .class file and make that into a
service

<deployer extension=".class" directory="pojo"


class="org.apache.axis2.deployment.POJODeployer"/>

so that this type of srevice will be loaded by POJODeployer that is configured in


the axis2.xml
Dev of POJO service:
Write a class with default package with method as public and params as primitives
then copy the .class file in "pojo" directory of the run time WEB-INF directory by
creating the "pojo" directory. Then this services will be deployed by the POJO
deployer.

Access the URl:


---------------
http://localhost:2015/axis2

then access the correponding service

2. JAXWS Based Dev

This type of service will be loaded by JAXWSDeployer that is configured in the


axis2.xml

<deployer extension=".jar" directory="servicejars"


class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>

Write a SEI Interface and provide Impl and annotate with JAXWS Annotaions then make
it as jar and deploy it in the Run Time Env by creating "servicejars" folder in the
WEB-INF and place this jar in this so that it gets deployed.

That menas it deployed by the JAXWSDeployer by reading the config from the
Annotaion without generating the services.xml so we don't need services.xml here

Access the URl:


---------------
http://localhost:2015/axis2

then access the correponding service

Note:
In axis2.xml
<parameter name="useGeneratedWSDLinJAXWS">false</parameter> which used for the
JAXWS Axis2 using Annotations at this if we wanted to generate the WSDL at run time
then say ture or false

If want we can make JAXWS-RI Impl as jar then deploy it in the axis2 runtime of
WEB-INF "servicejars" folder so that it can be deployed by the JAXWSDeployer.
3. Axis2 Based (.aar) Dev:
Which as already done.
JAXWS supports various different protocols like HTTP/TCP etc see in axis2.xml
<transportSender name="tcp"
class="org.apache.axis2.transport.tcp.TCPTransportSender"/>

<transportSender name="http"

class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

And by deafult <module ref="addressing"/> is enable

Hence axis2.xml is called as central config file and which contains the runtime
behavoioral info but not the depleoyement info of the services.

You might also like