I am struggling with an Spring-WS with JMS example. I set the Spring-WS and JMS wiring as per the Spring recommendations. But I kept getting following error. I dont know how to
I had a similar error. the problem is that the request and response generated from XSD/WSDL missed the @XMLRootElement annotation. By adding JAXBElement to the endpoint solved the problem.
private static final String NAMESPACE_URI = "";
@Autowired
Service service;
@PayloadRoot ( namespace = Endpoint.NAMESPACE_URI, localPart = "name" )
@ResponsePayload
public JAXBElement < Response > Create ( @RequestPayload JAXBElement < Request> request ) throws Exception
{
ObjectFactory factory = new ObjectFactory ( );
Response response = new Response ( );
Request req = request.getValue ( );
response = this.service.call( req);
return factory.createResponse ( response );
}