users@glassfish.java.net

webservices

From: <glassfish_at_javadesktop.org>
Date: Sun, 16 Dec 2007 17:56:22 PST

i'm very new to developing web services(and JEE applications in general), and after reading though the J5ee tutorial on the subject of web services. I'm a little confused.

How do I define complex return types?

Say, i had a method returning an list of structures, containing two properties(to keep everything simple). How would I go about that?

something like

@Webmethod
public MyReturnClass[] methodname() {...}

combined with a class looking something like this? :

class MyReturnClass {
    private int number;
    private String str;

    // setter and getter methods here

}

does this class need to be a javabean? if yes, is it possible to not use a empty constructor?

And more importantly, do i need to write a xml scheme for this type? or does glassfish handle that for me?

-cheers
[Message sent by forum member 'stooopiddev' (stooopiddev)]

http://forums.java.net/jive/thread.jspa?messageID=250328