You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Chenna Venkatasubbaiah <Ch...@cramer.com> on 2004/02/12 18:49:38 UTC
Problem in getting Long[] from Serialized Object
Hello
I have a problem in getting Long[] type from Serialized Object. I am using
axis1.1
I have a HashMap to get which contains long as key and Object[] as value.
This object contains two variables one is long and other one is Long[]. I am
not getting this final Map due to some problem. I am able to get the
response xml with all data properly except the Long[]. Wherever the Long[]
values are null there SOAP element is comming like this
<types xsi:type="soapenc:long" xsi:nil="true"/> instead of <types
xsi:type="soapenc:Array" soapenc:arrayType="xsd:long[0]"/>
Response xml:
<item>
<key xsi:type="xsd:long">39</key>
<value xsi:type="soapenc:Array"
soapenc:arrayType="ns2:CramerObjectSetPattern[4]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>
<cramerObjectSetID xsi:type="xsd:long">39</cramerObjectSetID>
<types xsi:type="soapenc:long" xsi:nil="true"/>
</item>
<item>
<cramerObjectSetID xsi:type="xsd:long">0</cramerObjectSetID>
<types xsi:type="soapenc:long" xsi:nil="true"/>
</item>
<item>
<cramerObjectSetID xsi:type="xsd:long">1016</cramerObjectSetID>
<types xsi:type="soapenc:Array" soapenc:arrayType="xsd:long[1]">
<item>2</item>
</types>
</item>
<item>
<cramerObjectSetID xsi:type="xsd:long">100</cramerObjectSetID>
<types xsi:type="soapenc:long" xsi:nil="true"/>
</item>
</value>
</item>
JavaBean:
public class CramerObjectSetPattern implements java.io.Serializable
{
private long cramerObjectSetID;
private Long[] types;
server-config.wsdd:
<typeMapping
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
type="java:com.cramer.core.framework.service.CramerObjectSetPattern"
qname="ns8:CramerObjectSetPattern"
xmlns:ns8="http://service.framework.core.cramer.com"/>
Kindly guide me.
thanks in advance.
Chenna