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>
ルート要素の一部です<response>
。
Restful クライアントを使用しており、resttemplate を使用してサーバーにリクエストを送信しています。リクエストとレスポンスの XML をマーシャリングおよびアンマーシャリングするための私のapplicationcontext.xml
用途。org.springframework.http.converter.xml.MarshallingHttpMessageConverter