NonStop SOAP 4.1 User's Manual
iv. If an error occurs, the request is passed to the process_system_message() or
file_error()function based on the error value.
v. After a response is returned to the calling NonStop SOAP 4 server, the $RECEIVE
file is closed.
NOTE: The response buffer size is 32k. Use the -lps option while generating the
skeleton files to pass large data. The data size limit is 2M.
b. process_application_message()
The process_application_message() function expects a character buffer as an
argument (char *recv_buff). The character buffer includes the request received by
the service. You must update this function to include calls to any operation-specific functions
based on your requirements.
The call to REPLYX is generated by the WSDL2PWY tool in the
process_application_message function. This call returns the reply generated by
the service to the calling NonStop SOAP 4 server.
c. operation_pway_<operation_name>
The WSDL2PWY tool generates a function skeleton file for each operation specified in the
WSDL file. The operation_pway_<operation_name> function has the following
information passed as arguments in it:
• A character buffer that includes the request received by the service
• A pointer to a character buffer including the response that the function will generate
• A pointer to a short datatype that contains the size of the response being returned
The operation_pway_<operation name> function contains the structure definitions
of the request, response, and fault structures defined in the WSDL file. These structures
are defined in the generated header file.
For the reflector service, the following functions defined by the WSDL2PWY tool must be
customized as follows:
• main
In the case of the reflector service, the main function appears as follows:
1 int main (int argc, char *argv[])
2 {
3 /**
4 * Variable Definitions
5 */
6
7 /**
8 * recv_num contains the file identifier for $RECEIVE
9 */
10 short recv_num = 0;
11
12 /**
13 * receiveinfo variable is defined to be passed as argument
14 * to FILE_GETRECEIVEINFO_
15 */
16 short receive_info[17];
17
18 /**
19 * recv_name_length contains the length of variable recv_name
20 */
21 short recv_name_length = 0;
22
23 /**
24 * count_read is passed as argument to READUPDATEX and will contain
25 * the number of bytes read from $RECEIVE
26 */
27 unsigned int count_read = 0;
28 short error = 0;
29
30 /**
31 * recv_buff is a character buffer to contain
32 * the client request buffer received
33 */
34 char recv_buff[ RECV_BUFFER_LENGTH ];
35 const char recv_name[] = "$RECEIVE";
264 Using the Contract-First Approach in NonStop SOAP 4










