I am new in java web service programming and this question might seem really basic. But I can't find the problem.
I have developed a Apache CXF(v 2.7.6) webservice for Tomcat 6.0.37 using Eclipse. Basically, I created a dynamic web project, created webservice class and created webservice from that class (eclipse generated the rest, including wsdl and xsd). All works fine, except when I try to return array of String. This is my method
@WebMethod(action="getFriends")
public String[] getFriends(String u, String p){
return new String[] {"item 1","item 2","item 3"};
}
response type definition
<xs:complexType name="getFriendsResponse">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
and here is the returned message
INFO: Outbound Message
ID: 34 Encoding: UTF-8 Content-Type: text/xml Headers: {} Payload:
As you can see there is no even return part. Any idea what can be wrong?
I use Windows 7, Eclipse Kepler and JDK6 for this project.