无法为 WSDD 操作找到匹配的 Java 操作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5935437/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Couldn't find a matching Java operation for WSDD operation
提问by penchoco
I hv created a web service for the following code but am getting an exception:
我为以下代码创建了一个 Web 服务,但出现异常:
org.apache.axis.InternalException: java.lang.Exception: Couldn't find a matching Java operation for WSDD operation "andrQues" (0 args)" on invoking the function.
org.apache.axis.InternalException: java.lang.Exception: 在调用该函数时,找不到与 WSDD 操作“andrQues”(0 args)“匹配的 Java 操作。
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.
有谁知道为什么会发生?也没有生成 wsdl。
回答by penchoco
I found the error. Just need to change the "AndrQues" to "andrQues" and program runs fine.
我发现了错误。只需要将“AndrQues”更改为“andrQues”,程序就可以正常运行。
回答by Krishna
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.
只是您需要将“AndrQues”更改为“andrQues”,因为默认情况下,Web 服务将名称设为小写。
this will help..
这会有所帮助..
回答by AatmanKothari
In my case, entry into the interface WSPort.javainvoking WSSoapHttpBindingImpl.javawas missing.
在我的例子中,调用WSSoapHttpBindingImpl.java的接口WSPort.java 的入口丢失了。
public interface <classname> extends java.rmi.Remote
{
public <methodname>(<params>) throws java.rmi.RemoteException;
}