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 "Gudla, Natraj (GE Money, consultant)" <na...@ge.com> on 2007/08/30 10:08:44 UTC

On ADB Binding

Hi,

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:annotation>
			<xsd:documentation>Elements of payment protection represent the 
			protection types and can be only a string type</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="2"></xsd:maxLength>
		</xsd:restriction>
	</xsd:simpleType>

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

	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?

Thanks
Natraj.

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


Re: On ADB Binding

Posted by Amila Suriarachchi <am...@gmail.com>.
On 9/5/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com> wrote:
>
>  The code generated from AXIS2 1.3 looks to be good. But Amila, we have
> almost started the development work and it not a feasible thing to swtich
> version at this moment. Is there a work around?
>

The only work around is getting the source code and changing the
ADBBeanTemple.

Anyway going to axis2 1.3 should not change your development work. as I
guess you should have developed only the Skelton and client classes which
uses ADB generated classes.

The interface of these classes has not changed. So the generated code with
Axis2 1.3 should comple and work with the what ever code you have developed.

Amila.

and with parsing the double value, i see that my IDE XML editor shows up the
> value in red saying it is not a valid double. where as 0.00 i feel is the
> correct one.
>
> Thanks
> Natraj
>
>
> -----Original Message-----
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* 05 September 2007 11:48
> *To:* axis-user@ws.apache.org
> *Subject:* Re: On ADB Binding
>
>
>
> On 9/5/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com>
> wrote:
> >
> >  The IDE ( eclipse ) does not recognize 0.00 as a valid value for the
> > schema element earlier decalared as double with minInclusive value of
> > 0.00. I have seen few articles on the net which talk about the
> > conversion problems with 0, 0.00, 0.0000 etc all are not considered to
> > be zeros.
> >
>
> you mean Double.parseDouble("0.00");
> does not work in your IDE?
>
>  Another problem as i had earlier stated is AXIS does not genereted the
> > conditions properly to check for the minInclusive value stated in the
> > schema. It puts a condition to check for something greater.
> >
>
> Please check with axis2 1.3. this should be fixed.
>
> here is the generated code for me
> if (org.apache.axis2.databinding.utils.ConverterUtil.compare (param, "0.00")
> >= 0){
>
> this.localGEM_PostvDbl_Type=param;
>                                                 }
>                                                 else {
>                                                     throw new
> java.lang.RuntimeException();
>                                                 }
>
>   -----Original Message-----
> > *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> > *Sent:* 05 September 2007 05:36
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: On ADB Binding
> >
> > what is the exception you are getting?
> > here is the setter method generated
> >
> >  public void setGEM_PostvDbl_Type(double param) {
> >         if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param,
> > "0.00 ") > 0) {
> >             this.localGEM_PostvDbl_Type = param;
> >         } else {
> >             throw new java.lang.RuntimeException();
> >         }
> >     }
> >
> > and this calls ConverterUtil.compare method.
> >
> > public static double compare(double doubleValue, String value) {
> >         return doubleValue - Double.parseDouble(value);
> >     }
> >
> > so it basically use the parseDouble method of the Double class.
> >
> > Amila.
> >
> > On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com>
> > wrote:
> > >
> > >  I am just running through another problem with min inclusive values
> > > on double types. For declaration,
> > >
> > >
> > > <xsd:simpleType name= "GEM_PostvDbl_Type" >
> > >
> > > <xsd:restriction base= "xsd:double" >
> > >
> > > <xsd:minExclusive value= "0.00"/>
> > >
> > > </xsd:restriction>
> > >
> > > </xsd:simpleType>
> > > An xml schema instance value of 0.00 throws an error, saying it not a
> > > valid value. 0.00 is a double value, and what could be the problem?
> > >
> > > Thanks
> > > Natraj
> > >
> > >
> > >
> > > -----Original Message-----
> > > *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> > > *Sent:* 04 September 2007 13:07
> > > *To:* axis-user@ws.apache.org
> > > *Subject:* Re: On ADB Binding
> > >
> > >
> > >
> > > On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com>
> > > wrote:
> > > >
> > > >  Hi,
> > > >
> > > > 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" />
> > > >
> > > > </xsd:restriction>
> > > >
> > > > </xsd:simpleType>
> > > >
> > > > *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* (org.apache.axis2.databinding.utils.ConverterUtil.*compare*(param,
> > > > "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
> > > >
> > >
> > > your given schema part declares it as
> > >
> > > <xsd:minExclusive value="0" />
> > >
> > > Anyway if you don't have any special reason to use Axis2 1.2 better
> > > switch to Axis2 1.3.
> > >
> > > Amila.
> > >
> > >   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.
> > > >
> > > > Thanks
> > > > Natraj
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > *From:* Gudla, Natraj (GE Money, consultant)
> > > > *Sent:* 30 August 2007 11:48
> > > > *To:* 'axis-user@ws.apache.org'
> > > > *Cc: *' rsandu@kanbay.com'
> > > > *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 [mailto:amilasuriarachchi@gmail.com]
> > > > *Sent: *30 August 2007 11:44
> > > > *To:* axis-user@ws.apache.org
> > > > *Subject:* Re: On ADB Binding
> > > >
> > > > ADB does support restrictions and extensions.
> > > > those documentation are bit obsolete.
> > > >
> > > > Amila.
> > > >
> > > > On 8/30/07, Gudla, Natraj (GE Money, consultant) <
> > > > natraj.gudla@ge.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > 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:annotation>
> > > > >                         <xsd:documentation>Elements of payment
> > > > > protection represent the
> > > > >                         protection types and can be only a string
> > > > > type</xsd:documentation>
> > > > >                 </xsd:annotation>
> > > > >                 <xsd:restriction base="xsd:string">
> > > > >                         <xsd:maxLength value="2"></xsd:maxLength>
> > > > >                 </xsd:restriction>
> > > > >         </xsd:simpleType>
> > > > >
> > > > > The code generated by AXIS ADB binding through WSDL2Java, check on
> > > > > the max length within the code.
> > > > >
> > > > >         public void setLN_PaymentProtection( java.lang.Stringparam) {
> > > > >
> > > > >                 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?
> > > > >
> > > > > Thanks
> > > > > Natraj.
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > >
> > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Amila Suriarachchi,
> > > > WSO2 Inc.
> > > >
> > > >
> > >
> > >
> > > --
> > > Amila Suriarachchi,
> > > WSO2 Inc.
> > >
> > >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
> >
> >
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

RE: On ADB Binding

Posted by "Gudla, Natraj (GE Money, consultant)" <na...@ge.com>.
The code generated from AXIS2 1.3 looks to be good. But Amila, we have almost started the development work and it not a feasible thing to swtich version at this moment. Is there a work around?
 
and with parsing the double value, i see that my IDE XML editor shows up the value in red saying it is not a valid double. where as 0.00 i feel is the correct one.
 
Thanks
Natraj
 

-----Original Message-----
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: 05 September 2007 11:48
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding




On 9/5/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

The IDE ( eclipse ) does not recognize 0.00 as a valid value for the schema element earlier decalared as double with minInclusive value of 0.00. I have seen few articles on the net which talk about the conversion problems with 0, 0.00, 0.0000 etc all are not considered to be zeros.


you mean Double.parseDouble("0.00"); 
does not work in your IDE?



Another problem as i had earlier stated is AXIS does not genereted the conditions properly to check for the minInclusive value stated in the schema. It puts a condition to check for something greater.


Please check with axis2 1.3. this should be fixed.

here is the generated code for me
if (org.apache.axis2.databinding.utils.ConverterUtil.compare (param, "0.00") >= 0){
                                                    this.localGEM_PostvDbl_Type=param;
                                                }
                                                else { 
                                                    throw new java.lang.RuntimeException();
                                                } 



-----Original Message-----
From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com]

Sent: 05 September 2007 05:36
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding


what is the exception you are getting? 
here is the setter method generated

 public void setGEM_PostvDbl_Type(double param) {
        if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "0.00 ") > 0) {
            this.localGEM_PostvDbl_Type = param;
        } else {
            throw new java.lang.RuntimeException();
        }
    }

