SimpleSOAPUI Web Service Example: How to make a successful compilation and execution using C#.
search cancel

SimpleSOAPUI Web Service Example: How to make a successful compilation and execution using C#.


Article ID: 53186


Updated On:


Aion Business Rules Expert


How can I have a successful compilation and execution of the SimpleSOAPUI Web Service Example using the C# client?


Component: AIONBR


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)
Axis 4.1
Tomcat 4.1.29 (Tomcat 5.5.27 or later recommended and used in this example)
SoapUI 2.5

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.

  1. Install VS .NET 2003, Aion, Tomcat, Java, etc. Please do not use Visual Studio 2005 as it is not compatible with Aion 10.2.

  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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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
    %CATALINA_HOME% C:\apache-tomcat-5.5.27;
    %ANT_HOME% C:\apache-ant-1.7.1
    %AXIS_HOME% C:\apache-tomcat-5.5.27\webapps\axis\WEB-INF
    %CLASSPATH% C:\Program Files\QuickTime\QTSystem\;C:\apache-tomcat-5.5.27\webapps\axis\WEB-INF\lib
    %AION_HOME% C:\Program Files\CA\CleverPath Aion\BRE

  8. Restore in the Aion IDE. This is listed as "". Remove the "txt" extension before opening this in the Aion BRE IDE.

  9. Stop any unnecessary existing Tomcat-related services, and run "Catalina start" in DOS.

  10. 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

  11. Check the Web Service Wizard settings. Go to Tools:Web Service Wizard.

  12. Select "SimpleObj" as the class to build for a web service.

  13. Select only "SimpleReq" as the method within the SimpleObj class.

  14. 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.

  15. Hit the "Finish" button to build. Ignore any replacement messages for the WSDD files.

  16. 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

  17. In SoapUI, create a new project called "SimpleTest1". Use the SimpleSoapUI's WSDL for the initial WSDL file. Specify to use relative paths.

  18. Check the initial request for the method "request1". It should look something like:
    <soapenv:Envelope xmlns:xsi=""xmlns:xsd="" xmlns:soapenv=""xmlns:urn=""> <soapenv:Header/> <soapenv:Body> <urn:simpleReq soapenv:encodingStyle=""/> </soapenv:Body></soapenv:Envelope>
  19. 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=""xmlns:xsd="" xmlns:xsi=""><soapenv:Body> <ns1:simpleReqResponse soapenv:encodingStyle="" xmlns:ns1=""> <simpleReqReturn xsi:type="soapenc:string" xmlns:soapenc=""> - 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>

Attachments get_app