5 Replies Latest reply on Apr 30, 2007 2:59 AM by Claus Dreyer

    JbossWS 1.2.1 and .Net 2.0 client

    Claus Dreyer Newbie


      Since upgrading to JbossWS 1.2.x I have interoperability issues with .Net 2.0 clients. For some reason I lose Integer values. They are received by my JBoss web services as null values. Calling the same web service from a client like SoapUI works nicely. Please help!

      Using annotations what is the preferred configuration for .Net 2.0 interoperability?


        • 1. Re: JbossWS 1.2.1 and .Net 2.0 client
          Frank Heldt Newbie

          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
            Claus Dreyer Newbie

            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?


            • 3. Re: JbossWS 1.2.1 and .Net 2.0 client
              Heiko Braun Master

              So, do we consider this to be .NET problem?

              • 4. Re: JbossWS 1.2.1 and .Net 2.0 client
                Robert Mlekus Newbie

                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)

                • 5. Re: JbossWS 1.2.1 and .Net 2.0 client
                  Claus Dreyer Newbie

                  Heiko, yes it is a .Net problem.

                  The XMLSerializer class in the .NET Framework 2.0 has a bug with optional elements.