Changeset 3941
- Timestamp:
- 23/05/08 12:18:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI01-discovery/trunk/ws-Discovery2/readme.txt
r2995 r3941 2 2 ------------ 3 3 4 Server Side: 5 Instructions for building & deploying Axis2 web service archive (DiscoveryService.aar) 4 NB, completing the build here assumes you have both apache axis2 and ant installed. The AXIS2_HOME environment variable 5 should be set to point to the top level directory of the axis2 install. 6 6 7 1. Run WSDL2Java to generate skeleton code and XMLBeans for data binding 8 (In srcgen directory) 9 %AXIS2_HOME%\bin\wsdl2java -ss -sd -d xmlbeans -uri ..\wsdl\Discovery.wsdl -o . -p ndg.services.discovery 7 The build file, \srcgen\buildDiscovery.xml, now includes targets to run the WSDL2Java code generation. Running the build 8 with no parameters, e.g.: 10 9 11 2. Build server side code (DiscoveryService.aar) 12 (In srcgen directory) 13 ant -buildfile buildDiscovery.xml jar.server 14 (output in build/lib) 10 ant -f buildClient.xml 15 11 16 3. Optionally build javadoc documentation 17 ant -buildfile buildDiscovery.xml javadoc 12 will now build both the server and client archives and make the necessary changes to the files outlined below. NB, to get 13 the DiscoveryService.wsdl file to be generated properly, you will likely have to temporarily rename the jsr file, as mentioned 14 below. 18 15 19 4. Deploy the service 20 - Copy DiscoveryService.aar to <tomcat>/webapps/axis/WEB-INF/services 21 - Reload axis2 context within tomcat manager app, or restart tomcat 22 16 Original, detailed instructions, are as follows (but you shouldn't have to use them!): 23 17 24 18 Client Side: 25 Instructions for building client (DiscoveryService.aar) 19 --------------- 20 Instructions for building client (DiscoveryService-test-client.jar) 26 21 27 22 Do all the following in directory "srcgen" … … 41 36 ant -buildfile buildClient.xml run.client 42 37 43 Code to edit for testing is in ..\src\ndg\services\discovery\MyDiscoveryServiceClient.java 38 Server Side: 39 --------------- 40 Instructions for building & deploying Axis2 web service archive (DiscoveryService.aar) 41 42 1. Run WSDL2Java to generate skeleton code and XMLBeans for data binding 43 (In srcgen directory) 44 %AXIS2_HOME%\bin\wsdl2java -ss -sd -d xmlbeans -uri ..\wsdl\Discovery.wsdl -o . -p ndg.services.discovery 45 46 NB, when running this command, you may get an error along the lines of: 47 48 Exception in thread "main" java.lang.NoSuchMethodError: javax.xml.stream.XMLOutputFactory.newInstance(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljavax/xml/stream/XMLOutputFactory; 49 at org.apache.axiom.om.util.StAXUtils.getXMLOutputFactory(StAXUtils.java:97) 50 51 - this occurs due to a mismatch in libraries between the versions of java and axis being used. A 52 quick fix can be to temporarily hide jre/lib/ext/jsr173_1.0_api.jar. NB, without this change, the 53 generated DiscoveryService.wsdl file is likely to be empty. 54 55 2. Build server side code (DiscoveryService.aar) 56 (In srcgen directory) 57 ant -buildfile buildDiscovery.xml jar.server 58 (output in build/lib) 59 60 3. Optionally build javadoc documentation 61 ant -buildfile buildDiscovery.xml javadoc 62 63 4. Deploy the service 64 - Copy DiscoveryService.aar to <tomcat>/webapps/axis/WEB-INF/services (NB, for this step you need to have axis2 65 installed in your tomcat server - just drop an axis2.war file into the webapps directory when the server is running) 66 - Reload axis2 context within tomcat manager app, or restart tomcat 67 68 69 70 Code to edit for testing is in ..\src\ndg\services\discovery\DiscoveryServiceClient.java 44 71 45 72 Tested with Sun Java SDK 1.5.08 (problems with 1.6.03)
Note: See TracChangeset
for help on using the changeset viewer.