axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stadelmann Josef <>
Subject RE: [Axis2] How to check when i uploaded a service and/or a new version of the service to axis2?
Date Thu, 31 Jul 2014 08:47:27 GMT
Hi Muhammad

As you can see, it seems that nobody knows it or has time to answer. What is said so far is

Whenever you deploy a service.aar a deployment cycle is triggered in the axis2 engine. Given
you have setup the proper log4j loggers you will then receive information about that service
deployment by the appenders you have setup. The logger could be setup to engage a chainsaw
hup appender and to even report such  events to your client computer, into your chainsaw GUI.

Chainsaw is open source too,
and the GUI is not a must.
Based on that - you can develop your own reporting client side.

To get WSDL information, there’re are tools to retrieve a WSDL information from a running
That is what goes on if you take a browser with an endpoint ending in ?WSDL. http://i2:8080/axis2/services/SpezplaService?wsdl
That is what almost all modern IDES do?

NetBeans is open source too!
You can get this sources just too look how they add a web service to the service tab in NetBeans
Using this client side code from NetBeans you can easy write a routine which gets this service
dynamic by passing it the wanted EP followed by ?wsdl
then iterate through the returned data to find all methods and for each method the required

Also what I would do is – remember AXIS2 is open source.
Catch down the axis2 sources, (the same version as you already use) setup your Apache/Axis2
 server/service in NetBeans,
set break-points where you want and study the deployment capabilities. You will find a lot
of very useful information.

And do not forget to look how all this axis2 code is tested. That gives insight on how to
use axis2 code it in given cases !!!

Also a good source is to look at the jsp files delivered with each axis2 installation (server
Start best with SelectService.jsp

<form method="get" name="selectServiceForm" action="axis2-admin/<%=action%>">
<table border="0" width="50%" cellspacing="1" cellpadding="1">
        <td width="35%">Select a Service :</td><td width="65%">
            <select name="axisService">
                HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
                Collection serviceCol =  services.values();
                for (Iterator iterator = serviceCol.iterator(); iterator.hasNext();) {
                    AxisService axisService = (AxisService);
                    String serviceName = axisService.getName();
            %> <option  align="left" value="<%=serviceName%>"><%=serviceName%></option>
            <tr><td colspan="2">&nbsp;</td></tr>
             <td colspan="2" align="left">
                <input name="submit" type="submit" value="<%=buttonName%>" >

Moreover, Is there a way to know that the schema of foo is changed, i.e., the second foo contains
additional methods?

My questions and comments are:

1.     who and where should know that a schema has changed.?

a.     Someone at the server?

b.    Someone client code?

2.     Is every user (client side) required to see if a service-interface has changed?

3.     My guess is that you intend to deal with the automated versioning of an interface

a.     (more methods,

b.    less methods,

c.     changed method signatures

d.    and the like,

e.     new services)

4.     In case a user has a client at a given version, and in case your service interfaces
changed to a more recent version, the user with the old client should be able to use the service
asking for already long known methods with given signature. That must work. !!!

5.     Otherwise a new client talking to an old server/service must be prepared for unknown
method exceptions or the like if the client hits the service with a method request the service
cannot respond to.

6.     A half way automated client dealing with versions of server/service interfaces must
be able to ask a service about its version and then take required steps to upgrade the client
on demand. Because a better versioned client demands a new stub to reflect new methods, this
new methods can only be engaged by a well prepared client through interrogation and reflection
technics. Bit of a sophisticated code practice.

7.     For that to achive, I would suggest to first come up with a proper architecture

With kind regards
Josef Stadelmann

From: Muhammad Imran []
Sent: Samstag, 7. Juni 2014 18:46
Subject: Re: [Axis2] How to check when i uploaded a service and/or a new version of the service
to axis2?

thanks :) that surely helps....
however, if i want to do it grammatically, how i do that?
 For instance, the same steps you described...First i run the server, and second i upload
the .aar file after login.
Is there anyway inside axis2 engine ( like handlers, any built in feature which i can modify..or
extend) which gives me the same information which you explained above...
thanks in advance...

On Sat, Jun 7, 2014 at 8:16 AM, areeg samir <<>>
When you upload your file.aar to axis2 you can access your services as an administrator from
(To do that you should run Tomcat setup first) by clicking on the service name, after that
you can save the service.wsdl page from your browser save option.

I attached some pictures that may help you.
I'll describe the pictures as follow:
picture1- Run your tomcat.
[Inline image 1]

picture2- Log-in in with your admin account.
[Inline image 2]

picture3- Click on the Customer service.
[Inline image 5]

picture4- Save your wsdl from save as by giving it the name "customer.wsdl".
[Inline image 4]

On Tue, Jun 3, 2014 at 4:58 PM, Muhammad Imran <<>>
Thanks for the answer, however, Is there anyway to read the wsdl of a web service from inside...

For instance, when i put a service .aar file in axis2 services repository..when axis2 starts,
it check that i have a new service. During that time, I also want to know that i have a service
with a name and a particular wsdl file..I want to keep this wsdl file for further references.
however, I want to do this from inside the axis2....I dont want to read the wsdl file from
outside and keep track of it..

Is there any way to write a handler which gives me the possibility to read the wsdl file of
a service? I currently have the logging handler but it tells me about service invocation and
method details...

I hope my question is clear :)

On Tue, Jun 3, 2014 at 4:48 PM, areeg samir <<>>
As I know if you uploaded the same file.aar two times the axis2 server will display a fault
which telling you that service existed before.
About the changes in the file, you can see the wsdl of the uploaded file which telling you
about the service methods, protocol...etc.

On Mon, Jun 2, 2014 at 12:51 AM, Muhammad Imran <<>>
hello to everybody:-

I will put my questions into few steps :)
Step1: I uploaded a service named foo to axis2 server, lets say i used tomcat to do so. (but
it could be simply putting the .aar file)
Step2. I made some changes to the service foo (using eclipse or netbeans), compiled and build
a newer version (with the same name)
Step3: I upladed foo again to the axis2 server (lets say i used tomcat to do so).
Question: Is there any way to know that I uploaded foo two times to the axis2 server???
Moreover, Is there anyway to know that the schema of foo is changed, i.e., the second foo
contains additional methods?

I would like to know if there are any handlers or modules in Axis2 which i can write or configure
to answer the question..

any help would be really appreciated...

Thank you for your time and consideration.

Areeg Samir

Thank you for your time and consideration.

Areeg Samir

View raw message