Dims may have some further insight, though in the meantime I just do a
simple conversion. With this example in the wsdl:

<element minOccurs="1" maxOccurs="1" nillable="true"
name="TipoMibEnum" type="xsd:int"/>

You'd get that value in the Service with the idea of converting it to this:

public enum TipoMib implements Serializable{

       MIB2,
       MIB_GERENCIA,
       MIB_ESPECIFICA;
}

I do the conversion as:

private static TipoMib getTipoMib(Integer ordinal) {
      if (TipoMib.MIB2.ordinal() == ordinal) {
          return TipoMib.MIB2;
      } else if (TipoMib.MIB_ESPECIFICA.ordinal() == ordinal) {
          return TipoMib.MIB_ESPECIFICA;
      } else if (TipoMib.MIB_GERENCIA.ordinal() == ordinal) {
          return TipoMib.MIB_GERENCIA;
      } else
          return null;
}

To convert the other way I do tipoMib.ordinal() - see the javadoc of
Enum about ordinal() .

HTH,
Robert

On 2/22/07, Meghna Rao <[EMAIL PROTECTED]> wrote:
Dims,
We are starting from java classes.
The POJOs will contain references to java 5 enum types and so wanted to know
if axis would support this before we implemented these objects and put them
on the wire.

Thanks.



Davanum Srinivas <[EMAIL PROTECTED]> wrote:
 Megha,

Are u starting from wsdl? or starting from java classes?

-- dims

On 2/21/07, Meghna Rao wrote:
> Hi,
>
> Wanted to know where the support for Java 5 enum stands.
> Is it on the cards for release 1.2 or in near future? We are in the
process
> of designing our application to use enums and wanted to know if axis2
> supports/ will support them.
>
> Thanks,
> Meghna
>
>
> ________________________________
> Want to start your own business? Learn how on Yahoo! Small Business.
>
>


--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




 ________________________________
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to