soap响应

byqmnocz  于 2021-07-06  发布在  Java
关注(0)|答案(0)|浏览(285)

我在java spring boot ws应用程序中收到以下响应:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
   <soapenv:Header>
      <dateTime>23082020033057</dateTime>
   </soapenv:Header>
   <soapenv:Body>
      <TestResponse>
         <ResponseCode>06</ResponseCode>
      </TestResponse>
   </soapenv:Body>
</soapenv:Envelope>

我正在分析soaphandler类中的响应。

public class HeaderHandler implements SOAPHandler<SOAPMessageContext> {

    private static final String SOAP_ENV_NAMESPACE = "http://schemas.xmlsoap.org/soap/envelope/";
    private static final String PREFERRED_PREFIX = "soapenv";

    public boolean handleMessage(SOAPMessageContext smc) {
            SOAPMessage message = smc.getMessage();
    }
}

我收到下面的错误信息。


**javax.xml.ws.WebServiceException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: HeaderElements must be namespace qualified**

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题