Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 27553 invoked from network); 18 Feb 2008 15:59:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Feb 2008 15:59:02 -0000 Received: (qmail 85392 invoked by uid 500); 18 Feb 2008 15:58:56 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 85268 invoked by uid 500); 18 Feb 2008 15:58:56 -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 85257 invoked by uid 500); 18 Feb 2008 15:58:56 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 85254 invoked by uid 99); 18 Feb 2008 15:58:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Feb 2008 07:58:56 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Mon, 18 Feb 2008 15:58:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AB1461A983A; Mon, 18 Feb 2008 07:58:36 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r628788 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java Date: Mon, 18 Feb 2008 15:58:36 -0000 To: axis2-cvs@ws.apache.org From: pradine@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080218155836.AB1461A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pradine Date: Mon Feb 18 07:58:35 2008 New Revision: 628788 URL: http://svn.apache.org/viewvc?rev=628788&view=rev Log: Allow an endpoint reference that does not contain any (recognized) metadata to work. Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java?rev=628788&r1=628787&r2=628788&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java (original) +++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java Mon Feb 18 07:58:35 2008 @@ -372,16 +372,15 @@ ServiceName serviceName = EndpointReferenceHelper.getServiceNameMetadata(epr, addressingNamespace); QName serviceQName = serviceDescription.getServiceQName(); - //The javadoc says that a WebServiceException should be thrown if the service name - //in the EPR metadata does not match the service name in the WSDL of the JAX-WS - //service instance. - if (!serviceQName.equals(serviceName.getName())) + //We need to throw an exception if the service name in the EPR metadata does not + //match the service name associated with the JAX-WS service instance. + if (serviceName.getName() != null && !serviceQName.equals(serviceName.getName())) throw ExceptionFactory.makeWebServiceException("The service name of the endpoint reference does not match the service name of the service client."); - //TODO The javadoc seems to suggest, inconsistently, that the port name can be - //resolved by looking in the following places: 1) the EPR metadata, 2) the SEI, and - //3) the WSDL. At the moment only 1) is implemented. May need to revisit the others. - portQName = new QName(serviceQName.getNamespaceURI(), serviceName.getEndpointName()); + //If a port name is available from the EPR metadata then use that, otherwise + //leave it to the runtime to find a suitable port, based on WSDL/annotations. + if (serviceName.getEndpointName() != null) + portQName = new QName(serviceQName.getNamespaceURI(), serviceName.getEndpointName()); } catch (Exception e) { //TODO NLS enable. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org