Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何删除Jaxb2Marshaller响应中的XML声明?_Xml_Spring Boot_Soap_Jaxb_Unmarshalling - Fatal编程技术网

如何删除Jaxb2Marshaller响应中的XML声明?

如何删除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.

我已经使用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.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);