SOAPHTTPC and SOAPHTTPV

The SOAPHTTPC function returns a CLOB representation of XML data that results from a SOAP request to the web service that is specified by the first argument. The SOAPHTTPV function returns a VARCHAR representation of XML data that results from a SOAP request to the web service that is specified by the first argument.

Read syntax diagram
>>-+-SOAPHTTPC-+-(endpoint_url,soap_action,soap_body)----------><
   '-SOAPHTTPV-'                                        

The schema is DB2XML.

Start of changeThese functions are deprecated and might not be available in future releases of DB2®.End of change

endpoint_url
An expression that returns a value of a built-in character string or graphic string data type that is not a LOB. The value specifies the URL of the web service endpoint for which DB2 is acting as a client.
soap_action
An expression that returns a value of a built-in character string or graphic string data type that is not a LOB. The value specifies a SOAP action URI reference. If it is required for the web service that is specified in endpoint_url, the required value is defined in the WSDL of that web service.
soap_body
An expression that returns a value of a built-in character string data type that is defined as VARCHAR(3072) or CLOB(1M). The value specifies the name of an operation with the requested namespace URI, an encoding style, and input arguments. soap_body can include well-formed XML content for the SOAP body. The specific operations and arguments for a web service are defined in the WSDL of the specified web service.

If the arguments can be null, the result can be null; if all of the arguments are null, the result is the null value.

The result can be null; if all of the arguments are null, the result is the null value.

Example 1: The following SQL statement retrieves information (as VARCHAR data) about a web service:
   SELECT DB2XML.SOAPHTTPV(
        'http://www.myserver.com/services/db2sample/ivt.dadx/SOAP',
        'http://tempuri.org/db2sample/ivt.dadx',
        '<testInstallation xmlns="http://tempuri.org/db2sample/ivt.dadx" />')
      FROM SYSIBM.SYSDUMMY1
Example 2: The following SQL statement inserts the results (as CLOB data) from a request to a web service into a table:
   INSERT INTO EMPLOYEE(XMLCOL) 
     VALUES (DB2XML.SOAPHTTPC(
        'http://www.myserver.com/services/db2sample/list.dadx/SOAP',
        'http://tempuri.org/db2sample/list.dadx',
        '<listDepartments xmlns="http://tempuri.org/db2sample/list.dadx">
            <deptNo>A00</deptNo>
         </listDepartments>'))