Java Axis Web 服务存根抛出 NoEndPointException
我正在使用 axis 的网络服务。我从我调用的任何 Web 服务方法中收到 NoEndpointException。
它来自这个生成的代码。
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
所以这似乎表明我没有正确设置端点。
这就是我实例化存根的方式:
MyService_ServiceLocator myService_ServiceLocator = new MyService_ServiceLocator();
MyService_PortType webservice = new MYServiceSOAPStub(myService_ServiceLocator);
我认为这有问题。我需要传入网络服务地址吗?它似乎已经集成到存根中。
I am consuming a web-service with axis. I am getting a NoEndpointException from any webservice method I call.
It's coming from this generated code.
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
So it seems to suggest I haven't set up the endpoint correctly.
This is how I've instantiated the stubs:
MyService_ServiceLocator myService_ServiceLocator = new MyService_ServiceLocator();
MyService_PortType webservice = new MYServiceSOAPStub(myService_ServiceLocator);
I assume something is wrong with this. Do I need to pass in the webservice address? It already appears to be integrated into the stubs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能取决于 Axis 版本(我使用的是 1.4 版),但我建议您使用定位器中的 getYourPortType() 方法。您不必提供网络服务 URL(因为它存储在生成的文件中)。
使用您的示例,它会是这样的:
It might depends on Axis version (I'm using version 1.4) but I suggest you to use the getYourPortType() method from the locator. You won't have to give your webservice URL (as it is stored in the generated files).
Using your sample it would be something like that: