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 ibrahim demir <ib...@yahoo.com> on 2009/01/04 14:01:41 UTC

Axis2 Data Types And Values

Hi All;

I am using Axis2 and generating my client code using Axis2 Eclipse Codegen Wizard for resuming .NET web services. Everthing works fine except one thing.

Some of the fields of the objects gets default values in my request.

For example I have an Customer object and it has got an Costomer_Code field which is an integer type. Even I do not set the customer_code field ,
it is set as 0 (zero) in my request. Is this something done by Axis2 and Is there any way to stop this? 


Yours

 Ibrahim DEMIR
CyberSoft Yazilim Muh.
http://www.ibrahimdemir.org


      

Re: Axis2 Data Types And Values

Posted by Amila Suriarachchi <am...@gmail.com>.
On Mon, Jan 5, 2009 at 12:52 PM, ibrahim demir <ib...@yahoo.com>wrote:

> Hi;
>
> Below is the related part. Even I do not set anything for the Customerid
> ,it is set to 0 somewhere inside Axis2. But 0 is diffrent than empty for my
> query.
>
> Yours.
>
>  <s:complexType name="Customer">
>         <s:complexContent mixed="false">
>           <s:extension base="tns:MakerCheckerEntityBase">
>             <s:sequence>
>               <s:element minOccurs="1" maxOccurs="1" name="Customerid"
> type="s:int" />
>

set minOccurs to 0 or set nillable=true. this indicate your element  can not
be empty.

thanks,
Amila.

>
>               <s:element minOccurs="0" maxOccurs="1" name="CustomerName"
> type="s:string" />
>               <s:element minOccurs="1" maxOccurs="1" name="Status"
> nillable="true" type="s:short" />
>               <s:element minOccurs="0" maxOccurs="1" name="AutoDescription"
> type="s:string" />
>               <s:element minOccurs="0" maxOccurs="1" name="UserDescription"
> type="s:string" />
>               <s:element minOccurs="1" maxOccurs="1" name="ReasonToPassive"
> nillable="true" type="s:short" />
>               <s:element minOccurs="1" maxOccurs="1" name="SecurityFund"
> type="s:boolean" />
>               <s:element minOccurs="1" maxOccurs="1" name="TaxRate"
> type="s:decimal" />
>               <s:element minOccurs="1" maxOccurs="1"
> name="SharedCustomerType" nillable="true" type="s:int" />
>               <s:element minOccurs="0" maxOccurs="1" name="CustomerRoles"
> type="tns:ArrayOfCustomerRoles" />
>             </s:sequence>
>           </s:extension>
>         </s:complexContent>
>       </s:complexType>
>
> Ibrahim DEMIR
> CyberSoft Yazilim Muh.
> http://www.ibrahimdemir.org
>
>
>
>
>
> ------------------------------
> *From:* Amila Suriarachchi <am...@gmail.com>
> *To:* axis-user@ws.apache.org
> *Sent:* Monday, January 5, 2009 5:52:18 AM
> *Subject:* Re: Axis2 Data Types And Values
>
>
>
> On Sun, Jan 4, 2009 at 6:31 PM, ibrahim demir <ib...@yahoo.com>wrote:
>
>> Hi All;
>>
>> I am using Axis2 and generating my client code using Axis2 Eclipse Codegen
>> Wizard for resuming .NET web services. Everthing works fine except one
>> thing.
>>
>> Some of the fields of the objects gets default values in my request.
>>
>> For example I have an Customer object and it has got an Costomer_Code
>> field which is an integer type. Even I do not set the customer_code field ,
>> it is set as 0 (zero) in my request. Is this something done by Axis2 and
>> Is there any way to stop this?
>>
>
> have you set a default value to customer_code? can you send us that schema
> part?
>
> thanks,
> Amila.
>
>>
>>
>>
>> Yours
>>
>> Ibrahim DEMIR
>> CyberSoft Yazilim Muh.
>> http://www.ibrahimdemir.org
>>
>>
>>
>>
>>
>>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Axis2 Data Types And Values

Posted by ibrahim demir <ib...@yahoo.com>.
Hi;

Below is the related part. Even I do not set anything for the Customerid ,it is set to 0 somewhere inside Axis2. But 0 is diffrent than empty for my query.

Yours.

 <s:complexType name="Customer">
        <s:complexContent mixed="false">
          <s:extension base="tns:MakerCheckerEntityBase">
            <s:sequence>
              <s:element minOccurs="1" maxOccurs="1" name="Customerid" type="s:int" />
              <s:element minOccurs="0" maxOccurs="1" name="CustomerName" type="s:string" />
              <s:element minOccurs="1" maxOccurs="1" name="Status" nillable="true" type="s:short" />
              <s:element minOccurs="0" maxOccurs="1" name="AutoDescription" type="s:string" />
              <s:element minOccurs="0" maxOccurs="1" name="UserDescription" type="s:string" />
              <s:element minOccurs="1" maxOccurs="1" name="ReasonToPassive" nillable="true" type="s:short" />
              <s:element minOccurs="1" maxOccurs="1" name="SecurityFund" type="s:boolean" />
              <s:element minOccurs="1" maxOccurs="1" name="TaxRate" type="s:decimal" />
              <s:element minOccurs="1" maxOccurs="1" name="SharedCustomerType" nillable="true" type="s:int" />
              <s:element minOccurs="0" maxOccurs="1" name="CustomerRoles" type="tns:ArrayOfCustomerRoles" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>

 Ibrahim DEMIR
CyberSoft Yazilim Muh.
http://www.ibrahimdemir.org

     
           
     




________________________________
From: Amila Suriarachchi <am...@gmail.com>
To: axis-user@ws.apache.org
Sent: Monday, January 5, 2009 5:52:18 AM
Subject: Re: Axis2 Data Types And Values




On Sun, Jan 4, 2009 at 6:31 PM, ibrahim demir <ib...@yahoo.com> wrote:

Hi All;

I am using Axis2 and generating my client code using Axis2 Eclipse Codegen Wizard for resuming .NET web services. Everthing works fine except one thing.

Some of the fields of the objects gets default values in my request.

For example I have an Customer object and it has got an Costomer_Code field which is an integer type. Even I do not set the customer_code field ,
it is set as 0 (zero) in my request. Is this something done by Axis2 and Is there any way to stop this? 

have you set a default value to customer_code? can you send us that schema part?

thanks,
Amila. 




Yours

 Ibrahim DEMIR
CyberSoft Yazilim Muh.
http://www.ibrahimdemir.org

     
           
     




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/



      

Re: Axis2 Data Types And Values

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sun, Jan 4, 2009 at 6:31 PM, ibrahim demir <ib...@yahoo.com>wrote:

> Hi All;
>
> I am using Axis2 and generating my client code using Axis2 Eclipse Codegen
> Wizard for resuming .NET web services. Everthing works fine except one
> thing.
>
> Some of the fields of the objects gets default values in my request.
>
> For example I have an Customer object and it has got an Costomer_Code field
> which is an integer type. Even I do not set the customer_code field ,
> it is set as 0 (zero) in my request. Is this something done by Axis2 and Is
> there any way to stop this?
>

have you set a default value to customer_code? can you send us that schema
part?

thanks,
Amila.

>
>
>
> Yours
>
> Ibrahim DEMIR
> CyberSoft Yazilim Muh.
> http://www.ibrahimdemir.org
>
>
>
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/