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 rajivgup <ri...@gmail.com> on 2009/01/22 16:28:16 UTC

Element Fixed vaule not supported with wsdl2java?

Hi, I want to fix some the the element values for example:

<element name="TRUE" type="boolean" fixed="1"/>

Whenever I refer "TRUE" it should be "1" and it should be changed. When I
run wsdl2java on this wsdl the java code to allow any value.  Then I tried
this

<element name="TRUE" type="boolean" default="1"/>

In this case I'm able to get the default to "1", but anyone can set it to
different value by calling setmethod. 

Is there any workaround for this? Why I want to fix because this is the
requirement. 

Any help will be greatly appreciated.

Thanks,
-- 
View this message in context: http://www.nabble.com/Element-Fixed-vaule-not-supported-with-wsdl2java--tp21606482p21606482.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: Element Fixed vaule not supported with wsdl2java?

Posted by Kamal Chandana Mettananda <lk...@gmail.com>.
Hi,

It seems you are trying to generate a final field or a field without a
setter method.

Generally the generated beans have both setters and getters, so I'm not sure
whether this is possible.


Kamal Mettananda
http://lkamal.blogspot.com


On Thu, Jan 22, 2009 at 8:58 PM, rajivgup <ri...@gmail.com> wrote:

>
> Hi, I want to fix some the the element values for example:
>
> <element name="TRUE" type="boolean" fixed="1"/>
>
> Whenever I refer "TRUE" it should be "1" and it should be changed. When I
> run wsdl2java on this wsdl the java code to allow any value.  Then I tried
> this
>
> <element name="TRUE" type="boolean" default="1"/>
>
> In this case I'm able to get the default to "1", but anyone can set it to
> different value by calling setmethod.
>
> Is there any workaround for this? Why I want to fix because this is the
> requirement.
>
> Any help will be greatly appreciated.
>
> Thanks,
> --
> View this message in context:
> http://www.nabble.com/Element-Fixed-vaule-not-supported-with-wsdl2java--tp21606482p21606482.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>