解组不是名称空间一部分的xml元素

|| 我有一个来自Web服务的xml响应:
<ns2:response xmlns:ns2=\"http://abc.com\">
  <ns2:msgHeader>
    <ns2:empid>1234</ns2:empid>
    <ns2:empname>John</ns2:empid>
  </ns2:msgHeader>
  <error>
    <httpstatus>500</httpstatus>
    <description>Error while processing the request.Please contact customercare</description>
  </error>
</ns2:response>
当xml模式采用这种格式时,如何解组。
<error>
是根元素ѭ2part的一部分。 我正在使用Restful客户端,并使用resttemplate向服务器发出请求。我的
applicationcontext.xml
使用
org.springframework.http.converter.xml.MarshallingHttpMessageConverter
来编组和解组请求和响应XML。     
已邀请:
        您有xsd吗?我认为元素应该在您的xsd中定义     
        大概您有一个用于
response
元素的模式,其中引用了
error
元素,该元素位于单独的模式中(不幸的是,模式在同一文件中不能有多个名称空间)。具有
error
元素的单独模式文件将没有targetNamespace。     

要回复问题请先登录注册