Ulrich,
First of all, WSDL does not contain any "class" descriptions. WSDL
contains element and type descriptions -- specified using XML Schema.
If you read through the archives, you will see frequent
recommendations to take a "WSDL first" or "Schema first" approach to
web services rather than a "Java first" approach.
Here is an example of a definition of simple type that is an
enumeration of string values:
<xs:simpleType name="MyEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="value1"/>
<xs:enumeration value="value2"/>
</xs:restriction>
</xs:simpleType>
Anne
On Sun, 27 Feb 2005 23:20:30 +0100, Ulrich Ackermann
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> in the meantime I came to the conclusion, that my question has no solution
> that could satisfy me. I fear that there is no way to create a WSDL file
> containing a class description, where the class contains just public static
> members (or does the WSDL spec offer a way to express such things?).
>
> Could anyone confirm my assumption? Is there an alternative way to restrict
> the value of a method parameter to a set of predefined String values?
>
> Regards,
> Ulrich
>
> [email protected] schrieb am 27.02.05 00:08:00:
>
> Hi,
>
> I have a problem using something like typed enums in the signature of my
> webservice methods (don't know if 'typed enums' is the right term).
>
> E.g.:
> public class MyEnum {
> private String attribute = null;
>
> public static MyEnum VALUE_1 = new MyEnum("value1");
> // other static values go here
>
> private MyEnum(String attribute) {
> this.attribute = attribute;
> }
>
> // other methods like toString() go here
> }
>
> Now, if I have a method like this in my interface...
> public void myMethod(String someParam, MyEnum otherParam);
>
> ... and run the axis-java2wsdl ant task, the MyEnum class looks quit
> different than before: axis-java2wsdl added some attributes and implemented
> the equals and hashcode methods (which is quite ok I guesss...) and removed
> everything I typed in before in the MyEnum class (which is not ok - at least
> for me).
> But maybe this has a reason, and as I'm quite new to webservices this is a
> feature and not a flaw.
> Is there a way to keep the intention of the MyEnum class and let the axis ant
> task generate what I intended?
>
> I use the ant task in this way:
> <axis-java2wsdl
>
> output="${project.webservice.wsdl.dir}/${project.webservice.wsdl.filename}"
>
> location="http://${project.webservice.host}:${project.webservice.port}/axis/services/${project.webservice.service.namespace}"
> namespace="${project.webservice.service.name}"
> classname="${project.webservice.endpoint.package.structure}">
> <classpath>
> <path refid="axis.lib.path" ></path>
> </classpath>
> <mapping namespace="service" package="service"/>
> </axis-java2wsdl>
>
> Regards,
> Ulrich
>
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
>