and this calls ConverterUtil.compare method.

public static double compare(double doubleValue, String value) {
        return doubleValue - Double.parseDouble(value);
    }

so it basically use the parseDouble method of the Double class.

Amila. 


On 9/4/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

I am just running through another problem with min inclusive values on double types. For declaration,
 


<xsd:simpleType name= "GEM_PostvDbl_Type" > 



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



<xsd:minExclusive value= "0.00"/> 



</xsd:restriction> 



</xsd:simpleType>
An xml schema instance value of 0.00 throws an error, saying it not a valid value. 0.00 is a double value, and what could be the problem?
 
Thanks
Natraj
 
 

-----Original Message-----
From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com]

Sent: 04 September 2007 13:07
To: axis-user@ws.apache.org  <ma...@ws.apache.org> 
Subject: Re: On ADB Binding





On 9/4/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,
 
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" />

</xsd:restriction>

</xsd:simpleType>

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 (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "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 


your given schema part declares it as 

<xsd:minExclusive value="0" />

Anyway if you don't have any special reason to use Axis2 1.2 better switch to Axis2 1.3.


Amila.



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.

Thanks
Natraj

 

 



-----Original Message-----
From: Gudla, Natraj (GE Money, consultant) 
Sent: 30 August 2007 11:48
To: ' axis-user@ws.apache.org'
Cc: '  <ma...@kanbay.com> rsandu@kanbay.com'
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 [mailto: amilasuriarachchi@gmail.com]
Sent: 30 August 2007 11:44
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding


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

Amila.


On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,

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:annotation>
                        <xsd:documentation>Elements of payment protection represent the 
                        protection types and can be only a string type</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="2"></xsd:maxLength> 
                </xsd:restriction>
        </xsd:simpleType>

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

        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?

Thanks
Natraj.

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






-- 
Amila Suriarachchi,
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 


Re: On ADB Binding

Posted by Amila Suriarachchi <am...@gmail.com>.
On 9/5/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com> wrote:
>
>  The IDE ( eclipse ) does not recognize 0.00 as a valid value for the
> schema element earlier decalared as double with minInclusive value of 0.00.
> I have seen few articles on the net which talk about the conversion problems
> with 0, 0.00, 0.0000 etc all are not considered to be zeros.
>

you mean Double.parseDouble("0.00");
does not work in your IDE?

Another problem as i had earlier stated is AXIS does not genereted the
> conditions properly to check for the minInclusive value stated in the
> schema. It puts a condition to check for something greater.
>

Please check with axis2 1.3. this should be fixed.

here is the generated code for me
if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "0.00")
>= 0){

this.localGEM_PostvDbl_Type=param;
                                                }
                                                else {
                                                    throw new
java.lang.RuntimeException();
                                                }

