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 ke...@apache.org on 2008/03/28 17:23:11 UTC
svn commit: r642279 - in
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description:
AxisEndpoint.java AxisService2WSDL20.java
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