Recently, an application that uses. Net to call a WebService written in Java.ProgramProvide a file with the suffix "WSDL. the WSDL file generated in. NET is similar. I checked some information at first, knowing that I can compile this WSDL file into a dynamic library and call it directly, that is, generate a proxy, this is often used in the past. net's WebService description address for compilation seems to be almost the same, so I tried to write this, but it can basically be implemented.
The basic format is as follows:
Wsdl.exe/L: CS/N: nhws/out: C:/nhws. cs c:/isws. WSDL
Run the vs command line command to implement
Then, through communication, I also asked for the description address of the WSDL file, similar to the description address of. net, except that the file Suffix of Java is. JWS and. NET is. asmx.
Comparison
[Net] http: // 110.11.4.5/website1/service. asmx? WSDL
[Java] http: // ***. ***/website1/service? WSDL or http: // ***. ***/website1/service. JWS? WSDL
However, this is only my situation. I am not familiar with Java. the WebService address provided by Java is only one of its technologies. I don't know Java.
use. net can also call the Java address in many ways, basically with the call.. net addresses are the same.
(1) Add a WebService reference to the project. You can use the Wizard to complete the process.
(2) for ease of use, use the following two commands to compile the Java WebService description address into a dynamic library and use
A to generate a class file
wsdl.exe/L: CS/N: NWS/out: C:/NWS. CS http ://***. ***. **. **/website1/service? WSDL
B: Compile the class file into a dynamic library
CSC/Target: Library/out: "C: \ NWS. DLL "C: \ NWS. CS
the subsequent use is the same
but pay attention to the following two questions:
(1) Describe the final parameters of the address? WSDL is sometimes indispensable. It is best to add it, because what you ultimately need to compile is the WSDL file
(2)wsdl.exe is a tool provided by Microsoft, in the vs command, you can call it directly. Here, remember/N: testws, that is, testws, a namespace you define in/namespace: testws,