org.licas.ws.soap

## Class WebSoapService

- java.lang.Object
- - org.licas.ws.soap.WebSoapService

-     public class WebSoapService
      extends java.lang.Object

  Can be used to make calls to web services using the SOAP protocol from licas objects.
  Author:
    Kieran Greer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebSoapService()` Create a new instance of CallWebService.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.ArrayList` | `removeNullValues(java.util.ArrayList paramHolder, WsdlParamInfo rootParam)` Remove any parameters with null values.
    `protected java.lang.Object` | `restCall(WsMethodInfo webServiceInfo)` Make a web service call using the selected values.
    `protected java.lang.Object` | `soapRpcCall(java.lang.String commProtocol, WsMethodInfo webServiceInfo)` Make a web service call using the selected values.
    `java.lang.Object` | `webServiceCall(java.lang.String commProtocol, WsdlOperation wsdlOperation, WsMethodInfo webServiceInfo)` Make a web service call using the selected values.
    `java.lang.Object` | `webServiceCall(java.lang.String commProtocol, WsMethodInfo webServiceInfo)` Make a web service call using the selected values.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WebSoapService

          public WebSoapService()
                         throws java.lang.Exception

      Create a new instance of CallWebService.
      Throws:
        `java.lang.Exception` - any error.

  - ### Method Detail

    - #### webServiceCall

          public java.lang.Object webServiceCall(java.lang.String commProtocol,
                                                 WsdlOperation wsdlOperation,
                                                 WsMethodInfo webServiceInfo)
                                          throws java.lang.Exception

      Make a web service call using the selected values. In this case, the parameter values are retrieved from a wsdl operation object and added to the method description.
      Parameters:
        `commProtocol` - the communication protocol type - HTTP, POST, GET
        `wsdlOperation` - the selected operation description.
        `webServiceInfo` - the constructed method info.
      Returns:
        the soap message reply from making the call. This can also be an error message, so return an Object here and cast in calling method.
      Throws:
        `java.lang.Exception` - any error.

    - #### webServiceCall

          public java.lang.Object webServiceCall(java.lang.String commProtocol,
                                                 WsMethodInfo webServiceInfo)
                                          throws java.lang.Exception

      Make a web service call using the selected values. In this case, the parameter values are already stored in the method description.
      Parameters:
        `commProtocol` - the communication protocol type - Soap, Rest or WSRPC
        `webServiceInfo` - the constructed method info.
      Returns:
        the soap message reply from making the call. This can also be an error message, so return an Object here and cast in calling method.
      Throws:
        `java.lang.Exception` - any error.

    - #### soapRpcCall

          protected java.lang.Object soapRpcCall(java.lang.String commProtocol,
                                                 WsMethodInfo webServiceInfo)
                                          throws java.lang.Exception

      Make a web service call using the selected values. In this case, the parameter values are retrieved from a wsdl operation object and added to the method description.
      Parameters:
        `commProtocol` - the communication protocol type - Soap or WSRPC.
        `webServiceInfo` - the constructed method info.
      Returns:
        the soap message reply from making the call. This can also be an error message, so return an Object here and cast in calling method.
      Throws:
        `java.lang.Exception` - any error.

    - #### restCall

          protected java.lang.Object restCall(WsMethodInfo webServiceInfo)
                                       throws java.lang.Exception

      Make a web service call using the selected values. In this case, the parameter values are retrieved from a wsdl operation object and added to the method description.
      Parameters:
        `webServiceInfo` - the constructed method info - gets converted to a REST message first.
      Returns:
        the rest message reply from making the call. This can also be an error message, so return an Object here and cast in calling method.
      Throws:
        `java.lang.Exception` - any error.

    - #### removeNullValues

          protected java.util.ArrayList removeNullValues(java.util.ArrayList paramHolder,
                                                         WsdlParamInfo rootParam)

      Remove any parameters with null values.
      Parameters:
        `paramHolder` - to store valid parameters in.
        `rootParam` - the parameter to parse from.
      Returns:
        a new list of parameters without the null ones.