hi guys. for some reason the default JAXB unmarshaller doesnt work in my SOAP service. i want to try use Jackson but the thing is that idk how to get the XML request body. can smb help me out? bc so far i have this, and it works, but i want to grab the XML from the request:
@Endpoint
public class PerlasEndpoint {
@Autowired
PerlasService perlasService;
private static final String SOAP_NAMESPACE="http://mycompany.lt/soap-web-service";
@PayloadRoot(namespace = SOAP_NAMESPACE,localPart = "idCheckRequest")
@ResponsePayload
public PerlasIdCheckResponseDTO checkId(@RequestPayload PerlasIdCheckRequestDTO perlasIdCheckRequestDTO) throws JAXBException, JsonProcessingException {
String xml = "<idCheckRequest xmlns=\"http://mycompany.lt/soap-web-service\"><userId>51000</userId><transactionId>132</transactionId></idCheckRequest>";
XmlMapper mapper = new XmlMapper();
PerlasIdCheckRequestDTO value = mapper.readValue(xml, PerlasIdCheckRequestDTO.class);
System.out.println("---: "+value.getUserId());
PerlasIdCheckResponseDTO perlasIdCheckResponseDTO = new PerlasIdCheckResponseDTO();
perlasIdCheckResponseDTO.setStatus("STATUS");
return perlasIdCheckResponseDTO;
}
}