org.appng.api

## Class SoapClient

- java.lang.Object
- - org.appng.api.SoapClient

-     public class SoapClient
      extends Object

  A simple SOAP-client for JAXB-based webservices.
  Author:
    Matthias Müller

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SoapClient(String contextPath, String uri)`
    `SoapClient(String contextPath, String uri, boolean format)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getConnectTimeout()`
    `int` | `getReadTimeout()`
    `void` | `marshalToResult(Object object, Result result)` marshals the given object to the given result
    `String` | `marshalToString(Object object)` marshals the given object to a String using `StringResult`
    `<T> T` | `send(Object request)` sends the given request to the uri which was passed to the constructor
    `void` | `setConnectTimeout(int connectTimeout)`
    `void` | `setReadTimeout(int readTimeout)`

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

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

- - ### Constructor Detail

    - #### SoapClient

          public SoapClient(String contextPath,
                            String uri)

      Parameters:
        `contextPath` - the contextpath (package-names) for the `JAXBContext` to be created. Multiple packages have to be separated by a colon (':').
        `uri` - the endpoint uri of the webservice
      See Also:
        `JAXBContext.newInstance(String, ClassLoader)`

    - #### SoapClient

          public SoapClient(String contextPath,
                            String uri,
                            boolean format)

      Parameters:
        `contextPath` - the contextpath (package-names) for the `JAXBContext` to be created. Multiple packages have to be separated by a colon (':').
        `uri` - the endpoint uri of the webservice
        `format` - `true` if `Marshaller` should format output

  - ### Method Detail

    - #### marshalToString

          public String marshalToString(Object object)

      marshals the given object to a String using `StringResult`
      See Also:
        `Marshaller.marshal(Object, Result)`

    - #### marshalToResult

          public void marshalToResult(Object object,
                                      Result result)

      marshals the given object to the given result
      See Also:
        `Marshaller.marshal(Object, Result)`

    - #### send

          public <T> T send(Object request)

      sends the given request to the uri which was passed to the constructor
      Parameters:
        `request` - the request, needs to be an `XmlRootElement`
      Returns:
        an instance of the desired type

    - #### getConnectTimeout

          public int getConnectTimeout()

      Returns:

    - #### setConnectTimeout

          public void setConnectTimeout(int connectTimeout)

      Parameters:
        `connectTimeout` -

    - #### getReadTimeout

          public int getReadTimeout()

      Returns:

    - #### setReadTimeout

          public void setReadTimeout(int readTimeout)

      Parameters:
        `readTimeout` -

Copyright © 2011–2023 aiticon GmbH. All rights reserved.