The command prompt window executes the generated command.
Format:wsimport -s“src directory”-p< span style="font-size:12px">“The package name of the generated class”-keep “wsdl publishing address”
< p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Helvetica,Tahoma,Arial,sans-serif; font-size:14px; background- color:rgb(239,239,239)"> Example:
wsimport -s G:\workspace\webService\TheClient\src -p com.h yan.client -keep http://localhost:9001/Service/ServiceHello?wsdl
Description:
1) “src directory” address must not contain spaces< /p>
webservice development
web service is also called XML web service, It is a lightweight independent communication technology that can accept requests from other systems on the Internet or Intranet. The software services provided on the WEB through SOAP are described using WSDL files and registered through UDDI. The simple understanding is: webservice is a function placed on the server, everyone can call, and then return information (can span two projects). Just like we call Google’s webservice to do a simple search, just like calling a function, passing in a number of parameters, and then we can return the content retrieved by Google.
SOAP: simple object access protocol. It is the communication protocol of xml web service. When the user finds your WSDL description document through UDDI, he can call one or more operations in the web service you created through SOAP. SOAP is a specification for calling methods in the form of XML documents. It can support different low-level interfaces, such as HTTPS or SMTP.
wsdl: web service description language file is an xml document used to describe a group of SOAP messages and how to exchange these messages. In most cases, it is automatically generated and used by the software.
UDDI: universal description, discovery, and integration is a new project mainly for web service providers and users. Before a user can call a web service, he must determine which business methods are included in the service, find the called interface definition, and compile software on the server side. UDDI is a mechanism that guides the system to find the corresponding service based on the description document. UDDI uses the SOAP message mechanism to publish, edit, browse and find registration information. He uses xml format to encapsulate various types of data, and sends it to the registry or registry to return the required data.
1, c# version
(1) webservice development vs. Net platform used by It should be consistent with the platform deployed by IIS, otherwise an error will occur.
(2) Write webservice, generate and publish; when referencing the webservice, you can introduce web dll and use it in the program interface . To publish webservice (and start directory browsing), there must be an application corresponding to the same virtual directory added in IIS.
2, JAVA version
wsimport -s D:\Users\Workspaces\”MyEclipse 8.5″\TheClient -p com.client -keep http://localhost: 9001/service/ServiceHello
The command prompt window executes the generated command.
Format:wsimport -s“src directory”-p< span style="font-size:12px">“The package name of the generated class”-keep “wsdl publishing address”
< p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Helvetica,Tahoma,Arial,sans-serif; font-size:14px; background- color:rgb(239,239,239)"> Example:
wsimport -s G:\workspace\webService\TheClient\src -p com.hyan .client -keep http://localhost:9001/Service/ServiceHello?wsdl
Description :
1) “src directory” address must not contain spaces p>
2) span> Don’t miss the “wsdl publishing address”” ?ws dl “
Note that when executing this statement, the server section needs to be started, and you can test it in the browser through the above URL ,pass.