Search in sources :

Example 6 with QuestionToFkType

use of se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.QuestionToFkType in project webcert by sklintyg.

the class FKQuestionConverterTest method jaxbToXml.

private String jaxbToXml(QuestionToFkType object) throws JAXBException {
    ObjectFactory objectFactory = new ObjectFactory();
    Writer writer = new StringWriter();
    // Init JAXB context
    JAXBContext jaxbContext = JAXBContext.newInstance(QuestionToFkType.class);
    Marshaller marshaller = jaxbContext.createMarshaller();
    // Create a string representation from JAXB element
    marshaller.marshal(objectFactory.createQuestion(object), writer);
    return writer.toString();
}
Also used : Marshaller(javax.xml.bind.Marshaller) ObjectFactory(se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.ObjectFactory) StringWriter(java.io.StringWriter) JAXBContext(javax.xml.bind.JAXBContext) StringWriter(java.io.StringWriter) Writer(java.io.Writer)

Aggregations

QuestionToFkType (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.QuestionToFkType)5 JAXBContext (javax.xml.bind.JAXBContext)2 SendMedicalCertificateQuestionResponseType (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.SendMedicalCertificateQuestionResponseType)2 FragaSvar (se.inera.intyg.webcert.persistence.fragasvar.model.FragaSvar)2 StringWriter (java.io.StringWriter)1 Writer (java.io.Writer)1 LocalDateTime (java.time.LocalDateTime)1 Marshaller (javax.xml.bind.Marshaller)1 Unmarshaller (javax.xml.bind.Unmarshaller)1 StreamSource (javax.xml.transform.stream.StreamSource)1 SOAPFaultException (javax.xml.ws.soap.SOAPFaultException)1 Test (org.junit.Test)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1 AttributedURIType (org.w3.wsaddressing10.AttributedURIType)1 QuestionFromFkType (se.inera.ifv.insuranceprocess.healthreporting.receivemedicalcertificatequestionsponder.v1.QuestionFromFkType)1 ObjectFactory (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.ObjectFactory)1 SendMedicalCertificateQuestionType (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificatequestionresponder.v1.SendMedicalCertificateQuestionType)1 HoSPersonal (se.inera.intyg.common.support.model.common.internal.HoSPersonal)1 WebCertServiceException (se.inera.intyg.webcert.common.service.exception.WebCertServiceException)1 SendMedicalCertificateQuestionValidator (se.inera.intyg.webcert.fkstub.validation.SendMedicalCertificateQuestionValidator)1