axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r524097 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java
Date Fri, 30 Mar 2007 14:15:49 GMT
Author: dims
Date: Fri Mar 30 07:15:47 2007
New Revision: 524097

URL: http://svn.apache.org/viewvc?view=rev&rev=524097
Log:
check for NPE

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java?view=diff&rev=524097&r1=524096&r2=524097
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUtils.java
Fri Mar 30 07:15:47 2007
@@ -62,33 +62,35 @@
         Map props = axisMsgContext.getOptions().getProperties();
         soapMessageContext.putAll(props);
 
-        // Set the WSDL properties
-        ServiceDescription sd =
-                jaxwsMessageContext.getEndpointDescription().getServiceDescription();
-        if (sd != null) {
-            URL wsdlLocation = ((ServiceDescriptionWSDL)sd).getWSDLLocation();
-            if (wsdlLocation != null && !"".equals(wsdlLocation)) {
-                URI wsdlLocationURI = null;
-                try {
-                    wsdlLocationURI = wsdlLocation.toURI();
-                }
-                catch (URISyntaxException ex) {
-                    // TODO: NLS/RAS
-                    log.warn("Unable to convert WSDL location URL to URI.  URL: " +
-                            wsdlLocation.toString() + "; Service: " + sd.getServiceQName(),
ex);
+        if (jaxwsMessageContext.getEndpointDescription()!=null) {
+            // Set the WSDL properties
+            ServiceDescription sd =
+                    jaxwsMessageContext.getEndpointDescription().getServiceDescription();
+            if (sd != null) {
+                URL wsdlLocation = ((ServiceDescriptionWSDL)sd).getWSDLLocation();
+                if (wsdlLocation != null && !"".equals(wsdlLocation)) {
+                    URI wsdlLocationURI = null;
+                    try {
+                        wsdlLocationURI = wsdlLocation.toURI();
+                    }
+                    catch (URISyntaxException ex) {
+                        // TODO: NLS/RAS
+                        log.warn("Unable to convert WSDL location URL to URI.  URL: " +
+                                wsdlLocation.toString() + "; Service: " + sd.getServiceQName(),
ex);
+                    }
+                    soapMessageContext
+                            .put(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, wsdlLocationURI);
+                    soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION,
+                                                Scope.APPLICATION);
                 }
+    
+                soapMessageContext
+                        .put(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, sd.getServiceQName());
                 soapMessageContext
-                        .put(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION, wsdlLocationURI);
-                soapMessageContext.setScope(javax.xml.ws.handler.MessageContext.WSDL_DESCRIPTION,
-                                            Scope.APPLICATION);
-            }
-
-            soapMessageContext
-                    .put(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, sd.getServiceQName());
-            soapMessageContext
-                    .setScope(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, Scope.APPLICATION);
-            if (log.isDebugEnabled()) {
-                log.debug("WSDL_SERVICE :" + sd.getServiceQName());
+                        .setScope(javax.xml.ws.handler.MessageContext.WSDL_SERVICE, Scope.APPLICATION);
+                if (log.isDebugEnabled()) {
+                    log.debug("WSDL_SERVICE :" + sd.getServiceQName());
+                }
             }
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message