How to call C # webservice from java

Is there a way to call C # webservice from java? I have a web service that was written in C # and I want to use this web service in java. If there is a way, let me know.

Relations Altaico

+3
source share
4 answers

Web service is just a small program that generates some text, which is then sent by HTTP. The text can be using Html or Xml (or plain text). The language in which the small program is written is completely irrelevant, since all your Java client will see in the text provided by Http.

, -, Java .

+4

- - . - # , - Java. WSDL, .

- # (.NET) WSDL URL-:

http://[web_service_virtual_path].asmx?WSDL
+2

. - java 1.6, jar.

URL- WSDL. URL- HTTP wsdl . @Germán , :

http://[web_service_virtual_path].asmx?WSDL

- wsimport. wsimport Java 1.6, .

Java wsdl:

wsimport -s src -keep -Xnocompile http://[web_service_virtual_path].asmx?WSDL

java- src .java .

( , , - , , -. wsimport , )

- ( #), , . -, .

+2

The language in which the web service is written should be out of date - this is part of the use of web services. In general, yes, you can call webservices with Java. One library that can help you is Apache Axis .

+1
source

Source: https://habr.com/ru/post/1762291/


All Articles