You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/06/23 08:05:57 UTC

svn commit: r193084 - /webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/StAXSOAPModelBuilder.java

Author: chinthaka
Date: Wed Jun 22 23:05:56 2005
New Revision: 193084

URL: http://svn.apache.org/viewcvs?rev=193084&view=rev
Log:
Fixing identify SOAP version bug

Modified:
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/StAXSOAPModelBuilder.java

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/StAXSOAPModelBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/StAXSOAPModelBuilder.java?rev=193084&r1=193083&r2=193084&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/StAXSOAPModelBuilder.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/soap/impl/llom/builder/StAXSOAPModelBuilder.java Wed Jun 22 23:05:56 2005
@@ -109,16 +109,15 @@
         envelopeNamespace = soapEnvelope.findNamespace(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI, "");
         if (envelopeNamespace == null) {
             envelopeNamespace = getSOAPEnvelope().findNamespace(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI, "");
+            if (envelopeNamespace == null) {
+                throw new OMException("Invalid SOAP message. Doesn't have proper namespace declaration !!");
+            } else {
+                log.info("SOAP 1.1 message received ..");
+                soapFactory = OMAbstractFactory.getSOAP11Factory();
+            }
         } else {
             log.info("SOAP 1.2 message received ..");
             soapFactory = OMAbstractFactory.getSOAP12Factory();
-        }
-
-        if (envelopeNamespace == null) {
-            throw new OMException("Invalid SOAP message. Doesn't have proper namespace declaration !!");
-        } else {
-            log.info("SOAP 1.1 message received ..");
-            soapFactory = OMAbstractFactory.getSOAP11Factory();
         }
 
         omfactory = soapFactory;