axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nickolay Kutsyy" <n.p.kut...@gmail.com>
Subject Re: AxisFault: The ServiceClass object does not implement the required method in the following form: OMElement {0}(OMElement e)
Date Sat, 21 Apr 2007 16:07:20 GMT
Hi,

Please, find project attached to this mail.
There are client and service source. Also ant build file and already created
.aar and wsdl. Using build.xml you can create .aar and wsdl.
Maybe I wrote not enough information about my problem. Please fill free for
questions.
I still cannt solve it.

I'm using last nightly build of Axis2, Tomcat 5.0.27.**

Please, help.

Best regards,
Nickolay.

On 20/04/07, Nickolay Kutsyy <n.p.kutsyy@gmail.com> wrote:
>
> Hi guys,
>
> I have a problem with integrating Axis2 with Spring. Deploy on tomcat is
> successful, but then I'm running client in line stub.getUsers("user1")  I
> have got exception
> org.apache.axis2.AxisFault : The ServiceClass object does not implement
> the required method in the following form: OMElement {0}(OMElement e)
>     at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(
> Utils.java:434)
>     at org.apache.axis2.description.OutInAxisOperationClient.send (
> OutInAxisOperation.java:373)
>     at org.apache.axis2.description.OutInAxisOperationClient.execute(
> OutInAxisOperation.java:294)
>     at com.company.od.OrderingDashboardStub.getUsers(
> OrderingDashboardStub.java:195)
>     at client.TestSpringClient.main(TestSpringClient.java:21)
>     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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
>
> Any ideas?
> I can attach project's source.
>
> Thanks.
> Nickolay Kutsyy.
>
>
> This is my interface of web service and beans:
>
> public interface OrderingDashboard extends Remote {
>     String[] getOEMs() throws RemoteException;
>
>     UserWS[] getUsers(String oem) throws RemoteException;
>
>     VehicleWS[] getVehicles(String oem) throws RemoteException;
>
>     StateWS[][] getStates(String oem) throws RemoteException;
>
>     void setState(String oem, UserWS user, VehicleWS vehicle, StateWS
> state) throws RemoteException;
> }
>
> package com.company.od.entity;
> import java.io.Serializable;
>
> public class UserWS implements Serializable {
>     private String name;
>     private String login;
>     private String group;
>     private int index;
>     private String oem;
>     private static final long serialVersionUID = -828677323337134339L;
>
> /// there're setters and getters
> }
>
> package com.company.od.entity;
> import java.io.Serializable;
> public class StateWS implements Serializable {
>     private int success;
>     private int failed;
>     private int corrected;
>     private int audited;
>     private String assigned;
>     private static final long serialVersionUID = -1475028207364092029L;
> /// there're setters and getters
> }
>
> package com.company.od.entity;
> import java.io.Serializable;
> public class VehicleWS implements Serializable {
>     private String name;
>     private int index;
>     private String oem;
>
>     private static final long serialVersionUID = 1074575419037672267L;
> /// there're setters and getters
> }
>
>
> and client:
> package client;
>
> import com.company.od.OrderingDashboardStub ;
> import org.apache.axis2.AxisFault;
>
> import java.rmi.RemoteException;
> public class TestSpringClient {
>     public static void main(String[] args) {
>         try {
>             OrderingDashboardStub stub =
>                     new OrderingDashboardStub("
> http://localhost:8080/axis2/services/OrderingDashboardSpring");
>             OrderingDashboardStub.UserWSArray userWSArray = stub.getUsers("515");
> // There' re exception org.apache.axis2.AxisFault: The ServiceClass object
> does not implement the required method in the following form: OMElement
> {0}(OMElement e)
>             OrderingDashboardStub.UserWS[] userWSs = userWSArray.getValue
> ();
> ///        ....
>         } catch (AxisFault axisFault) {
>             axisFault.printStackTrace();
>         } catch (RemoteException e) {
>             e.printStackTrace();
>         }
>     }
> }
>
>
>
> and META-INF/services.xml
> <serviceGroup>
>     <!-- Invoke SpringInit on server startup and shutdown -->
>     <service name="OrderingDashboardSpring" class="
> com.company.od.SpringInit">
>         <description>
>             simple spring example - inside the AAR
>         </description>
>         <!-- need the TCCL param when using spring inside the AAR -->
>         <parameter name="ServiceTCCL" locked="false">composite</parameter>
>         <parameter name="ServiceObjectSupplier" locked="false">
>
> org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier
>         </parameter>
>         <parameter name="SpringBeanName"
> locked="false">orderingDashboardWebService</parameter>
>         <operation name="getOEMs">
>             <messageReceiver class="
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>         </operation>
>         <operation name="getUsers">
>             <messageReceiver class="
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver "/>
>         </operation>
>     </service>
> </serviceGroup>
>
> and applicationContext.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "
> http://www.springframework.org/dtd/spring-beans.dtd">
>
> <beans>
>     <!-- Configure spring to give a hook to axis2 without a ServletContext
> -->
>       <bean id="applicationContext"
>         class="
> org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder" />
>
>     <!-- Axis2 Web Service, but to Spring, its just another bean that has
> dependencies -->
>     <bean id="orderingDashboardWebService" class="
> com.company.od.OrderingDashboardWebService">
>         <property name="dashboardAPI" ref="orderingDashboardAPI"/>
>     </bean>
>
>     <bean id="orderingDashboardAPI" class="
> com.company.od.api.OrderingDashboardAPIImpl">
>         <property name="message" value="Hello world"/>
>     </bean>
>     <!-- just another bean / interface with a wired implementation, that's
> injected by Spring
>              into the Web Service -->
> </beans>
>



-- 
Nickolay Kutsyy,
Best regards.

Mime
View raw message