I changed the directory structure as:
Axis2WebWs
|
----src
| |
| ----org.ncc.server
| |
| ----Calculator.java
| ----ICalculator.java
|
---WebContent
|
----META-INF
|
----WEB-INF
|
-----lib (has all the jar folders from Axis2)
|
----web.xml
|
----services
|
----Calculator
|
----META-INF
|
----services.xml
In other words, I removed services.xml from WebContent\META-INF. Instead, I
created a new directory under WEB-INF as services\Calculator\META-INF and
placed the same services.xml in that.
After that, I re-deployed the EAR file. NO luck either. I see the same
result as faulty services. I can only see getVersion, does not see
Calculator.
mule_user wrote:
>
> I am new to Axis2, but familiar with Axis1. I am trying to see the service
> using the Axis2 admin console. I am unable to see the service. That can
> mean many things. Any suggestion will be appreciated. Following are the
> steps I ahve taken:
>
> 1. Deployed axis2.war. As such, I can successfully see
> http://localhost:9081/axis2/services/listServices But obviously, the new
> service created by me is not in that list.
>
> 2. Created a Java web project and deployed it in the same server where
> axis2 admin application was deployed. The structure of the Java project
> is:
>
> Axis2WebWs
> |
> ----src
> | |
> | ----org.ncc.server
> | |
> | ----Calculator.java
> | ----ICalculator.java
> |
> ---WebContent
> |
> ----META-INF
> | |
> | ----services.xml
> |
> ----WEB-INF
> |
> -----lib (has all the jar folders from Axis2)
> |
> ----web.xml
>
> ////////////
> package org.ncc.server;
>
> public class Calculator implements ICalculator{
> public int add(int a, int b) {
> return a + b;
> }
> }
> /////////////
> package org.ncc.server;
>
> public interface ICalculator {
> int add (int x, int y);
> }
> //////////////////
> <service name="Calculator" scope="application">
> <description>
> Simple Calculator Service
> </description>
>
> <parameter name="ServiceClass">org.ncc.server.Calculator</parameter>
>
> <operation name="add">
> <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
> </operation>
>
> </service>
> ////////////////
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> <display-name>
> Axis2WebWs</display-name>
> <servlet>
> <display-name>Apache-Axis Servlet</display-name>
> <servlet-name>AxisServlet</servlet-name>
>
> <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>AxisServlet</servlet-name>
> <url-pattern>/servlet/AxisServlet</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>AxisServlet</servlet-name>
> <url-pattern>*.jws</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
> <servlet-name>AxisServlet</servlet-name>
> <url-pattern>/services/*</url-pattern>
> </servlet-mapping>
> </web-app>
> //////////////////////////
> I create a EAR file for this project and deploy it. Axis2WebWs gets
> deployed successfully. I am not (nor do want to) use Axis2 Admin console
> for deploy. I was hoping that the url below will show my service add:
> http://localhost:9081/axis2/services/listServices
>
> Instead it only lists getVersion method from Axis2 Admin console.
>
> What am I missing?
>
> Even though I do not want to deploy it using Axis2 Admin console, but for
> troubleshooting purposes, I changed ear file to aar file and wanted to
> upload that aar file using Axis2 Admin console. When I looked for the
> service, it mentioned faulty service. I said that cannot find
> services.xml.
>
> Any suggestion will be appreciated. Again, I want to deploy the EAR file
> using Admin console of the app server only (will be scripted eventually),
> instead of relying on Axis2 Admin console.
>
>
>
--
View this message in context:
http://www.nabble.com/New-to-Axis2---Unable-to-see-service-tp25928644p25963099.html
Sent from the Axis - User mailing list archive at Nabble.com.