XMLStreamReader オブジェクトの Unmarshaller をしたいのですが、エラーが発生します。
私のコードのような:-
SoapHeader soapHeader = ((SoapMessage) message).getSoapHeader();
Unmarshaller unmarshaller = null;
XMLInputFactory xif = XMLInputFactory.newFactory();
xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
xif.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, false);
xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
if (null != getDummyResponse()) {
XMLStreamReader soapHeaderXsr = xif.createXMLStreamReader(soapHeader.getSource());
unmarshaller = JaxbUtil.getUnmarshaller(Dummy.class,Test.class);
unmarshaller.unmarshal(soapHeaderXsr);
} else {
unmarshaller = JaxbUtil.getUnmarshaller(Test.class);
}
エラー :-
com.dummy.exception.InvalidArgException: XML を解析できませんjava.lang.UnsupportedOperationException: javax.xml.transform.dom.DOMSource から XMLStreamReader または XMLEventReader を作成できません\n\tat com.dummy.connectors.SoapConnector.soapRequest(SoapConnector.java :54)\n\tat org.dummy.test.consumer.test.proccedLogin(test.java:180)\n\tat org.dummy.test.consumer.test.proceeddummyRequest(test.java:87)\n\ tat org.dummy.test.consumer.test$$FastClassBySpringCGLIB$$46f53c92.invoke()\n\tat org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\n\tat org.springframework. aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n\tat org.springframework.aop.interceptor. AsyncExecutionInterceptor。lambda$invoke$0(AsyncExecutionInterceptor.java:115)\n\tat java.util.concurrent.FutureTask.run(不明なソース)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(不明なソース)\n\tat java .util.concurrent.ThreadPoolExecutor$Worker.run(不明なソース)\n\tat java.lang.Thread.run(不明なソース)\n
できるだけ早く解決策を教えてください。
ありがとう