tpf_soapCopySOAPHandleMalloc: Copy SOAP consumer API handle to ECB heap

This function copies the SOAP consumer API handle from system heap storage to entry control block (ECB) heap (malloc) storage. The system heap storage was obtained on a previous call to the tpf_soapCopySOAPHandleHeap function.

Last updated

Added for PUT06.

Format

LIBS := CWSA
#include  <tpf/c_soapc.h>
int tpf_soapCopySOAPHandleMalloc(t_soapHandleSysHeap oldHandle,
                                 t_soapHandle *returnHandle);
oldHandle
A pointer to the SOAP consumer API handle that was created by the tpf_soapCopySOAPHandleHeap function.
returnHandle
A pointer to the location to store the new SOAP consumer API handle.

Normal return

A value of _SOAP_SUCCESS.

The value pointed to by the returnHandle parameter contains the address of the new SOAP consumer API handle that is located in ECB heap storage.

Error return

The tpf_soapCopySOAPHandleHeap function returns TPF_SOAP_ERROR and errno is set to one of the following:
ETPFSOAP_HANDLEERR
The specified SOAP consumer API handle (oldHandle) is not valid.
ETPFSOAP_NOHEAP
There is not enough ECB heap storage available to store the new SOAP consumer API handle.
ETPFSOAP_XML_APIERR
An error occurred when packing an XML handle, if the SOAP consumer API handle contained an XML handle.

Programming considerations

  • The tpf_soapCopySOAPHandleHeap function is meant to be used when you implement an asynchronous user transport.
  • The system heap storage that is pointed to by the oldHandle parameter is released when the function returns successfully.
  • The ECB heap that is allocated by the tpf_soapCopySOAPHandleMalloc function is released by a later call to the tpf_soapEnd function.

Related information

See z/TPF Web Services Support for more information about SOAP support.

See z/TPF C functions overview for more information about z/TPF C/C++ language support.