找不到与 WSDD 操作匹配的 Java 操作
我为以下代码创建了一个 Web 服务,但出现异常:
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;
}
}
有谁知道为什么会发生这种情况?而且 wsdl 也不是正在生成。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现了错误。
只需将“AndrQues”更改为“andrQues”,程序就可以正常运行。
I found the error.
Just need to change the "AndrQues" to "andrQues" and program runs fine.
您的方法名称有问题,请确保您的方法名称拼写正确。请注意首先使用您的方法的事情,后者是小写的意思。
只是你需要将“AndrQues”更改为“andrQues”,因为默认情况下网络服务将名称转换为小写。
这会有所帮助..
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..
就我而言,缺少调用 WSSoapHttpBindingImpl.java 的接口 WSPort.java 的入口。
In my case, entry into the interface WSPort.java invoking WSSoapHttpBindingImpl.java was missing.