简体   繁体   中英

How to Call java web service from asp.net?

When i call java web service from asp.net. 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.

2 Right click on the project. A context menu pops up.

3 Click the Add Web Reference menu. The Add Web Reference dialog opens.

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 .

We can see all the methods names of our web service.

5 using yourNamespace;

6 Next, create the object of the web reference.

yourTypeProxy proxy = new yourTypeProxy();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM