• Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing request object xml

 
Tommy Griffith
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. If anybody has a minute, I'm receiving a vague "schema failed validation" reply when consuming a web service. I'm creating a request object which is generally a compilation of a lot of nested objects (with associated setters, getters to attach values) and I wanted to troubleshoot the request xml that is being passed in the service call...

WebServiceReply reply = stub.getReply(request); // Service call

I can't seem to find a way to get a handle on request in order to apply anything to it to parse the xml. Thank you very much for any help and thank you for reading.

 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I would recommend using a handler to log the in and outgoing SOAP messages.
Instructions on how to create such a handler can be found in section 9.5 of this document: http://www.slideshare.net/krizsan/scdjws-5-study-notes-3085287
Assuming you are using a JAX-WS compliant web service stack.
Best wishes!
 
Tom Griffith
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the info...the platform i'm using for the client (domino) doesn't seem to support Handlers...it can't id the packages.
 
Tom Griffith
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I imported the jax-ws jar into the project and now I get a runtime ClassCastException when I try to instantiate a Binding...

ServicePortType stub = serviceLocator.getServicePort();

BindingProvider bpWS = (BindingProvider)stub; //ClassCastException

...etc...

WebServiceReply reply = stub.getReply(request); // Service call


Does anybody know what might be going on? I can't seem to get around it. Thank you very much.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I don't know what the problem is, but you can write some code using the Java reflection API to determine the classes inherited from and the interfaces implemented by the object you are trying to cast. Hopefully this will shed some more light over the cause of the problem.
Additionally, make sure that the imports in the class in question are from the correct packages and that the client artifacts use the correct interfaces/superclasses, which in this case should be from the javax.xml.ws package and subpackages.
Best wishes!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!