-
1. Re: JbossWS 1.2.1 and .Net 2.0 client
fheldt Apr 24, 2007 9:43 AM (in response to cdreyer1)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... -
2. Re: JbossWS 1.2.1 and .Net 2.0 client
cdreyer1 Apr 25, 2007 9:28 AM (in response to cdreyer1)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?
Regards,
Claus -
3. Re: JbossWS 1.2.1 and .Net 2.0 client
heiko.braun Apr 27, 2007 8:48 AM (in response to cdreyer1)So, do we consider this to be .NET problem?
-
4. Re: JbossWS 1.2.1 and .Net 2.0 client
centecbertl Apr 27, 2007 12:20 PM (in response to cdreyer1)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.
Detail:
(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 liketradeService.updateTradePriceQuote(quotationService.getQuote(isin))
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) -
5. Re: JbossWS 1.2.1 and .Net 2.0 client
cdreyer1 Apr 30, 2007 2:59 AM (in response to cdreyer1)Heiko, yes it is a .Net problem.
The XMLSerializer class in the .NET Framework 2.0 has a bug with optional elements.