How can I have a successful compilation and execution of the SimpleSOAPUI Web Service Example using the C# client?
Requirements: Visual Studio .NET 2003 (must install the C# component)
Aion 10.2 BRE
Java 1.4.1 or higher
Ant 1.6 (Ant 1.7 or later recommended)
Tomcat 4.1.29 (Tomcat 5.5.27 or later recommended and used in this example)
The example Aion application supplied, has a string, integer, real, boolean, date and time object, which is returned from Aion to SoapUI. It is available for download.
- Install VS .NET 2003, Aion, Tomcat, Java, etc. Please do not use Visual Studio 2005 as it is not compatible with Aion 10.2.
- Install Axis from within the root directory of Tomcat. Copy the webapps directory from the Axis installation to the root directory of Tomcat. For instance, I have Axis installed in C:\apache-tomcat-5.5.27\, so that the %AXIS_HOME% parameter would be C:\apache-tomcat-5.5.27\webapps\axis\WEB-INF, and the library directory would be in c:\apache-tomcat-5.5.27\webapps\axis\WEB-INF\lib, and should be listed in the %CLASSPATH% parameter as %AXIS_HOME%\lib.
- Install SoapUI in its default location. For example I installed SoapUI in C:\Program Files\eviware\soapUI-2.5. Once installed, SoapUI does not require any manual adjustment to any environmental variable itself to function properly.
- Check that you have a webapps\axis\WEB-INF\lib directory in Tomcat. It will not yet have the Aion files from build\rejava yet, so these will have to be copied in manually.
- From C:\Program Files\CA\CleverPath Aion\BRE\build\rejava, copy the files aionsession.jar, antAion.jar, axisaionsession.jar and log4j-1.2.8.jar, into the webapps\axis\WEB-INF\lib directory in Tomcat.
- Check the %CLASSPATH% and make sure that the activation-1.1.1.jar, mail-1.4.1.jar, and axis.jar, are listed as .jar files in the Tomcat webapps\axis\lib directory. For example: C:\apache-tomcat-5.5.27\webapps\axis\WEB-INF\lib. Add this also to %PATH as for example %AXIS_HOME%\lib\axis.jar.
- Check that %JAVA_HOME%, %CATALINA_HOME%, %ANT_HOME% and %AXIS_HOME% are defined as environmental system variables, and that for %CATALINA_HOME% and %ANT_HOME% that the bin directories are included in the system %PATH% variable these are defined. Also recheck that %CLASSPATH% contains %AXIS_HOME%\lib.
Examples of the environmental variables:
%JAVA_HOME% C:\Program Files\Java\jdk1.5.0_06
%CLASSPATH% C:\Program Files\QuickTime\QTSystem\QTJava.zip;C:\apache-tomcat-5.5.27\webapps\axis\WEB-INF\lib
%AION_HOME% C:\Program Files\CA\CleverPath Aion\BRE
- Restore simpleSoapUI.app in the Aion IDE. This is listed as "SimpleSoapUI.app.txt". Remove the "txt" extension before opening this in the Aion BRE IDE.
- Stop any unnecessary existing Tomcat-related services, and run "Catalina start" in DOS.
- In the Aion BRE IDE, check your File:Settings for the following settings, if you have Visual Studio 98 installed. You should have the following set (settings in square brackets are optional):
Included Libraries Directory: %AION_HOME%\init
Working Directory: %AION_HOME%
TraceOutput Directory: [.]
AionDoc Directory: [%AION_HOME%\aionDoc]
Build Directory: %AION_HOME%\build
Compiler Directory: C:\Program Files\Microsoft Visual Studio\VC98;C:\Program Files\Microsoft Visual Studio\Common
Java Home Directory: %JAVA_HOME%
Note for the Compiler Directory with Visual Studio .NET 2003, you would have instead
c:\Program Files\Microsoft Visual Studio .NET 2003
- Check the Web Service Wizard settings. Go to Tools:Web Service Wizard.
- Select "SimpleObj" as the class to build for a web service.
- Select only "SimpleReq" as the method within the SimpleObj class.
- For deployment settings, choose the default port 8080. For CATALINA_HOME, use C:\apache-tomcat-5.5.27. For ANT_HOME, use C:\apache-ant-1.7.1. Your Web Service name will be "SimpleSoapUIWebService" by default. The Style should be RPC and the Use should be Encoded.
- Hit the "Finish" button to build. Ignore any replacement messages for the WSDD files.
- If the build is successful, look for the WSDL. You will need its address to enter into SoapUI. For instance, my WSDL points to http://localhost:8080/axis/services/SimpleSoapUIWebService?wsdl
- In SoapUI, create a new project called "SimpleTest1". Use the SimpleSoapUI's WSDL for the initial WSDL file. Specify to use relative paths.
- Check the initial request for the method "request1". It should look something like:
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:urn="urn:simplesoapui.aion.ca"> <soapenv:Header/> <soapenv:Body> <urn:simpleReq soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </soapenv:Body></soapenv:Envelope>
- Run the request for the method "request1". Check the response output. If it was successful, you should have output resembling the following:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body> <ns1:simpleReqResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:simplesoapui.aion.ca"> <simpleReqReturn xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> - String request - The time is: 2008/12/26 10:27 Today's date is: 2008/12/26 Integer: 200 Boolean: yes Real: 0.01</simpleReqReturn> </ns1:simpleReqResponse> </soapenv:Body> </soapenv:Envelope>