File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes New to Spring-WS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "New to Spring-WS" Watch "New to Spring-WS" New topic
Author

New to Spring-WS

M Mehta
Ranch Hand

Joined: Aug 03, 2006
Posts: 92
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

Joined: Dec 22, 2009
Posts: 85

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


SCJP 6
M Mehta
Ranch Hand

Joined: Aug 03, 2006
Posts: 92
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

Joined: Dec 22, 2009
Posts: 85

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: New to Spring-WS