2

I have a set of java classes generated by wsimport utility from WSDL. (client) Is there a (simple, not involving sniffers and own replication of server) way to look at generated XML which is sent? I mean inside the code, some method or similar way.

dmitry
  • 4,989
  • 5
  • 48
  • 72
  • 2
    You can write your own handler which is mentioned in http://stackoverflow.com/questions/1945618/tracing-xml-request-responses-with-jax-ws – bhdrkn Feb 07 '13 at 15:02
  • 1
    If all you need is just a look into SOAP request/response (not transform or log) - it's worth to look at these simple solutions: http://stackoverflow.com/a/9035984/978664 and http://stackoverflow.com/a/16338394/978664 – dmitry Jul 24 '13 at 19:21

1 Answers1

1

Best option here is using message handlers. I'm writing from a mobile device right now, unable to provide code snippets, but you could have a look at http://docs.oracle.com/cd/E15051_01/wls/docs103/webserv_adv/handlers.html It's possible to use them on a client side as well.

Update: here is a better link http://www.mastertheboss.com/jboss-web-services/web-services-handler-chains-tutorial

andbi
  • 4,426
  • 5
  • 45
  • 70
  • Thanks, though I've suddenly resolved my problem without looking at raw request. Doing all those procedures just to sneak at what I'm trying to send makes me shiver... – dmitry Feb 07 '13 at 15:13
  • it was making me too a while ago, but it's best debugging option so far, I have empty handler stubs in every webservice. Highly recommended)) – andbi Feb 07 '13 at 15:27