axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <mgai...@hotmail.com>
Subject Re: AXis 1.4 : primitive types and Primitive object
Date Sun, 10 Dec 2006 16:08:25 GMT
Hi Ravi

If you want to reference an array of ints you will want to look at creating 
a Complex Datatype in your wsdl and then implementing that complexType in 
your axis code

e.g. your wsdl

<xsd:complexType name="ComplexDataType">
  <xsd:sequence>
    <xsd:element name="value" type="xs:integer" minOccurs="0" 
maxOccurs="unbounded"/>
  </xsd:sequence>
</xsd:complexType>

//code which references ComplexDataType
public class ComplexDataType  implements java.io.Serializable {
    private int value[]; // attribute

    public ComplexDataType() {
    }

    public int getValue(int index) {
        return value[index];
    }

    public void setValue(int value,int index) {
        this.value[index] = value[index];
    }
}

HTH,
Martin--

______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official 
business of Sender. This transmission is of a confidential nature and Sender 
does not endorse distribution to any party other than intended recipient. 
Sender does not necessarily endorse content contained within this 
transmission.

>
>Thanks Martin for your reply.
>
>I just wanted to understand if say the parameter class is set to 
>int[].class, but can I pass an Integer[] as the value for the parameter. 
>Because if the value passed should be an int[] then I just want to think 
>about the conversion from Integer[] to int[] . Basically I deal with lot of 
>primitive types in the call but what comes to my library is Primitive 
>Object.
>
>Thanks for your help again.
>
>Regards,
>Ravi
>Martin Gainty wrote:
>>Hi Ravi
>>
>>This is a java question-
>>Better to create the java.lang.Integer object
>>and then if you need to access the numeric value with intValue() as in
>>
>>java.lang.Integer Int = new java.lang.Integer("1");
>>int i = Int.intValue();
>>
>>HTH
>>M-
>>--------------------------------------------------------------------------- 
>>This e-mail message (including attachments, if any) is intended for the 
>>use of the individual or entity to which it is addressed and may contain 
>>information that is privileged, proprietary , confidential and exempt from 
>>disclosure. If you are not the intended recipient, you are notified that 
>>any dissemination, distribution or copying of this communication is 
>>strictly prohibited.
>>--------------------------------------------------------------------------- 
>>Le présent message électronique (y compris les pièces qui y sont annexées, 
>>le cas échéant) s'adresse au destinataire indiqué et peut contenir des 
>>renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
>>destinataire de ce document, nous vous signalons qu'il est strictement 
>>interdit de le diffuser, de le distribuer ou de le reproduire.
>>----- Original Message ----- From: "Ravi Krishnamurthy" 
>><ravik@savvion.com>
>>To: <axis-user@ws.apache.org>
>>Sent: Friday, December 08, 2006 10:59 PM
>>Subject: AXis 1.4 : primitive types and Primitive object
>>
>>
>>
>>>Hello;
>>>If a parameter java class is registered as int.class, is it okay to pass 
>>>the value as Integer. Does axis takes care of the conversions for all 
>>>types.
>>>
>>>Thanks,
>>>Ravi
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: axis-user-help@ws.apache.org
>>>
>>>
>> >
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>

_________________________________________________________________
Talk now to your Hotmail contacts with Windows Live Messenger. 
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://get.live.com/messenger/overview


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


Mime
View raw message