5 Replies Latest reply on Nov 18, 2010 12:50 PM by fabriciorsf

    What controls the SOAP version used in JBoss

    amit.sfbay

      I am using JBoss version 4.2.2

      I am calling a webservice from a JBoss application. I am using the SOAP 1.1 binding from the stubs (generated from wsdl using wsconsume). Whatever I do, I always see this warning which tells me that somehow SOAP 1.2 is expected.

      15:17:43,085 WARN [SOAP12BindingJAXWS] Expected SOAP-1.2 envelope, but got: http://schemas.xmlsoap.org/soap/envelope/

      What soap version does JBossWS support/use and is there a way to change it.

        • 1. Re: What controls the SOAP version used in JBoss
          amit.sfbay

          The JbossWS version is jbossws-native-2.0.1.SP2
          I hope it is possible to call SOAP 1.1 webservice from a web app in this.

          • 2. Re: What controls the SOAP version used in JBoss
            yangg

            Amit,

            I'm having a similar problem. Did you find the answer to how to control the SOAP version in JBoss 4.2.2?

            Thanks,
            Gang

            • 3. Re: What controls the SOAP version used in JBoss
              asoldano

              JBossWS native supports both SOAP 1.1 and SOAP 1.2. This is configured according to the binding type specified in the wsdl being deployed / consumed.

              • 4. Re: What controls the SOAP version used in JBoss
                asoldano

                You can also use the @BindingType annotation.

                See the following constants:

                /**
                 * A constant representing the identity of the SOAP 1.1 over HTTP binding.
                 */
                 public static final String SOAP11HTTP_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http";
                
                 /**
                 * A constant representing the identity of the SOAP 1.2 over HTTP binding.
                 */
                 public static final String SOAP12HTTP_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/";
                
                 /**
                 * A constant representing the identity of the SOAP 1.1 over HTTP binding
                 * with MTOM enabled by default.
                 */
                 public static final String SOAP11HTTP_MTOM_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true";
                
                 /**
                 * A constant representing the identity of the SOAP 1.2 over HTTP binding
                 * with MTOM enabled by default.
                 */
                 public static final String SOAP12HTTP_MTOM_BINDING = "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true";
                


                • 5. Re: What controls the SOAP version used in JBoss
                  fabriciorsf

                  In same class, can I have the same method with SOAP 1.1 and SOAP 1.2? Or any methods with SOAP 1.1 and others with SOAP 1.2?

                  This I can do in C#!! In Java + jboss too?