Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 98301 invoked from network); 11 Apr 2007 16:04:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Apr 2007 16:04:43 -0000 Received: (qmail 18468 invoked by uid 500); 11 Apr 2007 16:04:49 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 18236 invoked by uid 500); 11 Apr 2007 16:04:48 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 18225 invoked by uid 500); 11 Apr 2007 16:04:48 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 18222 invoked by uid 99); 11 Apr 2007 16:04:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 09:04:48 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 09:04:41 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 628D91A9838; Wed, 11 Apr 2007 09:04:21 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r527551 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Date: Wed, 11 Apr 2007 16:04:21 -0000 To: axis2-cvs@ws.apache.org From: barrettj@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070411160421.628D91A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: barrettj Date: Wed Apr 11 09:04:20 2007 New Revision: 527551 URL: http://svn.apache.org/viewvc?view=rev&rev=527551 Log: Add a few NPE guards Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?view=diff&rev=527551&r1=527550&r2=527551 ============================================================================== --- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java (original) +++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java Wed Apr 11 09:04:20 2007 @@ -316,10 +316,13 @@ private Class getEndpointSEI(QName portQName) { Class endpointSEI = null; - EndpointInterfaceDescription endpointInterfaceDesc = - getEndpointDescription(portQName).getEndpointInterfaceDescription(); - if (endpointInterfaceDesc != null) { - endpointSEI = endpointInterfaceDesc.getSEIClass(); + EndpointDescription endpointDesc = getEndpointDescription(portQName); + if (endpointDesc != null) { + EndpointInterfaceDescription endpointInterfaceDesc = + endpointDesc.getEndpointInterfaceDescription(); + if (endpointInterfaceDesc != null ) { + endpointSEI = endpointInterfaceDesc.getSEIClass(); + } } return endpointSEI; } @@ -546,8 +549,28 @@ * @see org.apache.axis2.jaxws.description.ServiceDescription#getServiceClient(javax.xml.namespace.QName) */ public ServiceClient getServiceClient(QName portQName) { - // TODO: RAS if no portQName found - return getEndpointDescription(portQName).getServiceClient(); + ServiceClient returnServiceClient = null; + if (!DescriptionUtils.isEmpty(portQName)) { + EndpointDescription endpointDesc = getEndpointDescription(portQName); + if (endpointDesc != null) { + returnServiceClient = endpointDesc.getServiceClient(); + } + else { + // Couldn't find Endpoint Description for port QName + if (log.isDebugEnabled()) { + log.debug("Could not find portQName: " + portQName + + " under ServiceDescription: " + toString()); + } + } + } + else { + // PortQName is empty + if (log.isDebugEnabled()) { + log.debug("PortQName agrument is invalid; it can not be null or an empty string: " + portQName); + } + } + + return returnServiceClient; } /* (non-Javadoc) --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org