You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by ev...@yandex.ru on 2009/08/04 16:41:09 UTC
Problem with annotations in Aegis & CXF
Hi! I am using cxf 2.2 with aegis. Here is a part of my spring config:
<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
<property name="configuration">
<bean class="org.apache.cxf.aegis.type.TypeCreationOptions">
<property name="defaultNillable" value="false"/>
</bean>
</property>
</bean>
So by default all members of classes/parameters of methods are with micOccures="0" and without nillable="true".
I need to make some fields of classes nillable.
I add annotation like this:
class C{
@XmlElement(nillable=true) private Calendar cal;
..}
but there is no any changes in WSDL (it is still without nillable=true). Changes are deployed, because new fields are added and so, but there is no changes when I set nillable=true with annotations. Alos I try to use other parameters of this annotation like minOccures, defaultValue, and it don't work to.
How can I fix it? THanks!
Re: Problem with annotations in Aegis & CXF
Posted by Benson Margulies <bi...@gmail.com>.
The annotation goes on the get method, not on the private field.
On Tue, Aug 4, 2009 at 10:41 AM, <ev...@yandex.ru> wrote:
> Hi! I am using cxf 2.2 with aegis. Here is a part of my spring config:
>
> <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> <property name="configuration">
> <bean class="org.apache.cxf.aegis.type.TypeCreationOptions">
> <property name="defaultNillable" value="false"/>
> </bean>
> </property>
> </bean>
>
> So by default all members of classes/parameters of methods are with micOccures="0" and without nillable="true".
> I need to make some fields of classes nillable.
> I add annotation like this:
>
> class C{
> @XmlElement(nillable=true) private Calendar cal;
> ..}
> but there is no any changes in WSDL (it is still without nillable=true). Changes are deployed, because new fields are added and so, but there is no changes when I set nillable=true with annotations. Alos I try to use other parameters of this annotation like minOccures, defaultValue, and it don't work to.
> How can I fix it? THanks!
>
Re: problem using args with wsdl2java cxf-codegen-plugin
Posted by Daniel Kulp <dk...@apache.org>.
Does your project have a dependency on the soap binding somehow? (cxf-rt-
binding-soap)? Doing the extended soap header processing requires the soap-
binding to be available.
Also, run with "mvn -X" to turn on the logging to make sure those flags are
properly being passed into wsdl2java.
Dan
On Thu August 6 2009 2:08:52 pm Sadhana Jain wrote:
> Hi,
>
> I am trying to pass the -exsh true arg for wsdl2java using the maven plugin
> But it doesn't seem to work as expected. When I run wsdl2java from command
> line, it generates the soapheader (header=true) parameter in the service
> port but when I use the plugin by passing in like this it doesn't generate
> the soapheader (that is mentioned in the wsdl): <wsdloptions>
> ...
> <extraargs>
> <extraarg>-exsh</extraaarg>
> <extraarg>true</extraaarg>
> </extraargs>
>
> </wsdloptions>
>
> Is this the correct way to pass the args or there is a problem with the
> cxf-maven-plugin?
>
> Any help will be very much appreciated.
>
> Thanks,
> Sadhana
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
problem using args with wsdl2java cxf-codegen-plugin
Posted by Sadhana Jain <Sa...@rovicorp.com>.
Hi,
I am trying to pass the -exsh true arg for wsdl2java using the maven plugin
But it doesn't seem to work as expected. When I run wsdl2java from command line, it generates the soapheader (header=true) parameter in the service port but when I use the plugin by passing in like this it doesn't generate the soapheader (that is mentioned in the wsdl):
<wsdloptions>
...
<extraargs>
<extraarg>-exsh</extraaarg>
<extraarg>true</extraaarg>
</extraargs>
</wsdloptions>
Is this the correct way to pass the args or there is a problem with the cxf-maven-plugin?
Any help will be very much appreciated.
Thanks,
Sadhana
Re: Problem with annotations in Aegis & CXF
Posted by ev...@yandex.ru.
For all who will find this topic in search engines: resolved, see explanation here: http://issues.apache.org/jira/browse/CXF-2382
04.08.09, 22:32, "Benson Margulies" <bi...@gmail.com>:
> I'll look into this.
> On Tue, Aug 4, 2009 at 10:41 AM, wrote:
> > Hi! I am using cxf 2.2 with aegis. Here is a part of my spring config:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > So by default all members of classes/parameters of methods are with micOccures="0" and without nillable="true".
> > I need to make some fields of classes nillable.
> > I add annotation like this:
> >
> > class C{
> > @XmlElement(nillable=true) private Calendar cal;
> > ..}
> > but there is no any changes in WSDL (it is still without nillable=true). Changes are deployed, because new fields are added and so, but there is no changes when I set nillable=true with annotations. Alos I try to use other parameters of this annotation like minOccures, defaultValue, and it don't work to.
> > How can I fix it? THanks!
> >
Re: Problem with annotations in Aegis & CXF
Posted by Benson Margulies <bi...@gmail.com>.
I'll look into this.
On Tue, Aug 4, 2009 at 10:41 AM, <ev...@yandex.ru> wrote:
> Hi! I am using cxf 2.2 with aegis. Here is a part of my spring config:
>
> <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype">
> <property name="configuration">
> <bean class="org.apache.cxf.aegis.type.TypeCreationOptions">
> <property name="defaultNillable" value="false"/>
> </bean>
> </property>
> </bean>
>
> So by default all members of classes/parameters of methods are with micOccures="0" and without nillable="true".
> I need to make some fields of classes nillable.
> I add annotation like this:
>
> class C{
> @XmlElement(nillable=true) private Calendar cal;
> ..}
> but there is no any changes in WSDL (it is still without nillable=true). Changes are deployed, because new fields are added and so, but there is no changes when I set nillable=true with annotations. Alos I try to use other parameters of this annotation like minOccures, defaultValue, and it don't work to.
> How can I fix it? THanks!
>