diff options
author | kchong | 2005-06-02 19:39:11 +0000 |
---|---|---|
committer | kchong | 2005-06-02 19:39:11 +0000 |
commit | ca78cda050a7328888d5be6823dd40a2a5ee0f5f (patch) | |
tree | 0f62d25b0b0650a95010a6a6d7b4c1cdeaa392b5 /bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl | |
parent | 7d939856b4388733f705a141b72fb6c5183445bc (diff) | |
download | webtools.webservices-ca78cda050a7328888d5be6823dd40a2a5ee0f5f.tar.gz webtools.webservices-ca78cda050a7328888d5be6823dd40a2a5ee0f5f.tar.xz webtools.webservices-ca78cda050a7328888d5be6823dd40a2a5ee0f5f.zip |
[97887] input/output message ordering for Operation not working - Change to OperationImpl; Code cleanup - removed unused string in DefinitionImpl
Diffstat (limited to 'bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl')
2 files changed, 20 insertions, 9 deletions
diff --git a/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/DefinitionImpl.java b/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/DefinitionImpl.java index 4ac725a58..02fbb2d78 100644 --- a/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/DefinitionImpl.java +++ b/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/DefinitionImpl.java @@ -259,7 +259,6 @@ public class DefinitionImpl extends ExtensibleElementImpl implements Definition protected EList eImports = null; private ExtensionRegistry extensionRegistry; - private String documentBaseURI; private Document document; private HashMap namespaces = new HashMap(); diff --git a/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/OperationImpl.java b/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/OperationImpl.java index 973b8d15f..1c19e1695 100644 --- a/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/OperationImpl.java +++ b/bundles/org.eclipse.wst.wsdl/src-wsdl/org/eclipse/wst/wsdl/internal/impl/OperationImpl.java @@ -11,6 +11,7 @@ package org.eclipse.wst.wsdl.internal.impl; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; @@ -934,6 +935,15 @@ public class OperationImpl extends WSDLElementImpl implements Operation { setName(name); } + + String parameterOrder = changedElement.getAttribute("parameterOrder"); + if (parameterOrder != null) + { + String[] array = parameterOrder.split(" "); + List l = Arrays.asList(array); + setParameterOrdering(l); + } + } public void elementChanged(Element changedElement) @@ -1054,34 +1064,36 @@ public class OperationImpl extends WSDLElementImpl implements Operation // Switch <input> and <output> private void reorderChildren() { - NodeList nodeList = getElement().getChildNodes(); // There are children. - // Find out the positions of <input> and <output> - Node current = null; Node input = null; Node output = null; Node reference = null; - for (int i=0; i<nodeList.getLength(); i++) + for (Node current=getElement().getFirstChild(); current!= null;current=current.getNextSibling()) { - current = nodeList.item(i); if (current.getNodeType() == Node.ELEMENT_NODE) { if (WSDLConstants.INPUT == WSDLUtil.getInstance().getWSDLType((Element)current)) { input = current; if (output != null) - reference = nodeList.item(i+1); + { + // cs.. for safety use current.getNextSibling() instead of nodeList.item(i+1) + reference = current.getNextSibling(); + } } else if (WSDLConstants.OUTPUT == WSDLUtil.getInstance().getWSDLType((Element)current)) { output = current; if (input != null) - reference = nodeList.item(i+1); + { + // cs.. for safety use current.getNextSibling() instead of nodeList.item(i+1) + reference = current.getNextSibling(); + } } } } // end for - if (input != null && output != null && reference != null) + if (input != null && output != null) { Element parent = getElement(); if (getStyle().equals(OperationType.REQUEST_RESPONSE)) |