Jaxb setting dynamic @XmlRootElement with Spring Web Services -


i have spring application consumes soap web services. have several classes quite simple , differ in @xmlrootelement. i'm wondering if there's way create more generic class can set root element on dymanically.

here's few of classes root element being different.

@xmlrootelement(name="safetydate") public class safetydaterequest extends carrier411requestimpl { }  @xmlrootelement(name="checkallsafety") public class safetygetallrequest extends carrier411requestimpl { }  @xmlrootelement(name="checksafetyupdates") public class safetygetupdatesrequest extends carrier411requestimpl { } 

in class, i'm processing these classes in following fashion:

private void sendrequest(carrier411request request, carrier411responsehandler responsehandler) throws faultcodeexception {     carrier411response response = (carrier411response) ws.marshalsendandreceive(registry.get(request.getclass()), request);      checkresponseforfault(response);      responsehandler.handleresponse(request, response); } 

i know there's version of marshalsendandreceive accepts callback allowing modify request before sending it, haven't figured out how achieve i'm trying do.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -