4. Sample Application for Java
BARCO – Apollo 1.8 SOAP API – DOC-3338-2 – Reference manual – Revision 06 – Nov-2005
___________________________________________
4-2
• Next, we have to specify the target specification. It has 2 options i.e the client package and project
the folder name. Set client package name (say for desktopmanagement) as
<packageprefix>.api.waspsoapclient.desktopmanagement. Note, that the sample uses
bcd.se.apollotest as a <packageprefix>, but this should be changed to fit into the client’s package
namespace. Set the project folder name (say for desktopmanagement) as DesktopManagement.
• Next, the wizard will prompt for the Client Type specification. Select the default option of Unsecure
Client.
• That’s it; now select the Finish button for completion of the client creation. Under
WaspSoapClient\src\<packageprefix>\api\waspsoapclient two folders are created, i.e.
DesktopManagement and DesktopManagementStruct. These contain the necessary proxy classes.
• In the end put all the proxy classes and other required library files under one jar file. In order to create the
jar file named WaspSoapClient.jar follow the following steps in the JBuilder environment for project
WaspSoapClient.jpx:
• From the Wizard Menu select the Archive Builder option. It will prompt you to select an Archive Type.
• From the options, select Basic Archive, this is the default and click on Next.
• For wizard steps, 2 and 3 let the default value be selected, i.e in step 2 you will be prompted to
enter the archive file name. By default the jar file will be named based on the project name, i.e for
the current example WaspSoapClientJB.jar. Let it be as it is.
• In step 3 it will prompt the parts of resources to be included in the archive, i.e classes and resources.
Select the 'All' option which is the default one.
• In step 4 select the library settings to "Always Include All resources and classes".
• In step 5 the prompt to include a manifest file or not is there, so simply let the default options
selected and click on finish button
• Now save the project. This completes the client proxy class creation in java. Next we will refer to these proxy
classes and invoke methods of different web services in a new project.
4.3 Creation of Proxy Classes with Eclipse 3.0.2
The following steps will create a Jar file containing proxy classes to access the Apollo API.
• In the Eclipse environment create a Java project:
• Choose the right workspace if you have more than one.
• Select from the File menu: New | Project
• Choose at the wizard window tree view: Systinet Web Services | Web Service Project
• Set the project name to WaspSoapClient and select Finish
• In the Package Explorer right click the project name and choose: New | Package.
• Set the package name i.E.: bcd.se.apollotest.api.waspsoapclient
• Download WSDL Files and create the proxy classes.
• Select the project name, right click and choose the menu entry: New | Other
• Choose at the wizard window tree view: Systinet Web Service | WSDL File from Internet, then NEXT
• In the tree view select a location for the WSDL file like: bcd.se.apollotest.api.waspsoapclient
• Set a name for the WSDL file to. DesktopManagementSoapPort, then NEXT.
• Insert the URL of the Apollo server with the WSDL files:
http://apolloapiserver/apolloapi/DesktopManagement.wsdl.
• Check the option “Download WSDLs ...”, then FINISH.
• Right click the WSDL file in the Package Explorer and select the menu option: Generate Interface.
• Set the location of the Interface Package (say for desktopmanagement) to
<packageprefix>.api.waspsoapclient.desktopmanagement. Note, that the sample uses