Class SoapRequest<ServiceT extends org.apache.axis2.client.Stub>

java.lang.Object
com.sap.cloud.sdk.s4hana.connectivity.soap.SoapRequest<ServiceT>
Type Parameters:
ServiceT - Subtype of Stub representing your SOAP service.

@Deprecated public class SoapRequest<ServiceT extends org.apache.axis2.client.Stub> extends Object
Deprecated.
This module will be discontinued, along with its classes and methods.
Class representing a request calling a SOAP service in an ERP system.

This class instantiates a service class which extends Stub from the Axis2 framework and prepares the Axis2 configuration context according to the provided Destination.

Use the static method registerCustomConverter to register your own custom converter class which Axis2 uses for converting values from the XSD types of the SOAP envelope to Java types.

By default, the provided class SoapCustomConverter is registered at application startup.

  • Constructor Summary

    Constructors
    Constructor
    Description
    SoapRequest(Class<ServiceT> serviceClass, Destination destination)
    Deprecated.
    Takes the class type of the SOAP service type ServiceT as serviceClass and an Destination, creates and prepares the Axis2 configuration context and instantiates the class ServiceT.
  • Method Summary

    Modifier and Type
    Method
    Description
    <ReturnT> ReturnT
    execute(io.vavr.CheckedFunction1<ServiceT,ReturnT> function)
    Deprecated.
    Executes a request against a SOAP service based on the given function.
    static void
    registerCustomConverter(Class<? extends org.apache.axis2.databinding.utils.ConverterUtil> customConverter)
    Deprecated.
    Use this method to register your own custom converter class which Axis2 uses for converting values from the SOAP envelope following XSD types to Java types.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SoapRequest

      public SoapRequest(@Nonnull Class<ServiceT> serviceClass, @Nonnull Destination destination) throws SoapException
      Deprecated.
      Takes the class type of the SOAP service type ServiceT as serviceClass and an Destination, creates and prepares the Axis2 configuration context and instantiates the class ServiceT.
      Parameters:
      serviceClass - Class type of ServiceT
      destination - An instance of Destination
      Throws:
      SoapException - Thrown in case the Axis2 configuration context could not be prepared or the service instance could not be instantiated.
  • Method Details

    • registerCustomConverter

      public static void registerCustomConverter(@Nonnull Class<? extends org.apache.axis2.databinding.utils.ConverterUtil> customConverter) throws SoapException
      Deprecated.
      Use this method to register your own custom converter class which Axis2 uses for converting values from the SOAP envelope following XSD types to Java types.

      Your converter class must be a subtype of ConverterUtil.

      Parameters:
      customConverter - Your converter class
      Throws:
      SoapException - Thrown in case the custom converter class could not be registered within the Axis2 framework.
    • execute

      @Nonnull public <ReturnT> ReturnT execute(@Nonnull io.vavr.CheckedFunction1<ServiceT,ReturnT> function) throws SoapException
      Deprecated.
      Executes a request against a SOAP service based on the given function.
      Type Parameters:
      ReturnT - The result type of the given function.
      Parameters:
      function - The function that calls the SOAP service and returns the relevant result.
      Returns:
      The result of the function.
      Throws:
      SoapException - If there is an issue while executing the request.