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 Michele Mazzucco <Mi...@ncl.ac.uk> on 2006/04/29 15:43:11 UTC

[Axis2] marshalling & hashCode/equals methods question

Hi all,

I'm aware this issue is not an Axis2 question.
Does anybody know a tool that generates the hashCode() and equals()
methods in classes created from the xml schema (this is useful, for
instance, to check if the ws method argument is stored in collections on
the server side)?


Thanks in advance,
Michele

Re: [Axis2] marshalling & hashCode/equals methods question

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
I made some modifications to Castor (http://www.castor.org): now it
generates the hashCode() together with equals(). If interested see here
http://jira.codehaus.org/browse/CASTOR-1417

Best regards,
Michele

Rich Rodriguez wrote:
> I believe WSDL2Java does this.
> 
> On 4/29/06, *Michele Mazzucco* <Michele.Mazzucco@ncl.ac.uk
> <ma...@ncl.ac.uk>> wrote:
> 
>     Hi Ajith ,
> 
>     actually I haven't tryed ADB yet since the ADB tutorial says it is a
>     "simple" databinding framework (and thus it's not able to compile all
>     types of schemas).
>     At now I've tried Castor and Sun JAXB code generators and both of them
>     don't generate neither the hashCode() nor the equals() methods.
> 
>     Michele
> 
>     Ajith Ranabahu wrote:
>     > Hi Michele,
>     > If you are talking about the ADB schema compiler then this is very
>     > easy. Just modify the ADBBeanTemplate.xsl and put the new methods you
>     > want. You may need to think of a way of generating a number for
>     > hashcode but you can do it with just modifying the template
>     >
>     > Ajith
>     >
>     >
>     > On 4/29/06, Michele Mazzucco <Michele.Mazzucco@ncl.ac.uk
>     <ma...@ncl.ac.uk> > wrote:
>     >> Hi all,
>     >>
>     >> I'm aware this issue is not an Axis2 question.
>     >> Does anybody know a tool that generates the hashCode() and equals()
>     >> methods in classes created from the xml schema (this is useful, for
>     >> instance, to check if the ws method argument is stored in
>     collections on
>     >> the server side)?
>     >>
>     >>
>     >> Thanks in advance,
>     >> Michele
>     >>
>     >
>     >
>     > --
>     > Ajith Ranabahu
> 
> 

Re: [Axis2] marshalling & hashCode/equals methods question

Posted by Rich Rodriguez <ri...@gmail.com>.
I believe WSDL2Java does this.

On 4/29/06, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
>
> Hi Ajith ,
>
> actually I haven't tryed ADB yet since the ADB tutorial says it is a
> "simple" databinding framework (and thus it's not able to compile all
> types of schemas).
> At now I've tried Castor and Sun JAXB code generators and both of them
> don't generate neither the hashCode() nor the equals() methods.
>
> Michele
>
> Ajith Ranabahu wrote:
> > Hi Michele,
> > If you are talking about the ADB schema compiler then this is very
> > easy. Just modify the ADBBeanTemplate.xsl and put the new methods you
> > want. You may need to think of a way of generating a number for
> > hashcode but you can do it with just modifying the template
> >
> > Ajith
> >
> >
> > On 4/29/06, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> >> Hi all,
> >>
> >> I'm aware this issue is not an Axis2 question.
> >> Does anybody know a tool that generates the hashCode() and equals()
> >> methods in classes created from the xml schema (this is useful, for
> >> instance, to check if the ws method argument is stored in collections
> on
> >> the server side)?
> >>
> >>
> >> Thanks in advance,
> >> Michele
> >>
> >
> >
> > --
> > Ajith Ranabahu
>

Re: [Axis2] marshalling & hashCode/equals methods question

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Hi Ajith ,

actually I haven't tryed ADB yet since the ADB tutorial says it is a
"simple" databinding framework (and thus it's not able to compile all
types of schemas).
At now I've tried Castor and Sun JAXB code generators and both of them
don't generate neither the hashCode() nor the equals() methods.

Michele

Ajith Ranabahu wrote:
> Hi Michele,
> If you are talking about the ADB schema compiler then this is very
> easy. Just modify the ADBBeanTemplate.xsl and put the new methods you
> want. You may need to think of a way of generating a number for
> hashcode but you can do it with just modifying the template
> 
> Ajith
> 
> 
> On 4/29/06, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
>> Hi all,
>>
>> I'm aware this issue is not an Axis2 question.
>> Does anybody know a tool that generates the hashCode() and equals()
>> methods in classes created from the xml schema (this is useful, for
>> instance, to check if the ws method argument is stored in collections on
>> the server side)?
>>
>>
>> Thanks in advance,
>> Michele
>>
> 
> 
> -- 
> Ajith Ranabahu

Re: [Axis2] marshalling & hashCode/equals methods question

Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi Michele,
If you are talking about the ADB schema compiler then this is very
easy. Just modify the ADBBeanTemplate.xsl and put the new methods you
want. You may need to think of a way of generating a number for
hashcode but you can do it with just modifying the template

Ajith


On 4/29/06, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> Hi all,
>
> I'm aware this issue is not an Axis2 question.
> Does anybody know a tool that generates the hashCode() and equals()
> methods in classes created from the xml schema (this is useful, for
> instance, to check if the ws method argument is stored in collections on
> the server side)?
>
>
> Thanks in advance,
> Michele
>


--
Ajith Ranabahu