I have a problem sending a list of item to a client. I send an object, which contains a member that itself stores a list of device objects. These objects store a member that is either a tag or a network device. ( I don't get to define the WSDL or Schema. )
I confirm that my List object does store a collection of devices which each in turn have a tag. | 13:58:54,126 DEBUG [AssociationValuesDAO] Device.deviceList: | [EMAIL PROTECTED], | [EMAIL PROTECTED], | [EMAIL PROTECTED], | [EMAIL PROTECTED], | [EMAIL PROTECTED], | [EMAIL PROTECTED], | [EMAIL PROTECTED], | [EMAIL PROTECTED], | [EMAIL PROTECTED] | I send this across the wire ( server and client are local ). I unpack it and everything works great Until I try to access the tags inside the device objects in the List. They're NULL. | [java] device list: [EMAIL PROTECTED], com.boeing.nmt.client. | [EMAIL PROTECTED], [EMAIL PROTECTED], com.boeing.nmt.clie | [EMAIL PROTECTED], [EMAIL PROTECTED], com.boeing.nmt.cli | [EMAIL PROTECTED], [EMAIL PROTECTED], com.boeing.nmt | [EMAIL PROTECTED], [EMAIL PROTECTED] | [java] device list size: 9 | [java] dev[1]: [EMAIL PROTECTED] | [java] Exception! java.lang.NullPointerException | I trigger the exception this way: | List <DeviceData.Device> devList = aagr.getAssociationValues().getDeviceData().getDevice(); | System.out.println("device list: " + devList.toString() ); | System.out.println("device list size: " + devList.size() ); | // devList.toArray()[0] is a DeviceData.Device.Tag object, for whatever reason, it's NULL | System.out.println("dev[1]: " + devList.toArray()[0].toString()); | System.out.println("dev[1]: " + ((DeviceData.Device)devList.toArray()[0]).toString()); | I look back at the logs to see what JBoss is unmarshalling, and it looks fine. 2007-06-08 13:58:54,158 DEBUG [org.jboss.ws.core.soap.ObjectContent] xmlFragment: [source= | <Results xmlns:ns2="http://www.boeing.com/NLS/ns/Types" xmlns:ns3="http://www.boeing.com/NLS/ns/soapTypes" Version="0.3.0"> | <ns3:AssociationReturnCode> | <ns3:Success>true</ns3:Success> | <ns3:Reason>Dumb luck</ns3:Reason> | </ns3:AssociationReturnCode> | <ns3:AssociationValues DeleteOtherDeviceAssociations="false" CreateDeviceAssociations="NONE"> | <ns3:DeviceData Version="0.3.0"> | <ns2:Device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:AeroScoutTag" MacId="000CCC654323"> | <ns2:BatteryStatus>Unknown | </ns2:BatteryStatus> | </ns2:Device> | ... | </ns3:DeviceData> | <ns3:AssetData Version="0.3.0" OwnerAppId="foo" AssetId="fah"> | <ns2:AssetDisplayName>gah</ns2:AssetDisplayName> | <ns2:AssetDescription>fah</ns2:AssetDescription> | <ns2:AssetSuspended>true</ns2:AssetSuspended> | </ns3:AssetData> | </ns3:AssociationValues> | </Results> | ] | 2007-06-08 13:58:54,158 DEBUG [org.jboss.ws.core.soap.SOAPContentElement] ----------------------------------- | 2007-06-08 13:58:54,220 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: [EMAIL PROTECTED] (Thread http-0.0.0.0-8080-2) I'm using JBoss 4.0.5 w/ JBossWS 1.2.0. Does anyone have an idea what am I missing? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052753#4052753 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052753 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user