Package org.appng.api

Class SoapClient


  • public class SoapClient
    extends Object
    A simple SOAP-client for JAXB-based webservices.
    Author:
    Matthias Müller
    • Constructor Detail

      • 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 -