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 ofStub
representing your SOAP service.
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
ConstructorDescriptionSoapRequest
(Class<ServiceT> serviceClass, HttpDestination httpDestination) Deprecated.Takes the class type of the SOAP service typeServiceT
asserviceClass
and anDestination
, creates and prepares the Axis2 configuration context and instantiates the classServiceT
. -
Method Summary
Modifier and TypeMethodDescription<ReturnT> ReturnT
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.
-
Constructor Details
-
SoapRequest
public SoapRequest(@Nonnull Class<ServiceT> serviceClass, @Nonnull HttpDestination httpDestination) throws SoapException Deprecated.Takes the class type of the SOAP service typeServiceT
asserviceClass
and anDestination
, creates and prepares the Axis2 configuration context and instantiates the classServiceT
.- Parameters:
serviceClass
- Class type ofServiceT
httpDestination
- An instance of{@link HttpDestination }
- 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 SoapExceptionDeprecated.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.
-