[英]How to Call java web service from asp.net?
When i call java web service from asp.net. 当我从asp.net调用Java Web服务时。 it shows error 它显示错误
java.lang.reflect.invocationtargetexception.
My code : 我的代码:
WebReference Rs = new WebReference();
string GetXMl = Rs.getPosition("dd/mm/yyyy", "dd/mm/yyyy");
You must instanciate your proxy class, but not your server class 您必须实例化代理类,但不能实例化服务器类
you can follow these steps 您可以按照以下步骤
1 Go to Solution Explorer window. 1进入解决方案资源管理器窗口。
2 Right click on the project. 2右键单击项目。 A context menu pops up. 弹出一个上下文菜单。
3 Click the Add Web Reference menu. 3单击“添加Web参考”菜单。 The Add Web Reference dialog opens. 将打开“添加Web参考”对话框。
4 Copy and paste the WSDL URL from our web brower's address bar to Add Web Reference dialog's address bar and press go button . 4从Web浏览器的地址栏中复制并粘贴WSDL URL,将其添加到Add Web Reference对话框的地址栏中,然后按go按钮。
We can see all the methods names of our web service. 我们可以看到我们Web服务的所有方法名称。
5 using yourNamespace; 5使用yourNamespace;
6 Next, create the object of the web reference. 6接下来,创建Web参考的对象。
yourTypeProxy proxy = new yourTypeProxy();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.