The new company's first job is to invoke the WebService interface written by the previous. NET program in the Java environment.
The interface returns a JSON-formatted data
Because all said WebService cross-language, originally thought is a simple rough work, found that is not the case, the. NET generated WSDL file format Some tags are not known in the Java environment, need to re-edit the next WSDL file.
First, unzip the downloaded CXF the latest version of the compressed package, DOS window down to the Bin directory, and then execute
Wsdl2java-p ws HTTP://192.168.1.137:8007/CIS_SERVER.ASMX?WSDL
Found an error Wsdltojava Error:thrown by jaxb:undefined Element declaration ' S:schema '
The reason is that Java parsing WSDL does not recognize <s:element ref= "S:schema"/><s:any/>
The workaround is to open the http://192.168.1.137:8007/CIS_Server.asmx?wsdl on the browser
The ctrl+s is then saved locally, replacing the <s:element ref= "S:schema"/><s:any/> In the local WSDL with <s:any minoccurs= "2" maxoccurs= "2"/ >
Execution Wsdl2java points to a locally saved WSDL file to generate the corresponding program file
Java CXF calls the WebService interface written by. Net