You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ke...@apache.org on 2007/04/24 07:37:45 UTC
svn commit: r531741 - in
/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2:
description/ util/
Author: keithc
Date: Mon Apr 23 22:37:44 2007
New Revision: 531741
URL: http://svn.apache.org/viewvc?view=rev&rev=531741
Log:
Fixing serialization issue in ?wsdl2. Qualifying all top level elements with wsdl namespace
Modified:
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBinding.java?view=diff&rev=531741&r1=531740&r2=531741
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBinding.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBinding.java Mon Apr 23 22:37:44 2007
@@ -116,12 +116,12 @@
* @param nameSpaceMap - The namespacemap of the service
* @return The generated binding element
*/
- public OMElement toWSDL20(OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
+ public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
String interfaceName, Map nameSpaceMap, String addressingFlag) {
String property;
OMFactory omFactory = OMAbstractFactory.getOMFactory();
OMElement bindingElement;
- bindingElement = omFactory.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, null);
+ bindingElement = omFactory.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, wsdl);
bindingElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null,
this.name.getLocalPart()));
bindingElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.INTERFACE_LOCAL_NAME, null,
@@ -190,7 +190,7 @@
Iterator iterator = faults.values().iterator();
while (iterator.hasNext()) {
AxisBindingMessage axisBindingFault = (AxisBindingMessage) iterator.next();
- bindingElement.addChild(axisBindingFault.toWSDL20(tns, wsoap, whttp, nameSpaceMap));
+ bindingElement.addChild(axisBindingFault.toWSDL20(wsdl, tns, wsoap, whttp, nameSpaceMap));
}
}
@@ -198,7 +198,7 @@
Iterator iterator = this.getChildren();
while (iterator.hasNext()) {
AxisBindingOperation axisBindingOperation = (AxisBindingOperation) iterator.next();
- bindingElement.addChild(axisBindingOperation.toWSDL20(tns, wsoap, whttp, type, nameSpaceMap));
+ bindingElement.addChild(axisBindingOperation.toWSDL20(wsdl, tns, wsoap, whttp, type, nameSpaceMap));
}
return bindingElement;
}
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java?view=diff&rev=531741&r1=531740&r2=531741
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingMessage.java Mon Apr 23 22:37:44 2007
@@ -124,7 +124,7 @@
* @param nameSpaceMap - The namespacemap of the service
* @return The generated bindingMessage element
*/
- public OMElement toWSDL20(OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
+ public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
Map nameSpaceMap) {
String property;
ArrayList list;
@@ -136,13 +136,13 @@
if (this.getParent() instanceof AxisBinding) {
bindingMessageElement =
- omFactory.createOMElement(WSDL2Constants.FAULT_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.FAULT_LOCAL_NAME, wsdl);
} else if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN.equals(this.getDirection())) {
bindingMessageElement =
- omFactory.createOMElement(WSDL2Constants.IN_FAULT_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.IN_FAULT_LOCAL_NAME, wsdl);
} else {
bindingMessageElement =
- omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME, wsdl);
}
bindingMessageElement.addAttribute(omFactory.createOMAttribute(
WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":" + this.name));
@@ -166,12 +166,12 @@
//Checks whether the message is an input message
} else if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN.equals(this.getDirection())) {
bindingMessageElement =
- omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME, wsdl);
//Message should be an output message
} else {
bindingMessageElement =
- omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME, wsdl);
}
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java?view=diff&rev=531741&r1=531740&r2=531741
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisBindingOperation.java Mon Apr 23 22:37:44 2007
@@ -115,12 +115,12 @@
* @param nameSpaceMap - The namespacemap of the service
* @return The generated binding element
*/
- public OMElement toWSDL20(OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
+ public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace wsoap, OMNamespace whttp,
String type, Map nameSpaceMap) {
String property;
OMFactory omFactory = OMAbstractFactory.getOMFactory();
OMElement bindingOpElement =
- omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, wsdl);
bindingOpElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF,
null, tns.getPrefix() + ":" +
this.name.getLocalPart()));
@@ -193,14 +193,14 @@
AxisBindingMessage inMessage =
(AxisBindingMessage) this.getChild(WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
if (inMessage != null) {
- bindingOpElement.addChild(inMessage.toWSDL20(tns, wsoap, whttp, nameSpaceMap));
+ bindingOpElement.addChild(inMessage.toWSDL20(wsdl, tns, wsoap, whttp, nameSpaceMap));
}
// Add the output element
AxisBindingMessage outMessage =
(AxisBindingMessage) this.getChild(WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT);
if (outMessage != null) {
- bindingOpElement.addChild(outMessage.toWSDL20(tns, wsoap, whttp, nameSpaceMap));
+ bindingOpElement.addChild(outMessage.toWSDL20(wsdl, tns, wsoap, whttp, nameSpaceMap));
}
// Add any fault elements
@@ -209,7 +209,7 @@
Iterator iterator = faultValues.iterator();
while (iterator.hasNext()) {
AxisBindingMessage faultMessage = (AxisBindingMessage) iterator.next();
- bindingOpElement.addChild(faultMessage.toWSDL20(tns, wsoap, whttp, nameSpaceMap));
+ bindingOpElement.addChild(faultMessage.toWSDL20(wsdl, tns, wsoap, whttp, nameSpaceMap));
}
}
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java?view=diff&rev=531741&r1=531740&r2=531741
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisEndpoint.java Mon Apr 23 22:37:44 2007
@@ -112,10 +112,10 @@
}
- public OMElement toWSDL20(OMNamespace tns, OMNamespace whttp, String epr) {
+ public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace whttp, String epr) {
String property;
OMFactory omFactory = OMAbstractFactory.getOMFactory();
- OMElement endpointElement = omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, null);
+ OMElement endpointElement = omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl);
endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, this.getName()));
endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.BINDING_LOCAL_NAME, null, tns.getPrefix() + ":" + getBinding().getName().getLocalPart()));
endpointElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, epr));
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?view=diff&rev=531741&r1=531740&r2=531741
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisOperation.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisOperation.java Mon Apr 23 22:37:44 2007
@@ -642,10 +642,10 @@
* @param wsdlx - The WSDL extentions namespace (WSDL 2.0)
* @return The generated binding element
*/
- public OMElement toWSDL20(OMNamespace tns, OMNamespace wsdlx) {
+ public OMElement toWSDL20(OMNamespace wsdl, OMNamespace tns, OMNamespace wsdlx) {
OMFactory omFactory = OMAbstractFactory.getOMFactory();
OMElement axisOperationElement =
- omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, wsdl);
axisOperationElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME,
null,
this.getName().getLocalPart()));
@@ -662,7 +662,7 @@
// Add the input element
AxisMessage inMessage = (AxisMessage) getChild(WSDLConstants.WSDL_MESSAGE_IN_MESSAGE);
if (inMessage != null) {
- OMElement inMessageElement = omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME, null);
+ OMElement inMessageElement = omFactory.createOMElement(WSDL2Constants.IN_PUT_LOCAL_NAME, wsdl);
inMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil.getElementName(inMessage, nameSpaceMap)));
WSDLSerializationUtil.addWSAWActionAttribute(inMessageElement, getInputAction());
axisOperationElement.addChild(inMessageElement);
@@ -671,7 +671,7 @@
// Add the output element
AxisMessage outMessage = (AxisMessage) getChild(WSDLConstants.WSDL_MESSAGE_OUT_MESSAGE);
if (outMessage != null) {
- OMElement outMessageElement = omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME, null);
+ OMElement outMessageElement = omFactory.createOMElement(WSDL2Constants.OUT_PUT_LOCAL_NAME, wsdl);
outMessageElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ELEMENT, null, WSDLSerializationUtil.getElementName(outMessage, nameSpaceMap)));
WSDLSerializationUtil.addWSAWActionAttribute(outMessageElement, getOutputAction());
axisOperationElement.addChild(outMessageElement);
@@ -685,9 +685,9 @@
AxisMessage faultMessage = (AxisMessage) iterator.next();
OMElement faultElement;
if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN.equals(faultMessage.getDirection())) {
- faultElement = omFactory.createOMElement(WSDL2Constants.IN_FAULT_LOCAL_NAME, null);
+ faultElement = omFactory.createOMElement(WSDL2Constants.IN_FAULT_LOCAL_NAME, wsdl);
} else {
- faultElement = omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME, null);
+ faultElement = omFactory.createOMElement(WSDL2Constants.OUT_FAULT_LOCAL_NAME, wsdl);
}
faultElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null, tns.getPrefix() + ":" + faultMessage.getName()));
WSDLSerializationUtil.addWSAWActionAttribute(faultElement, getFaultAction(faultMessage.getName()));
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java?view=diff&rev=531741&r1=531740&r2=531741
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java Mon Apr 23 22:37:44 2007
@@ -40,7 +40,20 @@
Map nameSpacesMap = axisService.getNameSpacesMap();
OMFactory omFactory = OMAbstractFactory.getOMFactory();
- OMElement descriptionElement = omFactory.createOMElement(WSDL2Constants.DESCRIPTION, null);
+
+ OMNamespace wsdl;
+
+ if (nameSpacesMap!= null && nameSpacesMap.containsValue(WSDL2Constants.WSDL_NAMESPACE)) {
+ wsdl = omFactory
+ .createOMNamespace(WSDL2Constants.WSDL_NAMESPACE,
+ WSDLSerializationUtil.getPrefix(
+ WSDL2Constants.WSDL_NAMESPACE, nameSpacesMap));
+ } else {
+ wsdl = omFactory
+ .createOMNamespace(WSDL2Constants.WSDL_NAMESPACE, WSDL2Constants.DEFAULT_WSDL_NAMESPACE_PREFIX);
+ }
+
+ OMElement descriptionElement = omFactory.createOMElement(WSDL2Constants.DESCRIPTION, wsdl);
// Declare all the defined namespaces in the document
WSDLSerializationUtil.populateNamespaces(descriptionElement, nameSpacesMap);
@@ -96,14 +109,14 @@
// Add the documentation element
String description;
OMElement documentationElement =
- omFactory.createOMElement(WSDL2Constants.DOCUMENTATION, null);
+ omFactory.createOMElement(WSDL2Constants.DOCUMENTATION, wsdl);
if ((description = axisService.getServiceDescription()) != null) {
documentationElement.setText(description);
}
descriptionElement.addChild(documentationElement);
// Add types element
- OMElement typesElement = omFactory.createOMElement(WSDL2Constants.TYPES_LOCAL_NALE, null);
+ OMElement typesElement = omFactory.createOMElement(WSDL2Constants.TYPES_LOCAL_NALE, wsdl);
axisService.populateSchemaMappings();
ArrayList schemas = axisService.getSchema();
for (int i = 0; i < schemas.size(); i++) {
@@ -136,7 +149,7 @@
}
// Add the interface element
- descriptionElement.addChild(getInterfaceEmelent(tns, wsdlx, omFactory, interfaceName));
+ descriptionElement.addChild(getInterfaceEmelent(wsdl, tns, wsdlx, omFactory, interfaceName));
// Check whether the axisService has any endpoints. If they exists serialize them else
// generate default endpoint elements.
@@ -146,13 +159,13 @@
if (eprs == null) {
eprs = new String[]{axisService.getName()};
}
- OMElement serviceElement = getServiceElement(tns, omFactory, interfaceName);
+ OMElement serviceElement = getServiceElement(wsdl, tns, omFactory, interfaceName);
Iterator iterator = endpointMap.values().iterator();
while (iterator.hasNext()) {
AxisEndpoint axisEndpoint = (AxisEndpoint) iterator.next();
- serviceElement.addChild(axisEndpoint.toWSDL20(tns, whttp, eprs[0]));
+ serviceElement.addChild(axisEndpoint.toWSDL20(wsdl, tns, whttp, eprs[0]));
- descriptionElement.addChild(axisEndpoint.getBinding().toWSDL20(tns, wsoap, whttp,
+ descriptionElement.addChild(axisEndpoint.getBinding().toWSDL20(wsdl, tns, wsoap, whttp,
interfaceName,
axisService.getNameSpacesMap(),
axisService.getWSAddressingFlag()));
@@ -163,15 +176,15 @@
// There are no andpoints defined hence generate default bindings and endpoints
descriptionElement.addChild(
- WSDLSerializationUtil.generateSOAP11Binding(omFactory, axisService, wsoap,
+ WSDLSerializationUtil.generateSOAP11Binding(omFactory, axisService, wsdl, wsoap,
tns));
descriptionElement.addChild(
- WSDLSerializationUtil.generateSOAP12Binding(omFactory, axisService, wsoap,
+ WSDLSerializationUtil.generateSOAP12Binding(omFactory, axisService, wsdl, wsoap,
tns));
descriptionElement.addChild(
- WSDLSerializationUtil.generateHTTPBinding(omFactory, axisService, whttp, tns));
+ WSDLSerializationUtil.generateHTTPBinding(omFactory, axisService, wsdl, whttp, tns));
descriptionElement
- .addChild(WSDLSerializationUtil.generateServiceElement(omFactory, tns,
+ .addChild(WSDLSerializationUtil.generateServiceElement(omFactory, wsdl, tns,
axisService));
}
@@ -187,10 +200,10 @@
* @param interfaceName - The name of the interface
* @return - The generated interface element
*/
- private OMElement getInterfaceEmelent(OMNamespace tns, OMNamespace wsdlx,
+ private OMElement getInterfaceEmelent(OMNamespace wsdl, OMNamespace tns, OMNamespace wsdlx,
OMFactory fac, String interfaceName) {
- OMElement interfaceElement = fac.createOMElement(WSDL2Constants.INTERFACE_LOCAL_NAME, null);
+ OMElement interfaceElement = fac.createOMElement(WSDL2Constants.INTERFACE_LOCAL_NAME, wsdl);
interfaceElement.addAttribute(fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null,
interfaceName));
Iterator iterator = axisService.getOperations();
@@ -199,7 +212,7 @@
int i = 0;
while (iterator.hasNext()) {
AxisOperation axisOperation = (AxisOperation) iterator.next();
- interfaceOperations.add(i, axisOperation.toWSDL20(tns, wsdlx));
+ interfaceOperations.add(i, axisOperation.toWSDL20(wsdl, tns, wsdlx));
i++;
Iterator faultsIterator = axisOperation.getFaultMessages().iterator();
while (faultsIterator.hasNext()) {
@@ -207,7 +220,7 @@
String name = faultMessage.getName();
if (!interfaceFaults.contains(name)) {
OMElement faultElement =
- fac.createOMElement(WSDL2Constants.FAULT_LOCAL_NAME, null);
+ fac.createOMElement(WSDL2Constants.FAULT_LOCAL_NAME, wsdl);
faultElement.addAttribute(
fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, name));
faultElement.addAttribute(fac.createOMAttribute(
@@ -233,10 +246,10 @@
* @param interfaceName - The name of the interface
* @return - The generated service element
*/
- private OMElement getServiceElement(OMNamespace tns, OMFactory omFactory,
+ private OMElement getServiceElement(OMNamespace wsdl, OMNamespace tns, OMFactory omFactory,
String interfaceName) {
OMElement serviceElement =
- omFactory.createOMElement(WSDL2Constants.SERVICE_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.SERVICE_LOCAL_NAME, wsdl);
serviceElement.addAttribute(
omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null,
axisService.getName()));
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java?view=diff&rev=531741&r1=531740&r2=531741
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/util/WSDLSerializationUtil.java Mon Apr 23 22:37:44 2007
@@ -163,8 +163,8 @@
* @return - The generated SOAP11Binding element
*/
public static OMElement generateSOAP11Binding(OMFactory fac, AxisService axisService,
- OMNamespace wsoap, OMNamespace tns) {
- OMElement binding = fac.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, null);
+ OMNamespace wsdl, OMNamespace wsoap, OMNamespace tns) {
+ OMElement binding = fac.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, wsdl);
binding.addAttribute(
fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, axisService.getName() +
Java2WSDLConstants.BINDING_NAME_SUFFIX));
@@ -175,7 +175,7 @@
WSDL2Constants.URI_WSDL2_SOAP));
binding.addAttribute(fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_VERSION, wsoap,
WSDL2Constants.SOAP_VERSION_1_1));
- generateDefaultSOAPBindingOperations(axisService, fac, binding, tns, wsoap);
+ generateDefaultSOAPBindingOperations(axisService, fac, binding, wsdl, tns, wsoap);
return binding;
}
@@ -188,8 +188,8 @@
* @return - The generated SOAP12Binding element
*/
public static OMElement generateSOAP12Binding(OMFactory fac, AxisService axisService,
- OMNamespace wsoap, OMNamespace tns) {
- OMElement binding = fac.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, null);
+ OMNamespace wsdl, OMNamespace wsoap, OMNamespace tns) {
+ OMElement binding = fac.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, wsdl);
binding.addAttribute(
fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, axisService.getName() +
Java2WSDLConstants.SOAP12BINDING_NAME_SUFFIX));
@@ -200,7 +200,7 @@
WSDL2Constants.URI_WSDL2_SOAP));
binding.addAttribute(fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_VERSION, wsoap,
WSDL2Constants.SOAP_VERSION_1_2));
- generateDefaultSOAPBindingOperations(axisService, fac, binding, tns, wsoap);
+ generateDefaultSOAPBindingOperations(axisService, fac, binding, wsdl, tns, wsoap);
return binding;
}
@@ -213,8 +213,8 @@
* @return - The generated HTTPBinding element
*/
public static OMElement generateHTTPBinding(OMFactory fac, AxisService axisService,
- OMNamespace whttp, OMNamespace tns) {
- OMElement binding = fac.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, null);
+ OMNamespace wsdl, OMNamespace whttp, OMNamespace tns) {
+ OMElement binding = fac.createOMElement(WSDL2Constants.BINDING_LOCAL_NAME, wsdl);
binding.addAttribute(
fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME, null, axisService.getName() +
Java2WSDLConstants.HTTP_BINDING));
@@ -226,7 +226,7 @@
Iterator iterator = axisService.getChildren();
while (iterator.hasNext()) {
AxisOperation axisOperation = (AxisOperation) iterator.next();
- OMElement opElement = fac.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, null);
+ OMElement opElement = fac.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, wsdl);
binding.addChild(opElement);
String name = axisOperation.getName().getLocalPart();
opElement.addAttribute(fac.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null,
@@ -237,11 +237,11 @@
return binding;
}
- private static void generateDefaultSOAPBindingOperations(AxisService axisService, OMFactory omFactory, OMElement binding, OMNamespace tns, OMNamespace wsoap) {
+ private static void generateDefaultSOAPBindingOperations(AxisService axisService, OMFactory omFactory, OMElement binding, OMNamespace wsdl, OMNamespace tns, OMNamespace wsoap) {
Iterator iterator = axisService.getChildren();
while (iterator.hasNext()) {
AxisOperation axisOperation = (AxisOperation) iterator.next();
- OMElement opElement = omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, null);
+ OMElement opElement = omFactory.createOMElement(WSDL2Constants.OPERATION_LOCAL_NAME, wsdl);
binding.addChild(opElement);
String name = axisOperation.getName().getLocalPart();
opElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_REF, null,
@@ -259,7 +259,7 @@
* @return - The generated service element
* @throws AxisFault - Thrown in case an exception occurs
*/
- public static OMElement generateServiceElement(OMFactory omFactory, OMNamespace tns,
+ public static OMElement generateServiceElement(OMFactory omFactory, OMNamespace wsdl, OMNamespace tns,
AxisService axisService)
throws AxisFault {
String[] eprs = axisService.getEPRs();
@@ -268,14 +268,14 @@
}
OMElement serviceElement = null;
for (int i = 0; i < eprs.length; i++) {
- serviceElement = omFactory.createOMElement(WSDL2Constants.SERVICE_LOCAL_NAME, null);
+ serviceElement = omFactory.createOMElement(WSDL2Constants.SERVICE_LOCAL_NAME, wsdl);
serviceElement.addAttribute(omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_NAME,
null, axisService.getName()));
serviceElement.addAttribute(omFactory.createOMAttribute(
WSDL2Constants.INTERFACE_LOCAL_NAME, null,
tns.getPrefix() + ":" + WSDL2Constants.DEFAULT_INTERFACE_NAME));
OMElement soap11EndpointElement =
- omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl);
soap11EndpointElement.addAttribute(omFactory.createOMAttribute(
WSDL2Constants.ATTRIBUTE_NAME, null,
WSDL2Constants.DEFAULT_SOAP11_ENDPOINT_NAME));
@@ -287,7 +287,7 @@
omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, eprs[i]));
serviceElement.addChild(soap11EndpointElement);
OMElement soap12EndpointElement =
- omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl);
soap12EndpointElement.addAttribute(omFactory.createOMAttribute(
WSDL2Constants.ATTRIBUTE_NAME, null,
WSDL2Constants.DEFAULT_SOAP12_ENDPOINT_NAME));
@@ -299,7 +299,7 @@
omFactory.createOMAttribute(WSDL2Constants.ATTRIBUTE_ADDRESS, null, eprs[i]));
serviceElement.addChild(soap12EndpointElement);
OMElement httpEndpointElement =
- omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, null);
+ omFactory.createOMElement(WSDL2Constants.ENDPOINT_LOCAL_NAME, wsdl);
httpEndpointElement.addAttribute(omFactory.createOMAttribute(
WSDL2Constants.ATTRIBUTE_NAME, null,
WSDL2Constants.DEFAULT_HTTP_ENDPOINT_NAME));
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org