wood burning stoves
The moose likes Web Services and the fly likes  Axis2-1.4 help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Web Services
Bookmark " Axis2-1.4 help" Watch " Axis2-1.4 help" New topic

Axis2-1.4 help

Deepti Guduru

Joined: May 22, 2008
Posts: 12
Hello All,
Iam new to webservices.Iam using axis21.4 and apache tomcat application server. Iam trying to create a wsdl file for a simple program.Program which iam trying to create wsdl file is:

package org.apache.axis2.training;
import java.io.Serializable;
public class StudentWebService implements Serializable {
StudentService service = new StudentService();
public void registerstudent(Student student)

public Student getStudent(String name) throws StudentNotFoundException {

return service.getStudent(name);

public Student[] getStudents() {
return service.getStudents();
Now my problem is : Iam using java2wsdl command to create a wsdl file.
Iam using the command like this:

C:\workspace275\StudentService>c:\axis2-1.4\bin\java2wsdl.bat -o resources -of StudentWebService.wsdl -sn StudentWebService -cp ./bin -st rpc -u encoded -cn org.apache.axis2.training.StudentWebService

Iam able to create a wsdl file with a warning "Unable to generate EPR for transport : http"

Then iam trying to create a servicearchiver file(.aar) file. Iam including all the javaclassfiles(which is in /bin folder), services.xml file(which is in meta-inf folder) and the wsdl file(which is in resources folder) and all the axis2 jars. Iam using the following command to generate a .aar file

C:\workspace275\StudentService>jar cmvf ./src/META-INF/MANIFEST.MF StudentWebService.aar c:/axis2-1.4/lib/*.jar ./src/META-INF/services.xml ./resources/StudentWebService.wsdl ./bin/org/apache/axis2/training/*.class

iam able to create a .aar file , but when iam dumping this .aar file into tomcat/webapps/axis2/web-inf/services folder .It is giving an exception like this:
[ERROR] The StudentWebService.aar service, which is not valid, caused The services.xml file cannot be found for the service: C:\Program Files\Apache Software Foundation\Apache Tomcat6.0.14\webapps\axis2\WEB-INF\services\StudentWebService.aar
org.apache.axis2.deployment.DeploymentException: The services.xml file cannot be found for the service: C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\webapps\axis2\WEB-INF\services\StudentWebService.aar
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServ
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.ja
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngin
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoL
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListe
at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: org.apache.axis2.deployment.DeploymentException: The services.xml fil
e cannot be found for the service: C:\Program Files\Apache Software Foundation\A
pache Tomcat 6.0.14\webapps\axis2\WEB-INF\services\StudentWebService.aar
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServ
... 12 more
[INFO] org.apache.axis2.deployment.DeploymentException: The services.xml file ca
nnot be found for the service: C:\Program Files\Apache Software Foundation\Apach
e Tomcat 6.0.14\webapps\axis2\WEB-INF\services\StudentWebService.aar

Actually i tried creating .aar file(with the above jar command) without using MANIFEST.MF .But Still it is giving the same error. I thought when we run a jar command it will automaticcaly have default manifest.mf and giving the error so i have written manifest.mf file like the below and invoked the above jar command whch iam using to create .aar file

Manifest-Version: 1.0
Created-By: 1.3.1_01 (Sun Microsystems Inc.)
Main-Class: /src/META-INF/services.xml

Please somebody help me , what could be the reason for the error,why it is not recognising services.xml file. and why the warning unable to generate epr :http is coming

Deepti Guduru

Joined: May 22, 2008
Posts: 12
Can anyone help me on my problem please
Dez Max
Ranch Hand

Joined: Oct 01, 2002
Posts: 41
Did you solve this issues :
" [WARN] Unable to generate EPR for the transport : http"

I too am getting this error while trying to generate WSDL given a java service class using JAVA2WSDL in Axis2.

Need your help in this regard.

Nazeer Sye

Joined: Mar 14, 2002
Posts: 9
Deepthi Buddhiraju wrote:Can anyone help me on my problem please

Try to deploy using Axis Admin rather manual putting the .aar files


Nazeer <br />SCJP 1.2<br />SCJP 1.4<br />SCWCD 1.4
I agree. Here's the link: http://aspose.com/file-tools
subject: Axis2-1.4 help
It's not a secret anymore!