AnsweredAssumed Answered

Change output type of jax-ws service

Question asked by bergerle on Jan 14, 2015
Latest reply on Jan 19, 2015 by bergerle

Hi fellow developers,


I'm currently developing a plugin in which I'm using jax-ws services with a declaration like this (in spring.xml):

<bean id="myServiceClass" class="">
<jaxws:endpoint id="myServiceEp" address="/myService/path"
       <ref bean="myServiceClass" />
       <ref bean="wrappedServiceFactory" />


Basically this works fine, but it always outputs some kind of SOAP style XML, no matter what return type my method has.


How can I change that behavior to output simple text (in my case JSON)?

And if I can do this, can I also get it to support a file download (right now, if I return a DataHandler, it encodes it with Base64 and returns that string in XML).


I know I could achieve this by using struts actions, but I want to get it working with WebServices.


Can anyone please help me out here?