Springboot SOAP service unmarshalling Issue with the response from WebServiceTemplate
Springboot SOAP service unmarshalling Issue with the response from WebServiceTemplate I am really bugged with an unmarshalling issue with the response from the SOAP service. I am using springboot application and WebServiceTemplate for calling an existing SOAP service. I am using below code to set up beans for marshalling and webservicetemplate. Any help is highly appreciated. On calling webServiceTemplate.marshalSendAndReceive(request); I am expecting TravelResponse object but it is giving me JAXBElement<TravelResponse> object as response. I need help to understand 1) why is it giving above response instead of TravelResponse 2) How to convert to TravelResponse webServiceTemplate.marshalSendAndReceive(request); TravelResponse object JAXBElement<TravelResponse> object TravelResponse TravelResponse Code snippet below: @Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("com.cater.t...