-----Original Message-----
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* 05 September 2007 05:36
> *To:* axis-user@ws.apache.org
> *Subject:* Re: On ADB Binding
>
> what is the exception you are getting?
> here is the setter method generated
>
>  public void setGEM_PostvDbl_Type(double param) {
>         if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param,
> "0.00 ") > 0) {
>             this.localGEM_PostvDbl_Type = param;
>         } else {
>             throw new java.lang.RuntimeException();
>         }
>     }
>
> and this calls ConverterUtil.compare method.
>
> public static double compare(double doubleValue, String value) {
>         return doubleValue - Double.parseDouble(value);
>     }
>
> so it basically use the parseDouble method of the Double class.
>
> Amila.
>
> On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com>
> wrote:
> >
> >  I am just running through another problem with min inclusive values on
> > double types. For declaration,
> >
> >
> > <xsd:simpleType name="GEM_PostvDbl_Type" >
> >
> > <xsd:restriction base="xsd:double" >
> >
> > <xsd:minExclusive value= "0.00"/>
> >
> > </xsd:restriction>
> >
> > </xsd:simpleType>
> > An xml schema instance value of 0.00 throws an error, saying it not a
> > valid value. 0.00 is a double value, and what could be the problem?
> >
> > Thanks
> > Natraj
> >
> >
> >
> > -----Original Message-----
> > *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> > *Sent:* 04 September 2007 13:07
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: On ADB Binding
> >
> >
> >
> > On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com>
> > wrote:
> > >
> > >  Hi,
> > >
> > > 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" />
> > >
> > > </xsd:restriction>
> > >
> > > </xsd:simpleType>
> > >
> > > *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* (org.apache.axis2.databinding.utils.ConverterUtil.*compare*(param,
> > > "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
> > >
> >
> > your given schema part declares it as
> >
> > <xsd:minExclusive value="0" />
> >
> > Anyway if you don't have any special reason to use Axis2 1.2 better
> > switch to Axis2 1.3.
> >
> > Amila.
> >
> >   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.
> > >
> > > Thanks
> > > Natraj
> > >
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > *From:* Gudla, Natraj (GE Money, consultant)
> > > *Sent:* 30 August 2007 11:48
> > > *To:* 'axis-user@ws.apache.org'
> > > *Cc:* ' rsandu@kanbay.com'
> > > *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 [mailto:amilasuriarachchi@gmail.com]
> > > *Sent: *30 August 2007 11:44
> > > *To:* axis-user@ws.apache.org
> > > *Subject:* Re: On ADB Binding
> > >
> > > ADB does support restrictions and extensions.
> > > those documentation are bit obsolete.
> > >
> > > Amila.
> > >
> > > On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > 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:annotation>
> > > >                         <xsd:documentation>Elements of payment
> > > > protection represent the
> > > >                         protection types and can be only a string
> > > > type</xsd:documentation>
> > > >                 </xsd:annotation>
> > > >                 <xsd:restriction base="xsd:string">
> > > >                         <xsd:maxLength value="2"></xsd:maxLength>
> > > >                 </xsd:restriction>
> > > >         </xsd:simpleType>
> > > >
> > > > The code generated by AXIS ADB binding through WSDL2Java, check on
> > > > the max length within the code.
> > > >
> > > >         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?
> > > >
> > > > Thanks
> > > > Natraj.
> > > >
> > > > ---------------------------------------------------------------------
> > > >
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Amila Suriarachchi,
> > > WSO2 Inc.
> > >
> > >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
> >
> >
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

RE: On ADB Binding

Posted by "Gudla, Natraj (GE Money, consultant)" <na...@ge.com>.
The IDE ( eclipse ) does not recognize 0.00 as a valid value for the schema element earlier decalared as double with minInclusive value of 0.00. I have seen few articles on the net which talk about the conversion problems with 0, 0.00, 0.0000 etc all are not considered to be zeros.
 
Another problem as i had earlier stated is AXIS does not genereted the conditions properly to check for the minInclusive value stated in the schema. It puts a condition to check for something greater. 

-----Original Message-----
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: 05 September 2007 05:36
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding


what is the exception you are getting? 
here is the setter method generated

 public void setGEM_PostvDbl_Type(double param) {
        if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "0.00 ") > 0) {
            this.localGEM_PostvDbl_Type = param;
        } else {
            throw new java.lang.RuntimeException();
        }
    }

