NonStop SOAP 4.1 User's Manual

For example:
OSS> WSDL2C -o "<NonStop SOAP 4 Deployment Directory>/client/math/src" -d none
-uri "<NonStop SOAP 4 Deployment Directory>/services/math/SoapPW_math.wsdl"
NOTE: In this example, ensure that the math service is deployed in the NonStop SOAP 4
deployment before running the OSS> WSDL2C [options] -u uri [wsdl path]
command.
6. On successful execution, the following client stubs will be generated:
Client source stub file that will implement the main() function called when an executable
file is run.
The header file for the client source stub file that holds the declarations of the functions
that are implemented in the client stub source file.
In case of the math service, the following files are generated in the <NonStop SOAP 4
Deployment Directory>/client/math/src directory:
axis2_stub_mathService.c
axis2_stub_mathService.h
Implementing Business Logic in Client Stubs
After generating the client stubs, you must implement the processing logic in the main() function
in the axis2_stub_mathService.c file.
You must code the business logic to implement all four operations, namely addition, subtraction,
multiplication, and division using the NonStop SOAP 4 Client API.
The complete code for the math client is present in the <NonStop SOAP 4 Installation
Directory>/sample_services/math/client/axis2_stub_mathService.c file. You
may choose to replace the <Math Client Source
Directory>/axis2_stub_mathService.c file with this file.
You can also copy the axis2_stub_mathservice.c file from <NonStop SOAP 4
Installation Directory>/sample_services/math/client to the OSS location
<NonStop SOAP 4 Deployment Directory>/client/math/src.
Compiling the Client Code and Deploying the Client
After the client stubs are generated and updated with the main() function, and the business logic
is implemented in the service skeleton, you must compile the client code.
The client code can be complied either using the Makefile or manually.
Compiling the Client Code using the Makefile
To compile the client code using the Makefile and deploy the client, complete the following steps:
1. Copy the Makefile of the math client to <Math Client Source Directory>.
NOTE:
You must copy the Makefile of the math client to <Math Client Source Directory>
because the WSDL2C tool does not generate the Makefile.
The Makefile of the math client is located in <NonStop SOAP 4 Installation
Directory>/sample_services/math/client/Makefile.
2. Set AXIS2C_HOME to <NonStop SOAP 4 Deployment Directory> using the following
command:
OSS> export AXIS2C_HOME=<NonStop SOAP 4 Deployment Directory>
3. Run the Make command to build your math.exe file:
Developing NonStop SOAP 4 Clients Using Client APIs 121