Skip to topic | Skip to bottom
Home
GENI


Start of topic | Skip to actions

GENI Aggregate Manager

Source Code Compilation Guide

Download Code

Access to our SOAP-based GENI Aggregate Manager is available via our Subversion repository. Please install the subversion package for your system and download the code from our SVN repository using the commands shown below. Please note that the build process currently assumes that the WSDL file can be found in a certain location — you must either put everything in /usr/local/aggregate or update nbproject/axis2-build.xml to have the correct path to the aggregate.wsdl file.

# cd /usr/local # svn -q export svn://svn.maxgigapop.net/geni-aggregate aggregate # chown -R chris:chris aggregate


Load NetBeans Project

The software is intended to be maintained and developed using the NetBeans IDE. You will need to download and install NetBeans with Java Web support for your system from http://www.netbeans.org.

Launch the NetBeans IDE and open the AggregateWS project. This will be a directory located beneath the /usr/local/aggregate directory that was created when you ran the svn export command above, as shown in the example dialog box below:

open netbeans project window


Resolve Library Dependencies

As the project is loading, you will receive a warning message indicating that one or more project resource could not be found. This is because the Axis2 library (v1.4.1) will need to be installed before you can continue — just click "Close" on this window for now:

resolve reference problems dialog

Next, right click on 'AggregateWS' in the Projects tab, then select 'Resolve Reference Problems' from the context menu:

resolve reference problems menu

You should receive a dialog box indicating that the 'Axis2-1.4' library could not be found:

axis2 library missing

Visit the Apache Axis2 v1.4.1 download page and download the "Standard Binary Distribution" (the complete version of Axis2). Extract the .zip file and note the location of the resulting 'axis2-1.4.1' folder.

Click 'Resolve' on the 'Resolve Reference Problem' window to bring up the Library Manager dialog:

library manager window

Click 'New Library...' on the 'Library Manager' window and enter 'Axis2-1.4' as the Library Name — be sure to enter it exactly the same as what is shown in the dialog box below — then click OK:

add axis2 library

Next, click 'Add JAR/Folder...' on the 'Library Manager' window and browse to the location of the axis2-1.4.1/lib folder. You will see a lot of files ending in .jar. Select all files in this dialog box and click 'Add JAR/Folder' — you can use the "select all" feature by pressing Control-A or Command-A:

select all axis2 .jar files

Your 'Library Manager' window should now look like this:

library manager after adding axis2 jar files

The first .jar file should be called activation-1.1.jar and the last should be called XmlSchema-1.4.2.jar. Make sure that you have all of the .jar files from the axis2-1.4.1/lib directory before moving on to the next step.

NetBeans should indicate that the reference problems have now been resolved by showing you a window like the following:

resolve references fixed


Generate Java Skeleton Code (via wsdl2java)

Now click on the 'Tasks' tab. You will notice a bunch of errors about missing symbols. This is because the auto-generated Java skeleton code has not yet been generated — we do not commit this code to the Subversion repository because of the fact that it is auto-generated during the build process. This code is derived from the WSDL file, so you must make a build target that calls wsdl2java to generate these classes. The 'Tasks' tab should look something like this:

tasks tab before calling wsdl2java build target

In order to call the wsdl2java build target, first click the 'Files' tab. Click the triangle before 'AggregateWS' to show the files — you should now see a file called build.xml. Right-click on this file, select 'Run Target', then 'Other Targets', and finally 'wsdl2java-AggregateGENI'. The screenshot below illustrates this process:

how to find/run the wsdl2java build target

If everything worked correctly, you should see 'BUILD SUCCESSFUL' in the 'Output' tab. This indicates that the Java skeleton code has successfully been built:

output tab after running wsdl2java target

Check the 'Tasks' tab to see if it is still showing errors. Please note: NetBeans does not always clear these right away. You may have to double-click a few of the errors before you see them clear. Your tasks tab should now look like this once all of the errors have cleared — again, just double-click some of the errors to show the location in the source if you are still seeing errors show up under the 'Tasks' tab:

tasks tab after running wsdl2java


Manually patch services.xml file

At this time, when you build the wsdl2java-AggregateGENI target, NetBeans makes some modifications to the AggregateWS/xml-resources/axis2/META-INF/services.xml file which will cause problems if they are not fixed before building the Axis Archive file.

It may be possible to adjust the NetBeans templates to correct this behavior, but we have not yet looked into this in much more detail.

For now, you must manually edit the AggregateWS/xml-resources/axis2/META-INF/services.xml and apply the fix manually before proceeding.

Please adjust this file to look like the following:

fix services.xml file

You need to add scope="application" to the second line and change AggregateGENISkeleton to AggregateWS on the sixth line.

If you do not perform this step, the entry point to the GENI AM Web Service will never be called.


Build .AAR (Axis Archive) File

In order to deploy the Aggregate Manager as an Axis2 service, you must build an .aar (Axis Archive) file. To do this, select the 'axis2-aar' build target using the same process that you used to run wsdl2java:

  • Click the 'Files' tab.
  • Click the triangle before 'AggregateWS' to show the files — you should now see a file called build.xml.
  • Right-click on this file, select 'Run Target', then 'Other Targets', and finally 'axis2-aar'.

The screenshot below illustrates this process:

build axis2-aar target

The 'Output' tab should show 'BUILD SUCCESSFUL' and give you the location of the .aar file that was just built. The code is now compiled and the .aar file can be deployed to any server which is running Apache Axis2 (we will explain how to setup the server in the next section):

aar file built successfully


Next Steps

Congratulations, you have compiled the Axis2 Web Service and are ready to proceed with setting up the server side. If you modify the source or WSDL file, you can use the procedure above to create a new .aar file. You can also modify the build targets so that you can deploy the .aar file directly to your server instead of having to deploy it manually.

Please see the Server Deployment Guide for information on how to proceed.


You are here: GENI > Software > AggMgrCompile

to top

Copyright © 1999-2010.
The information contained in these pages is the property of the Mid-Atlantic Crossroads (MAX).
If you have questions or comments, please contact MAX Administration