Can we return a custom object type from a .JWS file
Here is my situation:
I'm using Apache Axis 1.1. I'm trying to set up a custom web service as a .jws file that is simply dropped onto the axis web app folder. So I'll have /axis/MyWebService.jws
This all works well and good, the WSDL file is automatically generated etc. However, I want to be able to return more than just String
of Integer
etc. I want to be able to return simple Java Bean type objects as well.
Given that I'm stuck to the technology that I'm using, is there any way for me to accomplish this? My tomcat environment is java 1.5.XX
, but it looks like the .jws
files are compiled using 开发者_运维技巧1.4 or so, b/c they cannot contain Generics etc.
I'm open to suggestions, as long as I don't have to overhaul the structure, or change the environment etc.
Turns out it;s just a matter of having a Java Bean type class put into the class path accessible by the JWS file. Once it's there, the automatic conversion to XML takes care of creating a Complex SOAP type etc... so Easy as pie, just need to have your code in the right place! Hope this helps someone else
精彩评论