I am calling some web services using "webServiceTemplate1.marshalSendAndReceive". Request is going successfully but while parsing the response, I am getting ClassCastException!!! I searched a lot over google. Seems this error can be because of multiple issue like namespace, xmlrootelement etc. I have tried but problem still persists. So decided to form the Response through my own custom extractor by implementing interface org.springframework.oxm.Unmarshaller.
As per the interface I have to implement the below interfaces. I have checked that response is available in Source but not able cast it. Even I tried to marshal to xml and unmarshalling back, nothing!!!
So without wasting my time, I want to build JAXB Object through Source. Would you point me to the best/efficient approach for the same. eg. should I manually iterate or xpath or something else that should be fast and without any performance issue.
public boolean supports(Class<?> arg0);
public Object unmarshal(Source arg0) ;