and this calls ConverterUtil.compare method.

public static double compare(double doubleValue, String value) {
        return doubleValue - Double.parseDouble(value);
    }

so it basically use the parseDouble method of the Double class.

Amila. 


On 9/4/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

I am just running through another problem with min inclusive values on double types. For declaration,
 


<xsd:simpleType name="GEM_PostvDbl_Type" > 



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



<xsd:minExclusive value= "0.00"/> 



</xsd:restriction> 



</xsd:simpleType>
An xml schema instance value of 0.00 throws an error, saying it not a valid value. 0.00 is a double value, and what could be the problem?
 
Thanks
Natraj
 
 

-----Original Message-----
From: Amila Suriarachchi [mailto: amilasuriarachchi@gmail.com]

Sent: 04 September 2007 13:07
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding





On 9/4/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,
 
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" />

</xsd:restriction>

</xsd:simpleType>

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 (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "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 


your given schema part declares it as 

<xsd:minExclusive value="0" />

Anyway if you don't have any special reason to use Axis2 1.2 better switch to Axis2 1.3.


Amila.



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.

Thanks
Natraj

 

 



-----Original Message-----
From: Gudla, Natraj (GE Money, consultant) 
Sent: 30 August 2007 11:48
To: ' axis-user@ws.apache.org'
Cc: '  <ma...@kanbay.com> rsandu@kanbay.com'
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 [mailto: amilasuriarachchi@gmail.com]
Sent: 30 August 2007 11:44
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding


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

Amila.


On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,

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:annotation>
                        <xsd:documentation>Elements of payment protection represent the 
                        protection types and can be only a string type</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="2"></xsd:maxLength> 
                </xsd:restriction>
        </xsd:simpleType>

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

        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?

Thanks
Natraj.

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






-- 
Amila Suriarachchi,
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 


Re: On ADB Binding

Posted by Amila Suriarachchi <am...@gmail.com>.
what is the exception you are getting?
here is the setter method generated

 public void setGEM_PostvDbl_Type(double param) {
        if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param,
"0.00") > 0) {
            this.localGEM_PostvDbl_Type = param;
        } else {
            throw new java.lang.RuntimeException();
        }
    }

