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<http://localhost/%5BCONTEXT%5D/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.

Reply via email to