Class JaxbWsdlMarshalling

java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
org.somda.sdc.dpws.wsdl.JaxbWsdlMarshalling
All Implemented Interfaces:
com.google.common.util.concurrent.Service, WsdlMarshalling

public class JaxbWsdlMarshalling extends com.google.common.util.concurrent.AbstractIdleService implements WsdlMarshalling
Creates XML input and output streams from WSDL TDefinitions instances by using JAXB.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    marshal(org.somda.sdc.dpws.wsdl.model.TDefinitions wsdlDefinition, OutputStream outputStream)
    Takes a WSDL definition and marshals it.
    protected void
     
    protected void
     
    org.somda.sdc.dpws.wsdl.model.TDefinitions
    unmarshal(InputStream inputStream)
    Takes an input stream and unmarshals it to a WSDL definition.

    Methods inherited from class com.google.common.util.concurrent.AbstractIdleService

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.google.common.util.concurrent.Service

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
  • Method Details

    • startUp

      protected void startUp() throws Exception
      Specified by:
      startUp in class com.google.common.util.concurrent.AbstractIdleService
      Throws:
      Exception
    • shutDown

      protected void shutDown()
      Specified by:
      shutDown in class com.google.common.util.concurrent.AbstractIdleService
    • marshal

      public void marshal(org.somda.sdc.dpws.wsdl.model.TDefinitions wsdlDefinition, OutputStream outputStream) throws javax.xml.bind.JAXBException
      Takes a WSDL definition and marshals it.
      Specified by:
      marshal in interface WsdlMarshalling
      Parameters:
      wsdlDefinition - the WSDL to marshal.
      outputStream - the destination of the marshalled data.
      Throws:
      javax.xml.bind.JAXBException - if marshalling fails.
    • unmarshal

      public org.somda.sdc.dpws.wsdl.model.TDefinitions unmarshal(InputStream inputStream) throws javax.xml.bind.JAXBException, ClassCastException
      Takes an input stream and unmarshals it to a WSDL definition.
      Specified by:
      unmarshal in interface WsdlMarshalling
      Parameters:
      inputStream - the input stream to unmarshal.
      Returns:
      the unmarshalled WSDL definition.
      Throws:
      javax.xml.bind.JAXBException - if unmarshalling fails.
      ClassCastException - in case unmarshalled data could not be cast to a JAXB element.