integration-impl/src/main/java/se/idsec/signservice/integration/dss/DssUtils.java
public static <T> T toJAXB(@Nonnull final XMLObject object, @Nonnull final Class<T> destination) throws SignServiceProtocolException {
    try {
      Element element = XMLObjectSupport.marshall(object);
      JAXBContext context = JAXBContextUtils.createJAXBContext(destination);
      Object jaxb = context.createUnmarshaller().unmarshal(element);
      return destination.cast(jaxb);
    }
    catch (MarshallingException e) {
      throw new SignServiceProtocolException("Failed to marshall DSS protocol object", e);
    }
    catch (JAXBException e) {
      throw new SignServiceProtocolException("JAXB error", e);
    }
  }
/**
   * Transforms an OpenSAML object into a JAXB object.
   * 
   * @param object
   *          the OpenSAML object
   * @param destination
   *          the class for the JAXB object
   * @return the JAXB object
   * @throws SignServiceProtocolException
   *           for protocol errors
   */
Transforms an OpenSAML object into a JAXB object.

@param object
the OpenSAML object
@param destination
the class for the JAXB object
@return the JAXB object
@throws SignServiceProtocolException
for protocol errors
Transforms an OpenSAML object into a JAXB object . @param object the OpenSAML object @param destination the class for the JAXB object @return the JAXB object @throws SignServiceProtocolException for protocol errors
public static <T> T toJAXB(@Nonnull final XMLObject object, @Nonnull final Class<T> destination) throws SignServiceProtocolException {
    try {
      Element element = XMLObjectSupport.marshall(object);
      JAXBContext context = JAXBContextUtils.createJAXBContext(destination);
      Object jaxb = context.createUnmarshaller().unmarshal(element);
      return destination.cast(jaxb);
    }
    catch (MarshallingException e) {
      throw new SignServiceProtocolException("Failed to marshall DSS protocol object", e);
    }
    catch (JAXBException e) {
      throw new SignServiceProtocolException("JAXB error", e);
    }
  }
public static < T > T toJAXB ( @ Nonnull final XMLObject object , @ Nonnull final Class < T > destination ) throws SignServiceProtocolException { try { Element element = XMLObjectSupport . marshall ( object ) ; JAXBContext context = JAXBContextUtils . createJAXBContext ( destination ) ; Object jaxb = context . createUnmarshaller ( ) . unmarshal ( element ) ; return destination . cast ( jaxb ) ; } catch ( MarshallingException e ) { throw new SignServiceProtocolException ( "Failed to marshall DSS protocol object" , e ) ; } catch ( JAXBException e ) { throw new SignServiceProtocolException ( "JAXB error" , e ) ; } }
Transforms an OpenSAML object into a JAXB object.
Transforms an OpenSAML object into a JAXB object .