When i perform wfs-t insert operation using postgis database only spatial data and primary key gets inserted.
Can anyone point me to some examples in which attribute data are also inserted along with spatial data using openlayers?
I have been struggling with the same issue, and so far the simple solution is to force the server side WFS-T handler (in my case tinyows v1.0.0) to ignore the schema validation. This has potential security side effects, so it is not a 'production-ready' solution, but a step in the right direction.
Looking at the generated XML, it appears that the schema for inserts and for updates is not the same, and combining them does not work.
But to recap, using check_schema="0" in the configuration file of tinyows, you can send attributes along with the spatial data and save everything in postGIS.