Ana Belén Antón Gironés wrote:
Good morning,
I am new in axis and I am a bit lost. Sorry. I would like to get your help, please. I would like make some as easy as build a service from a Java Object. I have followed the user guide in the apache org web page but the service is remarked as "Faulty services" and I have got this error message: Error: org.apache.axis2.deployment.DeploymentException: Invalid service. META-INF directory not found. at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:274) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:64) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:137) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:571) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:141) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:318) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:220) at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:312) at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64) at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71) at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source) Caused by: org.apache.axis2.deployment.DeploymentException: Invalid service. META-INF directory not found. at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:262) ... 12 more For that, I have created this "services.xml": <service name="Sum" scope="application">
    <description>
      Suma
    </description>
    <messageReceivers>
        <messageReceiver
            mep="http://www.w3.org/2004/08/wsdl/in-only";
    class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
        <messageReceiver
            mep="http://www.w3.org/2004/08/wsdl/in-out";
    class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>
    <parameter name="ServiceClass">
        org.ana.web.services.Sum
    </parameter>
</service> and this directory structure (in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services)
 - Sum
   - META-INF
     - services.xml
   - org
     - ana
       - web
         - services
- Sum.class -Sum.java
My Sum.java is as simple as:

*package* org.ana.web.services;

*public* *class* Sum {

*public* String getSum (*int* a, *int* b){

Integer c = a+b;

*return* ("The operation is: "+a+" + "+b+" = "+c);

}

}

Thank you very much in advance and best regards,
Ana Belen.
Hi Ana,

I tried your exact code and directory structure on WindowsXP, Apache Tomcat 5.5.20, using the Axis2 1.3 war. And it worked without a problem.

Can you please tell us which version of Axis2 you are using? If you are using an older version, I suggest you download the Axis2 1.3 release and try.

You can also try creating a service archive with an .aar extension using the Java jar tool, and deploying that instead of the exploded directory structure.

Best of luck!
Suran.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to