You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Amit Kumar(CT)" <ku...@quark.com> on 2006/09/06 12:25:36 UTC

WSDL and Java Constants

 

 

I have a package hierarchy where constants and service interfaces are
kept separate.

Now when I run java2wsdl on my any service interface these constants are
not reflected in the wsdl?

Can anybody tell me whether wsdl supports constants if yes then how I
can make it work.

Else what are the available alternatives,as I have to consume my wsdl in
.net client so constants are really important for me.

 


Thanks 

Amit Kumar
DMS-R&D
Ext No -9442
09316066353
 

 

 


Re: WSDL and Java Constants

Posted by Rodrigo Ruiz <rr...@gridsystems.com>.
The only similar thing in WSDL are enumerated types. If your constants
are "groups of valid parameter values" you should be able to
redesign/refactor your interface and use them.

AFAIK, WSDL enumerated types have no specific value associated, only
their names are important. If you need them to have any specific value
pattern you will have to manually modify generated code. For example,
with Axis Java, an enumerated type is converted into a java class
following the Type-Safe Enumeration pattern. The generated constants
will have an increasing internal value starting by 0. If you want these
values to be, for example, bit-masks, you will have to go to the
generated code and set the values for each constant.

Hope this helps

Amit Kumar(CT) wrote:
>  
> 
>  
> 
> I have a package hierarchy where constants and service interfaces are
> kept separate.
> 
> Now when I run java2wsdl on my any service interface these constants are
> not reflected in the wsdl?
> 
> Can anybody tell me whether wsdl supports constants if yes then how I
> can make it work.
> 
> Else what are the available alternatives,as I have to consume my wsdl in
> .net client so constants are really important for me.
> 
>  
> 
> 
> Thanks
> 
> Amit Kumar
> DMS-R&D
> Ext No -9442
> 09316066353
> 
>  
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.11.7/438 - Release Date: 05/09/2006

-- 
-------------------------------------------------------------------
GRIDSYSTEMS                    Rodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorca        mailto:rruiz@gridsystems.com
Baleares - EspaƱa              Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
-------------------------------------------------------------------


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.7/438 - Release Date: 05/09/2006


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org