Revision 34914

View differences:

branches/v2_0_0_prep/extensions/extWFS2/src/org/gvsig/fmap/dal/store/wfs/WFSStoreProvider.java
215 215

  
216 216
        for (int i=0 ; i<feature.getFieldSize() ; i++){       
217 217
            WFSFeatureField featureField = feature.getFieldAt(i);           
218
            int dataType = DataTypes.OBJECT;               
218
            int dataType = DataTypes.STRING;               
219 219
            String typeName = featureField.getType();
220 220
            EditableFeatureAttributeDescriptor attributeDescriptor = null;
221 221

  
222
            IXSTypeDefinition typeDefinition = xmlSchemaManager.getTypeDefinition(typeName);
222
            IXSTypeDefinition typeDefinition = null;
223
            
224
            if (typeName != null){
225
                typeDefinition = xmlSchemaManager.getTypeDefinition(typeName);
226
            }
227
            
223 228
            if (typeDefinition != null){             
224 229
                if (typeDefinition.getDataType() != null){
225
                    dataType = typeDefinition.getDataType().getType();
230
                    if (typeDefinition.getDataType().getType() == DataTypes.GEOMETRY){
231
                        dataType = typeDefinition.getDataType().getType();
232
                    }
226 233
                }
227 234
                attributeDescriptor = featureType.add(featureField.getName(), dataType);   
228 235
                if (typeDefinition instanceof IXSGeometryTypeDefinition){
......
230 237
                        attributeDescriptor.setSRS(CRSFactory.getCRS((String)feature.getSrs().get(0)));
231 238
                    }                    
232 239
                    attributeDescriptor.setGeometryType(((IXSGeometryTypeDefinition)typeDefinition).getGeometryType());
233
                    attributeDescriptor.setGeometrySubType(SUBTYPES.GEOM2D);
240
                    attributeDescriptor.setGeometrySubType(SUBTYPES.GEOM3D);
234 241
                    featureType.setDefaultGeometryAttributeName(featureField.getName());
235 242
                }                               
236 243
            }else{

Also available in: Unified diff