Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New to Spring-WS

 
M Mehta
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to get the complete Input XML with the header and all in the same way it has been sent by the client while calling the web service. How can I do that in a spring web service?

Thanks,
Me
 
Vivek K Singh
Ranch Hand
Posts: 85
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really sure about this...

For a webservice client in Spring we had to grab the XML being sent to the called system, So we wrote Interceptors that used to grab the XML and we use to log it.

Possibly you can write Interceptors that can grab and give you the request XML before the Unmarshallers deserialize the XML into java objects.

Hope it points to some solution
 
M Mehta
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Vivek for pointing to interceptor. I will be using that to capture the incomig XML.

Also, I have once more doubt. is it possible to send an already created XML file in the response without calling the marshaller to create the XML from the java object. However, the incoming request should go though the normal unmarshalling process. If I don't set the marshaller property in the applicationContext will it work that way?

Thanks,
Me
 
Vivek K Singh
Ranch Hand
Posts: 85
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can register an EndpointInterceptor with spring-ws and manipulate the response to your liking. I think Spring-WS will try to add SOAP stuff to your XML (as it is SOAP centric implementation), So you will have to use interceptors.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic