tpf_soapProcessAsyncResponse: Process an asynchronous SOAP consumer response

This function processes a response to an asynchronous SOAP consumer request. It performs any translation of the inbound XML document that is needed. It also parses the XML document and calls the SOAP message handlers and Web service stub, if needed. Finally, the function calls the asynchronous program that gains control when the Web service is called.

Last updated

  • Changed for PUT11.
  • Added for PUT06.

Format

LIBS := CWSA
#include  <tpf/c_soapc.h>
int tpf_soapProcessAsyncResponse(t_soapHandle soapHandle,
                                 soapMsg *respMsgIn);
soapHandle
The SOAP consumer API handle.
respMsgIn
A pointer to the SOAP response message.

Normal return

The tpf_soapProcessAsyncResponse function does not return to the calling application. This function calls the application that was specified in the tpf_soapInvokeService function asyncProgram field and passes a pointer to a t_soapAsyncParms structure. The soapReturnCode field is set to TPF_SOAP_SUCCESS and the soapResponse field points to the response message much like the tpf_soapInvokeService dataFormat.

Error return

The tpf_soapProcessAsyncResponse function does not return to the calling application. This function calls the application that was specified in the tpf_soapInvokeService function asyncProgram field and passes a pointer to a t_soapAsyncParms structure. The soapReturnCode field is set to TPF_SOAP_ERROR and the errno value is set. There could be a secondary error code in the SOAP consumer API handle.

Programming considerations

  • The tpf_soapProcessAsyncResponse function is meant to be used when you implement an asynchronous user transport.
  • When processing is complete, the tpf_soapProcessAsyncResponse function enters the 4-character program that was specified when the Web service was called and passes that program a pointer to a t_soapAsyncParms structure, which contains the following:
    asyncParm
    A pointer whose value is set to the value of the asyncParm parameter that was specified when the Web service was called by using the tpf_soapInvokeService function.
    soapResponse
    A pointer to the SOAP response message.
    soapHandle
    The SOAP handle.
    soapReturnCode
    TPF_SOAP_SUCCESS is the normal return.
    TPF_SOAP_ERROR is returned and errno is set to one of the following values:
    ETPFSOAP_MSG_HANDLERERR_RESP
    An error was returned from the SOAP message handler response chain.
    ETPFSOAP_STUBERR_RESP
    An error was returned from the response call to the Web service stub.
    ETPFSOAP_SYNTAXERR
    The SOAP syntax is not valid.
    ETPFSOAP_TRANSLATEERR
    An error occurred during translation.
    ETPFSOAP_UWST
    An error was returned from the tpf_soapTranslationExit (cwstue.c) user exit.
    ETPFSOAP_XML_APIERR
    An error was returned from the parser APIs.

For more information about the tpf_soapTranslationExit (cwstue.c) user exit, see z/TPF and z/TPFDF System Installation Support Reference.