axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gudla, Natraj (GE Money, consultant)" <>
Subject RE: On ADB Binding
Date Tue, 04 Sep 2007 09:35:57 GMT
I am using AXIS2 1.2, Generated the data binding classes using WSDL2Java utility and i am
trying to parse instance of an xml against the generated binding classes. I see a problem
in which the xml restrictions are converted into code by AXIS utility.
My XML schema condition :
<!-- Positive Integer simple type -->

<xsd:simpleType name="GEM_PostvInt_Type">

<xsd:restriction base="xsd:integer">

<xsd:minExclusive value="0"/>



The corresponding code generated in a class : 


* Auto generated setter method


* @param param

* GEM_PostvInt_Type


public void setGEM_PostvInt_Type(java.math.BigInteger param) {

if (, "0") > 0) {

this.localGEM_PostvInt_Type = param;

} else {

throw new java.lang.RuntimeException();




I check the api docs for ConverterUtil, which says this particular method returns a zero when
values are equal, +ve when greater, -ve when lesser. If you look at my xml, i want zero to
be mininclusive meaning it should be allowed, in such a case why is the method checking for
>0 and not >=0. 

I get an exception, as the control moves to the else part. i see the converterutil returns
a 0 as input value is zerp and is being compared with zero.




-----Original Message-----
From: Gudla, Natraj (GE Money, consultant) 
Sent: 30 August 2007 11:48
To: ''
Cc: ''
Subject: RE: On ADB Binding

Thanks Amila, It clarifies my doubt. We were a bit hesitant to go ahead with the ADB binding
for the reasons on limitations stated in the documents. 

-----Original Message-----
From: Amila Suriarachchi []
Sent: 30 August 2007 11:44
Subject: Re: On ADB Binding

ADB does support restrictions and extensions. 
those documentation are bit obsolete.


On 8/30/07, Gudla, Natraj (GE Money, consultant) <> wrote: 


The AXIS2 1.2 documentation states the ADB binding does not support xml restrictions and extensions.
Is it really true? When i generated Java classes from a WSDL, i see the restrictions on the
types to be properly generated within the element classes. 

Following is part of my schema with restriction on the max length.

        <xsd:simpleType name="LN_PaymentProtection">
                        <xsd:documentation>Elements of payment protection represent
                        protection types and can be only a string type</xsd:documentation>
                <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="2"></xsd:maxLength> 

The code generated by AXIS ADB binding through WSDL2Java, check on the max length within the

        public void setLN_PaymentProtection( java.lang.String param) {

                if ((java.lang.String.valueOf(param).length() <= 2)) {
                        this.localLN_PaymentProtection = param;
                } else {
                        throw new java.lang.RuntimeException();


Do you see a point over here? what did the documentation exactly mean?


To unsubscribe, e-mail:
For additional commands, e-mail:  <>

Amila Suriarachchi,
WSO2 Inc. 

View raw message