Hi Amila,
thanks for your response. Please find attached the wsdl file in question. It
was generated using the wsdl2java script included in the axis2 1.4 release
package under windows xp sp3 with Java 1.6.06 running. I also tried the latest
snapshot release with the same results. Any ideas?
Thank you in andvance!
Best regards
Andreas
Subject: Re: [AXIS2] how to use enum types (20-Jul-2008 11:42)
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
#
On Thu, Jul 17, 2008 at 5:55 PM, <[EMAIL PROTECTED]> wrote:
Dear Listmembers,
i'am using axis2 1.4 release version togehter with eclipse version 3.4.0 (WST).
I have created a webservice from a skeleton class called JobWS. Generating the
associated wsdl definition and an appropriate client stub worked like a charm
(using eclipse axis2 plugin).
So far so good, as far as i read, axis2 should support Java5 enum types since
the 1.4 release, am i right? But unfortunately this doesn't work for me.
In detail: My JobWS webservice is working with a Job class which defines among
other attributes some enum types. For example:
private DecisionYesNo computerSkills;
My example enum class looks like this:
public enum DecisionYesNo implements Serializable{
YES, NO
}
The wsdl file generated by java2wsdl (or
http://localhost/[CONTEXT]/services/JobWS?wsdl option) looks like this:
(extract)
<xs:complexType name="DecisionYesNo">
<xs:complexContent>
<xs:extension base="xs:Enum">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Which seems to be wrong because all enum values are missing. From what i know
about enum representation in xml schema it should look like this:
<xs:simpleType name="DecisionYesNo">
<xs:restriction base="xs:string">
<xs:enumeration value="YES"/>
<xs:enumeration value="NO"/>
</xs:restriction>
</xs:simpleType>
But even when i modify the generated wsdl file to reflect the xml structure
above, the wsdl2java won't generate a proper client stub.
wsdl2java tool does support this. Can you please send your wsdl?
thanks,
Amila.
So my question is, has someone expierences in using axis2 in combination with
java5 enum types and can give me a hint?
best regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Amila Suriarachchi,
WSO2 Inc.
JobWS.wsdl
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