and this calls ConverterUtil.compare method.

public static double compare(double doubleValue, String value) {
        return doubleValue - Double.parseDouble(value);
    }

so it basically use the parseDouble method of the Double class.

Amila.

On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com> wrote:
>
>  I am just running through another problem with min inclusive values on
> double types. For declaration,
>
>
> <xsd:simpleType name="GEM_PostvDbl_Type">
>
> <xsd:restriction base="xsd:double">
>
> <xsd:minExclusive value="0.00"/>
>
> </xsd:restriction>
>
> </xsd:simpleType>
> An xml schema instance value of 0.00 throws an error, saying it not a
> valid value. 0.00 is a double value, and what could be the problem?
>
> Thanks
> Natraj
>
>
>
> -----Original Message-----
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* 04 September 2007 13:07
> *To:* axis-user@ws.apache.org
> *Subject:* Re: On ADB Binding
>
>
>
> On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com>
> wrote:
> >
> >  Hi,
> >
> > 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" />
> >
> > </xsd:restriction>
> >
> > </xsd:simpleType>
> >
> > *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* (org.apache.axis2.databinding.utils.ConverterUtil.*compare*(param,
> > "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
> >
>
> your given schema part declares it as
>
> <xsd:minExclusive value="0"/>
>
> Anyway if you don't have any special reason to use Axis2 1.2 better switch
> to Axis2 1.3.
>
> Amila.
>
>   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.
> >
> > Thanks
> > Natraj
> >
> >
> >
> >
> >
> > -----Original Message-----
> > *From:* Gudla, Natraj (GE Money, consultant)
> > *Sent:* 30 August 2007 11:48
> > *To:* 'axis-user@ws.apache.org'
> > *Cc:* ' rsandu@kanbay.com'
> > *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 [mailto:amilasuriarachchi@gmail.com]
> > *Sent:* 30 August 2007 11:44
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: On ADB Binding
> >
> > ADB does support restrictions and extensions.
> > those documentation are bit obsolete.
> >
> > Amila.
> >
> > On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > 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:annotation>
> > >                         <xsd:documentation>Elements of payment
> > > protection represent the
> > >                         protection types and can be only a string
> > > type</xsd:documentation>
> > >                 </xsd:annotation>
> > >                 <xsd:restriction base="xsd:string">
> > >                         <xsd:maxLength value="2"></xsd:maxLength>
> > >                 </xsd:restriction>
> > >         </xsd:simpleType>
> > >
> > > The code generated by AXIS ADB binding through WSDL2Java, check on the
> > > max length within the code.
> > >
> > >         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?
> > >
> > > Thanks
> > > Natraj.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
> >
> >
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: On ADB Binding

Posted by Amila Suriarachchi <am...@gmail.com>.
On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com> wrote:
>
>  We are working on the following areas with AXIS2 1.2
>
> 1. Using the WSDL2Java utility
> 2. Using Skeleton and stubs generated.
>
> Do you see any of the above being affected by moving to 1.3?
>

No. Axis2 1.2 generated code may not work with Axi2 1.3. but there is no any
stub or skelton interface changes.

So if you generate the code with Axis2 1.3 that code should compile with the
previous Skelton and client codes you have written.

Amila.

Thanks
> Natraj
>
> -----Original Message-----
> *From:* Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> *Sent:* 04 September 2007 13:07
> *To:* axis-user@ws.apache.org
> *Subject:* Re: On ADB Binding
>
>
>
> On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com>
> wrote:
> >
> >  Hi,
> >
> > 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" />
> >
> > </xsd:restriction>
> >
> > </xsd:simpleType>
> >
> > *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* (org.apache.axis2.databinding.utils.ConverterUtil.*compare*(param,
> > "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
> >
>
> your given schema part declares it as
>
> <xsd:minExclusive value="0"/>
>
> Anyway if you don't have any special reason to use Axis2 1.2 better switch
> to Axis2 1.3.
>
> Amila.
>
>   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.
> >
> > Thanks
> > Natraj
> >
> >
> >
> >
> >
> > -----Original Message-----
> > *From:* Gudla, Natraj (GE Money, consultant)
> > *Sent:* 30 August 2007 11:48
> > *To:* 'axis-user@ws.apache.org'
> > *Cc:* ' rsandu@kanbay.com'
> > *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 [mailto:amilasuriarachchi@gmail.com]
> > *Sent:* 30 August 2007 11:44
> > *To:* axis-user@ws.apache.org
> > *Subject:* Re: On ADB Binding
> >
> > ADB does support restrictions and extensions.
> > those documentation are bit obsolete.
> >
> > Amila.
> >
> > On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > 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:annotation>
> > >                         <xsd:documentation>Elements of payment
> > > protection represent the
> > >                         protection types and can be only a string
> > > type</xsd:documentation>
> > >                 </xsd:annotation>
> > >                 <xsd:restriction base="xsd:string">
> > >                         <xsd:maxLength value="2"></xsd:maxLength>
> > >                 </xsd:restriction>
> > >         </xsd:simpleType>
> > >
> > > The code generated by AXIS ADB binding through WSDL2Java, check on the
> > > max length within the code.
> > >
> > >         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?
> > >
> > > Thanks
> > > Natraj.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Amila Suriarachchi,
> > WSO2 Inc.
> >
> >
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

RE: On ADB Binding

Posted by "Gudla, Natraj (GE Money, consultant)" <na...@ge.com>.
We are working on the following areas with AXIS2 1.2
 
1. Using the WSDL2Java utility
2. Using Skeleton and stubs generated.
 
Do you see any of the above being affected by moving to 1.3?
 
Thanks
Natraj

-----Original Message-----
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: 04 September 2007 13:07
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding




On 9/4/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,
 
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" />

</xsd:restriction>

</xsd:simpleType>

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 (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "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 


your given schema part declares it as 

<xsd:minExclusive value="0"/>

Anyway if you don't have any special reason to use Axis2 1.2 better switch to Axis2 1.3.


Amila.



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.

Thanks
Natraj

 

 



-----Original Message-----
From: Gudla, Natraj (GE Money, consultant) 
Sent: 30 August 2007 11:48
To: ' axis-user@ws.apache.org'
Cc: '  <ma...@kanbay.com> rsandu@kanbay.com'
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 [mailto: amilasuriarachchi@gmail.com]
Sent: 30 August 2007 11:44
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding


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

Amila.


On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,

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:annotation>
                        <xsd:documentation>Elements of payment protection represent the 
                        protection types and can be only a string type</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="2"></xsd:maxLength> 
                </xsd:restriction>
        </xsd:simpleType>

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

        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?

Thanks
Natraj.

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






-- 
Amila Suriarachchi,
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 


RE: On ADB Binding

Posted by "Gudla, Natraj (GE Money, consultant)" <na...@ge.com>.
I am just running through another problem with min inclusive values on double types. For declaration,
 
<xsd:simpleType name="GEM_PostvDbl_Type">

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

<xsd:minExclusive value="0.00"/>

</xsd:restriction>

</xsd:simpleType>

An xml schema instance value of 0.00 throws an error, saying it not a valid value. 0.00 is a double value, and what could be the problem?
 
Thanks
Natraj
 
 

-----Original Message-----
From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: 04 September 2007 13:07
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding




On 9/4/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,
 
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" />

</xsd:restriction>

</xsd:simpleType>

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 (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "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 


your given schema part declares it as 

<xsd:minExclusive value="0"/>

Anyway if you don't have any special reason to use Axis2 1.2 better switch to Axis2 1.3.


Amila.



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.

Thanks
Natraj

 

 



-----Original Message-----
From: Gudla, Natraj (GE Money, consultant) 
Sent: 30 August 2007 11:48
To: ' axis-user@ws.apache.org'
Cc: '  <ma...@kanbay.com> rsandu@kanbay.com'
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 [mailto: amilasuriarachchi@gmail.com]
Sent: 30 August 2007 11:44
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding


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

Amila.


On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,

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:annotation>
                        <xsd:documentation>Elements of payment protection represent the 
                        protection types and can be only a string type</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="2"></xsd:maxLength> 
                </xsd:restriction>
        </xsd:simpleType>

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

        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?

Thanks
Natraj.

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






-- 
Amila Suriarachchi,
WSO2 Inc. 




-- 
Amila Suriarachchi,
WSO2 Inc. 


Re: On ADB Binding

Posted by Amila Suriarachchi <am...@gmail.com>.
On 9/4/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com> wrote:
>
>  Hi,
>
> 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"/>
>
> </xsd:restriction>
>
> </xsd:simpleType>
>
> *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* (org.apache.axis2.databinding.utils.ConverterUtil.*compare*(param,
> "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
>

your given schema part declares it as

<xsd:minExclusive value="0"/>

Anyway if you don't have any special reason to use Axis2 1.2 better switch
to Axis2 1.3.

Amila.

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.
>
> Thanks
> Natraj
>
>
>
>
>
> -----Original Message-----
> *From:* Gudla, Natraj (GE Money, consultant)
> *Sent:* 30 August 2007 11:48
> *To:* 'axis-user@ws.apache.org'
> *Cc:* 'rsandu@kanbay.com'
> *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 [mailto:amilasuriarachchi@gmail.com]
> *Sent:* 30 August 2007 11:44
> *To:* axis-user@ws.apache.org
> *Subject:* Re: On ADB Binding
>
> ADB does support restrictions and extensions.
> those documentation are bit obsolete.
>
> Amila.
>
> On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com>
> wrote:
> >
> > Hi,
> >
> > 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:annotation>
> >                         <xsd:documentation>Elements of payment
> > protection represent the
> >                         protection types and can be only a string
> > type</xsd:documentation>
> >                 </xsd:annotation>
> >                 <xsd:restriction base="xsd:string">
> >                         <xsd:maxLength value="2"></xsd:maxLength>
> >                 </xsd:restriction>
> >         </xsd:simpleType>
> >
> > The code generated by AXIS ADB binding through WSDL2Java, check on the
> > max length within the code.
> >
> >         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?
> >
> > Thanks
> > Natraj.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

RE: On ADB Binding

Posted by "Gudla, Natraj (GE Money, consultant)" <na...@ge.com>.
Hi,
 
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"/>

</xsd:restriction>

</xsd:simpleType>

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 (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, "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.

Thanks
Natraj

 

 

-----Original Message-----
From: Gudla, Natraj (GE Money, consultant) 
Sent: 30 August 2007 11:48
To: 'axis-user@ws.apache.org'
Cc: 'rsandu@kanbay.com'
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 [mailto:amilasuriarachchi@gmail.com]
Sent: 30 August 2007 11:44
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding


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

Amila.


On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,

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:annotation>
                        <xsd:documentation>Elements of payment protection represent the 
                        protection types and can be only a string type</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="2"></xsd:maxLength> 
                </xsd:restriction>
        </xsd:simpleType>

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

        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?

Thanks
Natraj.

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






-- 
Amila Suriarachchi,
WSO2 Inc. 


RE: On ADB Binding

Posted by "Gudla, Natraj (GE Money, consultant)" <na...@ge.com>.
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 [mailto:amilasuriarachchi@gmail.com]
Sent: 30 August 2007 11:44
To: axis-user@ws.apache.org
Subject: Re: On ADB Binding


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

Amila.


On 8/30/07, Gudla, Natraj (GE Money, consultant) < natraj.gudla@ge.com> wrote: 

Hi,

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:annotation>
                        <xsd:documentation>Elements of payment protection represent the 
                        protection types and can be only a string type</xsd:documentation>
                </xsd:annotation>
                <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="2"></xsd:maxLength> 
                </xsd:restriction>
        </xsd:simpleType>

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

        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?

Thanks
Natraj.

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






-- 
Amila Suriarachchi,
WSO2 Inc. 


Re: On ADB Binding

Posted by Amila Suriarachchi <am...@gmail.com>.
ADB does support restrictions and extensions.
those documentation are bit obsolete.

Amila.

On 8/30/07, Gudla, Natraj (GE Money, consultant) <na...@ge.com>
wrote:
>
> Hi,
>
> 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:annotation>
>                         <xsd:documentation>Elements of payment protection
> represent the
>                         protection types and can be only a string
> type</xsd:documentation>
>                 </xsd:annotation>
>                 <xsd:restriction base="xsd:string">
>                         <xsd:maxLength value="2"></xsd:maxLength>
>                 </xsd:restriction>
>         </xsd:simpleType>
>
> The code generated by AXIS ADB binding through WSDL2Java, check on the max
> length within the code.
>
>         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?
>
> Thanks
> Natraj.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.