axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Néstor Boscán <nesto...@gmail.com>
Subject Error with Embedded POJO Web Service
Date Wed, 21 Sep 2011 03:33:28 GMT
Hi

I created a simple POJO class based on the Weather sample using Axis 1.6.1
but I made it embedded:

1.- I added the configuration in the web.xml file:

<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
    <servlet>
        <servlet-name>AxisServlet</servlet-name>
        <display-name>Apache-Axis Servlet</display-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>/services/*</url-pattern>
    </servlet-mapping>
</web-app>

2.- I created the services.xml file:

<service name="PruebaService" scope="application">
    <description>
        Prueba Service
    </description>
    <messageReceivers>
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"

 class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>
    <parameter name="ServiceClass">prueba.PruebaBf</parameter>
</service>

3.- Created a simple java file:

public class PruebaBf {
    public PruebaBf() {
    }

    public String procesar(String prueba) {
        return prueba;
    }
}

4.- When I try to get the WSDL file using the URL http://host:port
/app/services/PruebaService?WSDL

I get:

<soapenv:Reason
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Text
xml:lang="en-US">wrong number of arguments</soapenv:Text></soapenv:Reason>

In the console I get:

java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:178)
at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)

So from what I am understanding it looks like it's not generating the WSDL
but it's executing the web service. How do I access the WSDL file in POJO
generated web services?

Regards,

Néstor Boscán
There

Mime
View raw message