Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 41801 invoked from network); 28 Mar 2008 16:23:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Mar 2008 16:23:34 -0000 Received: (qmail 64199 invoked by uid 500); 28 Mar 2008 16:23:32 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 64100 invoked by uid 500); 28 Mar 2008 16:23:32 -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 64089 invoked by uid 500); 28 Mar 2008 16:23:32 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 64086 invoked by uid 99); 28 Mar 2008 16:23:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Mar 2008 09:23:32 -0700 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; Fri, 28 Mar 2008 16:23:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 490AF1A9832; Fri, 28 Mar 2008 09:23:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r642279 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description: AxisEndpoint.java AxisService2WSDL20.java Date: Fri, 28 Mar 2008 16:23:11 -0000 To: axis2-cvs@ws.apache.org From: keithc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080328162312.490AF1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: keithc Date: Fri Mar 28 09:23:06 2008 New Revision: 642279 URL: http://svn.apache.org/viewvc?rev=642279&view=rev Log: Fixing AXIS2-3676. Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?rev=642279&r1=642278&r2=642279&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java Fri Mar 28 09:23:06 2008 @@ -128,19 +128,8 @@ "axisMessage.isEngaged() is not supported"); } - public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, - OMNamespace whttp, String epr) { + public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace whttp) { String property; - String name; - if (epr.startsWith("https://")) { - // The reason to do this is to have camel case - String endpointName = this.getName(); - name = WSDL2Constants.DEFAULT_HTTPS_PREFIX - + endpointName.substring(0, 1).toUpperCase() - + endpointName.substring(1); - } else { - name = this.getName(); - } OMFactory omFactory = OMAbstractFactory.getOMFactory(); OMElement endpointElement = omFactory.createOMElement( WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl); @@ -150,7 +139,7 @@ WSDL2Constants.BINDING_LOCAL_NAME, null, tns.getPrefix() + ":" + getBinding().getName().getLocalPart())); endpointElement.addAttribute(omFactory.createOMAttribute( - WSDL2Constants.ATTRIBUTE_ADDRESS, null, epr)); + WSDL2Constants.ATTRIBUTE_ADDRESS, null, getEndpointURL())); Object authenticationScheme = this.options .get(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_TYPE); if (authenticationScheme != null) { Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java?rev=642279&r1=642278&r2=642279&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL20.java Fri Mar 28 09:23:06 2008 @@ -221,10 +221,7 @@ Set bindings = new HashSet(); Map endpointMap = axisService.getEndpoints(); if (endpointMap != null && endpointMap.size() > 0) { - String[] eprs = axisService.getEPRs(); - if (eprs == null) { - eprs = new String[]{serviceName}; - } + OMElement serviceElement = getServiceElement(wsdl, tns, omFactory, interfaceName); Iterator iterator = endpointMap.values().iterator(); while (iterator.hasNext()) { @@ -252,30 +249,27 @@ continue; } } - - bindings.add(axisBinding); - for (int i = 0; i < eprs.length; i++) { - String epr = eprs[i]; - OMElement endpointElement = axisEndpoint.toWSDL20(wsdl, tns, whttp, epr); - boolean endpointAlreadyAdded = false; - Iterator endpointsAdded = serviceElement.getChildren(); - while (endpointsAdded.hasNext()) { - OMElement endpoint = (OMElement) endpointsAdded.next(); - // Checking whether a endpoint with the same binding and address exists. - if (endpoint.getAttribute(new QName(WSDL2Constants.BINDING_LOCAL_NAME)) - .getAttributeValue().equals(endpointElement.getAttribute( - new QName(WSDL2Constants.BINDING_LOCAL_NAME)).getAttributeValue()) - && endpoint - .getAttribute(new QName(WSDL2Constants.ATTRIBUTE_ADDRESS)) - .getAttributeValue().equals(endpointElement.getAttribute( - new QName(WSDL2Constants.ATTRIBUTE_ADDRESS)).getAttributeValue())) { - endpointAlreadyAdded = true; - } + bindings.add(axisBinding); + OMElement endpointElement = axisEndpoint.toWSDL20(wsdl, tns, whttp); + boolean endpointAlreadyAdded = false; + Iterator endpointsAdded = serviceElement.getChildren(); + while (endpointsAdded.hasNext()) { + OMElement endpoint = (OMElement) endpointsAdded.next(); + // Checking whether a endpoint with the same binding and address exists. + if (endpoint.getAttribute(new QName(WSDL2Constants.BINDING_LOCAL_NAME)) + .getAttributeValue().equals(endpointElement.getAttribute( + new QName(WSDL2Constants.BINDING_LOCAL_NAME)).getAttributeValue()) + && endpoint + .getAttribute(new QName(WSDL2Constants.ATTRIBUTE_ADDRESS)) + .getAttributeValue().equals(endpointElement.getAttribute( + new QName(WSDL2Constants.ATTRIBUTE_ADDRESS)).getAttributeValue())) { + endpointAlreadyAdded = true; } - if (!endpointAlreadyAdded) { - serviceElement.addChild(endpointElement); - } + + } + if (!endpointAlreadyAdded) { + serviceElement.addChild(endpointElement); } } Iterator iter = bindings.iterator(); --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org