penchoco
penchoco

Reputation: 301

Couldn't find a matching Java operation for WSDD operation

I hv created a web service for the following code but am getting an exception:

org.apache.axis.InternalException: java.lang.Exception: Couldn't find a matching Java operation for WSDD operation "andrQues" (0 args)" on invoking the function.

public class Ques {
    public String[] AndrQues(){
        String ques[] = {"name??", "age??", "grade??"};
        return ques;
    }

}

Does anyone know why its occuring? Also the wsdl is not getting generated.

Upvotes: 5

Views: 15592

Answers (3)

AatmanKothari
AatmanKothari

Reputation: 113

In my case, entry into the interface WSPort.java invoking WSSoapHttpBindingImpl.java was missing.

public interface <classname> extends java.rmi.Remote 
{
   public <methodname>(<params>) throws java.rmi.RemoteException;
}

Upvotes: 0

Kishan Bheemajiyani
Kishan Bheemajiyani

Reputation: 3439

There is something wrong with your method name make sure that you have spelled your method Name correct. take care about the thing that use your method first latter in small means lower case.

just u need to change "AndrQues" to "andrQues" because by Default the web-services taking name into the lower case.

this will help..

Upvotes: 4

penchoco
penchoco

Reputation: 301

I found the error. Just need to change the "AndrQues" to "andrQues" and program runs fine.

Upvotes: 11

Related Questions