axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark D. Hansen" <khook...@yahoo.com>
Subject proper serialization of Object[] array ... (xsd or soapenc item types??)
Date Fri, 08 Apr 2005 18:28:04 GMT
I'm starting with this Java array:

  private final String itemString = "a string instance";
  private final Integer itemInteger = new Integer("1965");
  private final Float itemFloat = new Float("3.14159");
  private final Boolean itemBoolean = new Boolean(true);
  private final Object[] arrayOfObjects = 
    new Object[] { itemString, itemInteger, itemFloat, itemBoolean };

Using this default serialization context:

    SerializationContext context = 
      new SerializationContext(writer, new MessageContext(new AxisServer()));

Here is what I get:

<... soapenc:arrayType="xsd:anyType[4]" xsi:type="soapenc:Array" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
...>
  <item xsi:type="soapenc:string">a string instance</item>
  <item xsi:type="soapenc:int">1965</item>
  <item xsi:type="soapenc:float">3.14159</item>
  <item xsi:type="soapenc:boolean">true</item>
<...>

Is this correct?  Am I supposed to get soapenc types for the array items?  Per WS-I, should
I get xsd types for the items?

Thanks for any help,

Mark

Mime
View raw message