如何删除Jaxb2Marshaller响应中的XML声明?
我已经使用mvn包和WSDL生成了java源代码 我从服务器得到如下响应如何删除Jaxb2Marshaller响应中的XML声明?,xml,spring-boot,soap,jaxb,unmarshalling,Xml,Spring Boot,Soap,Jaxb,Unmarshalling,我已经使用mvn包和WSDL生成了java源代码 我从服务器得到如下响应 <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <doIFXResponse xmlns="http://www.openuri.org/"> <doIFXResult> <?xml version="1.
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<doIFXResponse xmlns="http://www.openuri.org/">
<doIFXResult>
<?xml version="1.0" encoding="UTF-8" ?>
<IFX>
<SvcRs>Ravi</SvcRs>
</IFX>
</doIFXResult>
</doIFXResponse>
有没有办法从响应体中删除XML声明
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<doIFXResponse xmlns="http://www.openuri.org/">
<doIFXResult>
<IFX>
<SvcRs>Ravi</SvcRs>
</IFX>
</doIFXResult>
</doIFXResponse>
SOAPDepInqRs response = (SOAPDepInqRs) getWebServiceTemplate().marshalSendAndReceive(doIfx);
JAXb2Client InqClient = new InqClient();
InqClient.setDefaultUri("http://*****:****/service.jws");
InqClient.setMarshaller(Jaxb2Marshaller);
InqClient.setUnmarshaller(Jaxb2Marshaller);