There must be RAD or WSTK (here only saying the former), if there is no test environment in the RAD, you need to install the WAS6 new web project and remove the Axis related things: 1. All Axis related configuration files, and will Web.xml Axis's servlets are removed. 2. Remove the AXIS related library. 3, only all source code and other configurations (such as filters, log4j, etc.) 4, compile this project. 5, come to the classpath of the project. Such as WEB-INF / CLASSES, running as follows (can be made of BAT file)
SET RADHOME = C: /IBM/RATIONAL/SDP/6.0/binset WAS_HOME = D: / Program / IBM / WebSphere / AppServerse Path =% RADHOME%;% Path% Call setupenv.batcall cfrbean2webservice.bat -verbose -cp. -project WashostService -genmain WeatherServiceClient -ClientType J2se -host localhost: 9080 com.travelsky.hostservice.hostservice
Note: If there is no RAD's WAS6 test environment, set WAAN2WEBSERVICE.BAT and settings in AETUpenv.bat in Rad / BIN to your own WAS installation directory (if RAD does not load the WAS test environment.) CFRBean2webservice is I changed.
In this way, it will generate a WashostServcie directory in this directory. There is a good EAR package, but it is necessary to remove the WAR inside to modify: 1. Copy the Spring, Log4j configuration file to the corresponding directory, and you customize yourself Other profiles. 2. Add some part of the original web.xml correlation filter to the corresponding part of the existing WAR (because only WebService related servlets in the newly generated, add other dependency libraries you need under Web-Inf / LIB.
Repacking, release (the same as the ordinary EAR, no difference)
Client:
AXIS: WSDL2JAVA to run Axis Generate: WSDL2JAVA D: /XX.WSDL To run the client only needs axis.jar.
WAS: Use the RAD or WSTK tools WSDL2JAVA to generate the corresponding individual account code, or generate together when generating the server, here, mainly Bean2WebService.bat runs the client required to run the client at RAD / BIN: Wes_Home / lib: J2EE.jar, WebService.jarwes_Home / InstalledChannels: Channel.http.jar, Channel.tcp.jaribm_jre / lib: xml.jar
The following is the Bean2WebService command output:
SET RADHOME = C: /IBM/RATIONAL/SDP/6.0/binset WAS_HOME = D: / Program / IBM / WebSphere / AppServerse Path =% RADHOME%;% Path% Call setupenv.batcall cfrbean2webservice.bat -verbose -cp. -project washostservice -genMain WeatherServiceClient -clientType J2SE -host localhost: 9080 com.travelsky.hostservice.HostService the RAD / Bean2WebService.bat and set up the next set aetupenv.bat the BIN WAS_HOME change your WAS installation directory (if not installed RAD WAS test environment.)
D: / WashostService / WEB-INF / CLASSES> Runbean2ws
D: / WashostService / Web-INF / CLASSES> SET RADHOME = C: /IBM/RATIONAL/SDP/6.0/bin
D: / WashostService / Web-INF / CLASSES> SET WAS_HOME = D: / Program / IBM / WebSphere / AppServer
D: / WashostService / Web-INF / CLASSES> SET PATH = C: /IBM/RATIONAL/SDP/6.0/bin; D: / Program / CTEX / LOCALT ~ 1 / CCT / BIN; D: / Program / CTEX / TEXMF / miktex/bin;d:/program/ctex/gs/gs7.06/bin ;d:/program/ctex/winedt;c:/program files / thinkpad / utilities; c: / windows / system32; c: / windows ; C: / WINDOWS / SYSTEM32 / WBEM; C: / Program Files / ATI Technologies / ATI Control Panel; C: / IBMTools / Python22; C: / Program Files / PC-DOCTOR for Windows / Services; C: / MySQL / BIN ; C: / Program Files / RacerPro-1-8-1 /; C: /J2SDK1.4.2_04/bin; C: / Program Files / IDM Computers / UltraEdit-32; C: /IBM/RATIONAL/SDP / 6.0/ bin
D: / WashostService / Web-INF / CLASSES> CALL setupenv.batibm_rad_bin = c: /ibm/RATIONAL/SDP/6.0/bin/ is being created: WashostService ... removed D: / WashostService / Web-INF / CLASSES All existing classes in the / washostservice / web-inf / class / under directory are generating a service endpoint interface ...
Generating WSDL: WSWS3477I: specific binding properties of {MIMEStyle = WSDL11, use = literal, debug = false, style = document, bindingName = HostService, encodingStyle = http: //schemas.xmlsoap.org/soap/encoding/, verbose = true, wrapped = true, portTypeName = HostService, servicePortName = HostService, intfNS = http: //hostservice.travelsky.com, location = http: // localhost: 9080 / washostservice / services / HostService, soapAction = DEFAULT} WSWS3010I: information: generating portType {http://hostservice.travelsky.com} HostService Could_Not_Reflect_Fields_ERROR_ WSWS3010I:!! information: generating a message {http://hostservice.travelsky.com} serviceRequestWSWS3010I: information: generating type / element {http: // input .hostservice.travelsky.com} HostRequestWSWS3010I: information: generating a message {http://hostservice.travelsky.com} serviceResponseWSWS3010I: information: generating type / element {http://output.hostservice.travelsky.com} HostResponseWSWS3010I: information: generating binding {http://hostservice.travelsky.com} HostServiceSoapBindingWSWS3010I: information: generating binding {http://hostservice.travelsky.com} HostServiceSoapBindingWSWS3010I: information: generating service {http: // hostser vice.travelsky.com} HostServiceServiceWSWS3010I: Information: generating port HostService generate server-side files: WSWS3185I: Information: XML file being analyzed: D: /washostservice/WEB-INF/classes/washostservice/WEB-INF/wsdl/HostService.wsdlRetrieving document At 'file: / d: /washostservice/web-inf/classes/washostservice/web-inf/wsdl/HostService.wsdl'.wsws3282i: Information: File: // D: / WashostService / Web-INF / CLASSES / WashostService / Com / Travelsky / HostService / Input / HostRequest.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/com/travelsky/hostservice/input/hostRequest_helper.java.
WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/com/travelsky/hostservice/input/hostrequest_ser.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/com/travelsky/hostservice/input/hostRequest_Desel.java. WSWS3282i: Information: File: // D: /washostService/web-inf/classes/washostservice/com/travelsky/hostservice/output/hostresponse.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/com/travelsky/hostservice/output/hostresponse_helper.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/com/travelsky/hostservice/output/hostresponse_ser.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/com/travelsky/hostservice/output/hostResponse_Desel.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/com/travelsky/hostservice/hostService.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/com/travelsky/hostservice/hostservicesoapbindingImpl.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/web-inf/webservices.xml. WSWS3282i: Information: File: // D: /washostService/web-inf/classes/washostservice/web-inf/ibm-webservices-bnd.xmi. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/web-inf/ibm-webservices-ext.xmi. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/web-inf/hostservice_mapping.xml. WEBSERVICES.XML ...
D: /WASHOSTSERVICE/Web-inf/Classes/washostService/web-inf/wsdl/hostService.wsdl Use the context root WashostService to add a web module has successfully generated the web service archive "File: / D: / WashostService / Web-INF / Classes / WashostService / WashostServiceEar.ear. Generate client-end file: WSWS3185i: Information: XML file is being analyzed: d: /washostservice/web-inf/Classes/washostService/web-inf/wsdl/hostservice.wsdlretrieving document at 'file: / d: / WashostService / web- INF / CLASS / WSDL / HOSTSERVICE.WSDL'.WSWS3282I: Information: File: // D: / WashostService / Web-INF / CLASSES / WASHOSTSERVICE / Client-Side / Com / TravelSky / HostService / INPUT / HOSTREQUEST.JAVA. WSWS3282i: Information: File: // d: /washostservice/web-inf/classe/washostservice/client-side/com/travelsky/hostservice/input/hostrequest_helper.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/input/hostRequest_ser.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/input/hostRequest_Desel.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/output/hostresponse.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/output/hostresponse_helper.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/output/hostresponse_ser.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/output/HostResponse_Deseer.java.
WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/hostservice.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/hostservicesoapbindingstub.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/hostServiceService.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/hostserviceServiceLocator.java. WSWS3282i: Information: File: // d: /washostservice/web-inf/classes/washostservice/client-side/com/travelsky/hostservice/hostServiceServiceInformation.java. Creating a client-side building script ...
Creating a main class ... all completed.