NonStop SOAP 4.1 User's Manual

6 * count_transferred defined to be passed as argument
7 * to operation_pway_<operation name> function.
8 * This variable will contain size of the
9 * response buffer.
10 */
11 unsigned long count_transferred = 0;
12
13 /**
14 * response_buffer defined to be passed as argument
15 * to operation_pway_<operation name> function.
16 * This variable will contain the response buffer
17 */
18 char *response_buffer;
19
20 /**
21 * TO DO :
22 * Write the logic to invoke the functions defined for each operation.
23 * Sample call:
24 * operation_pway_<operation name>(recv_buff,
25 * &response_buffer,
26 * &count_transferred,
27 * count_read);
28 */
29
30 error = REPLYX(response_buffer, count_transferred) ;
31 if (error != 0) {
32 printf(" Error while using REPLYXL to transfer application message \n ");
33 printf(" Error number is = %d \n ", error);
34 file_errors(error);
35 }
36
37 } /* End of process_application_message() */
38
The error variable is used to check the returned error and is initialized to 0.Line 3
The count_transferred variable is defined to be passed as an argument to the
operation_pway_<operation name> function. The count_transferred
variable contains the size of the response buffer.
Line 11
Function call for each operation.Line 20- Line28
Write a response to the $RECEIVE file using the REPLYX call.Line 30
Error handling if an error occurs while writing the response to the $RECEIVE file.Line 31- Line 35
operation_pway_REFLECTOR
The WSDL file for the reflector service defines a single operation named REFLECTOR.
Therefore, the WSDL2PWY tool generates a function for the REFLECTOR operation named
operation_pway_REFLECTOR. The code snippet for the operation_pway_REFLECTOR()
function is:
1 /**
2 * This function contains the business logic for operation: REFLECTOR
3 *
4 * Arguments:
5 * request_buffer - This is a character pointer that contains the request
6 * buffer received from NonStop SOAP 4 server.
7 * response_buffer - This is an output variable and will contain the response
8 * buffer
9 * reply_count - This is an output variable and will contain the size of
10 * the response buffer
11 * count_read - This is a variable of unsigned long datatype which contains the
12 * size of the request buffer
13 * Return Type: void
14 */
15 void operation_pway_REFLECTOR(char *request_buffer, char **response_buffer, unsigned long
*reply_count, unsigned long count_read)
16 {
17
18 short fileError; 19
20 /**
21 * Request structure variable definition
22 */
23 pwayREFLECTOR_t* req_1;
24
25 /**
26 * Response structure variable definition
27 */
28 pwayREFLECTORResponse0_t* resp_1;
29
30
31 /**
32 *
Developing a NonStop SOAP 4 Pathway Web Service Using the WSDL2PWY Tool 267