0

I just want to start by apologizing for my not so well english. I am working on Eclipse IDE for Enterprise Java Developers version 4.17.0 , i am also using Apache Tomcat v9.0 and axis2-1.7.9. I am trying to execute a simple sum function on my client web service but i ran into this error:

package org.apache.ws.axis2;

import java.rmi.RemoteException;

import org.apache.axis2.AxisFault;
import org.apache.ws.axis2.CalculStub.Somme;

public class TesrClient {

    public static void main(String[] args) throws RemoteException {
        // TODO Auto-generated method stub
        CalculStub stub = new CalculStub();
        Somme somme0 = new Somme();
        somme0.setX(10);
        somme0.setY(20);
        int res = stub.somme(somme0).get_return();
        System.out.println("la somme est : " + res);
    }

}

This is the console log :

Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
    The type CalculStub.Somme must implement the inherited abstract method ADBBean.serialize(QName, XMLStreamWriter)

    at org.apache.ws.axis2.CalculStub$Somme.serialize(CalculStub.java:823)
    at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:49)
    at org.apache.axiom.om.impl.common.serializer.push.stax.StAXSerializer.serializePushOMDataSource(StAXSerializer.java:53)
    at org.apache.axiom.om.impl.common.serializer.push.Serializer.serialize(Serializer.java:293)
    at org.apache.axiom.om.impl.common.AxiomSourcedElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomSourcedElementSupport$org_apache_axiom_om_impl_intf_AxiomSourcedElement$internalSerialize(AxiomSourcedElementSupport.aj:434)
    at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:1)
    at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj:362)
    at org.apache.axiom.om.impl.llom.OMElementImpl.ajc$interMethodDispatch2$org_apache_axiom_om_impl_common$serializeChildren(OMElementImpl.java:1)
    at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj)
    at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj:519)
    at org.apache.axiom.om.impl.llom.OMElementImpl.defaultInternalSerialize(OMElementImpl.java:1)
    at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj)
    at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$internalSerialize(AxiomElementSupport.aj:513)
    at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:1)
    at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj:362)
    at org.apache.axiom.om.impl.llom.OMElementImpl.ajc$interMethodDispatch2$org_apache_axiom_om_impl_common$serializeChildren(OMElementImpl.java:1)
    at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeChildren(AxiomContainerSupport.aj)
    at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj:519)
    at org.apache.axiom.om.impl.llom.OMElementImpl.defaultInternalSerialize(OMElementImpl.java:1)
    at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethodDispatch1$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$defaultInternalSerialize(AxiomElementSupport.aj)
    at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$internalSerialize(AxiomElementSupport.aj:513)
    at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:159)
    at org.apache.axiom.om.impl.common.AxiomContainerSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomContainerSupport$org_apache_axiom_om_impl_intf_AxiomContainer$serializeAndConsume(AxiomContainerSupport.aj:319)
    at org.apache.axiom.om.impl.llom.OMElementImpl.serializeAndConsume(OMElementImpl.java:1)
    at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:74)
    at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:85)
    at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
    at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.executeMethod(HTTPSenderImpl.java:872)
    at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:212)
    at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
    at org.apache.ws.axis2.CalculStub.somme(CalculStub.java:178)
    at org.apache.ws.axis2.TesrClient.main(TesrClient.java:16)

What seems to be the problem ?

EDIT : This is CalculStub.java file, it's too long so i had to paste in an online clipboard : https://cl1p.net/calculstub

Aloulou123
  • 3
  • 1
  • 6

1 Answers1

0

The key is the following at the top of the stack trace:

The type CalculStub.Somme must implement the inherited abstract method ADBBean.serialize(QName, XMLStreamWriter)

You haven't shown us the "CalculStub" class, but I'm going to guess that it extends the "ADBBean" class, either directly or indirectly.

In Java programming, concrete classes that can be used to create instances (using the "new" operator) have to have implementations of any abstract methods. The error message says that the "CalculStub" class needs to have a concrete implementation of the "serialize" method, but it does not have one.

David M. Karr
  • 14,317
  • 20
  • 94
  • 199
  • I just add the CalculStub.java file , can you take a look at it ? – Aloulou123 Nov 15 '20 at 08:47
  • Sorry, I'm not able to see that. Our firewall blocks that site. There is no need to paste the entire file. You should look at the top of the class declaration, which provides the class name. It will likely extend a class named "ADBBean". You need to look at that class. I think you may have more problems here than we can help you with. – David M. Karr Nov 15 '20 at 16:09