I have the same problem!
I have a webservice that receives a class (fillled from a .NET 2.0 client) which contains some double values. Since 1.2.1 the EJB (JSR-181) receives null values for these doubles.
I'm currently trying to encircle the error, but at the moment i have no idea what is happening here...
I believe I found the bug. It is described here -> http://support.microsoft.com/kb/925272
In my .Net code I have field names ending with Specified on the object I'm sending through the web service (e.g. for an Integer field called NumberOfHits there will be a bool field called NumberOfHitsSpecified). If the Specified field is set to true, then it will be send. Else the .Net bug described above will have set it to false, and it won't be send.
This is only true for optional fields. So another solution is to make the field required in the WSDL. I have used the @XmlElement annotation like this
@XmlElement(required = true) Integer NumberOfHits;
The last solution is to get the hotfix from Microsoft or get a service pack for the .Net Framework, but I have not found any of them. Anybody?
So, do we consider this to be .NET problem?
JBossWS is standard conforming, and per se this is not a JBossWS problem. But it means that updating to new JBossWS versions breaks a lot of client code or requires to put XMLElement on all generated DataStructures for
nillable non-complex Data fields. Thus it is a JBossWS users problem.
(i.e. autoboxing Long, Integer, Double types, Date types, BigDecimal,.....
I was lucky, since I generate all these by using androMDA, thus it was easy to add XmlElement to several hundred data structures in the correct places.
It could help other JBossWS users to document the behaviour, and make it configurable (e.g. property nillablesAreRequired).
The situation is even worse on .net side: when a .net client reads a complex data structure it does not set the ...Required fields on its own. Thus something like
with a complex data structure Quote, carrying quotation detail as BigDecimals does not work any longer (what it used to do with JBossWS1.0.x and JSR 181 annotations)
Heiko, yes it is a .Net problem.
The XMLSerializer class in the .NET Framework 2.0 has a bug with optional elements.