You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by hu...@apache.org on 2006/09/18 14:21:21 UTC
svn commit: r447385 [1/4] - in /incubator/woden/trunk/java:
src/org/apache/woden/internal/ src/org/apache/woden/internal/wsdl20/
src/org/apache/woden/internal/wsdl20/extensions/http/
src/org/apache/woden/internal/wsdl20/extensions/soap/ src/org/apache/...
Author: hughesj
Date: Mon Sep 18 05:21:19 2006
New Revision: 447385
URL: http://svn.apache.org/viewvc?view=rev&rev=447385
Log:
WODEN-40: merge WODEN-40 branch into the trunk. Implemented #1 & #2 of the issue:
1. remove addXxxElement methods. Change semantics of createXxxElement to "create and add"
I had a change of heart here. Instead of using createXxxElement methods to create and add
I used the addXxxElement naming convention.
2. distribute createXxxElement methods so they appear on the YyyElement interface where Yyy is the parent element of Xxx
As in #1 createXxxElement is addXxxElement
Added:
incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/ChildElementCreationTest.java
- copied unchanged from r447377, incubator/woden/branches/WODEN-40/test/org/apache/woden/wsdl20/xml/ChildElementCreationTest.java
Modified:
incubator/woden/trunk/java/src/org/apache/woden/internal/DOMWSDLReader.java
incubator/woden/trunk/java/src/org/apache/woden/internal/OMWSDLReader.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ServiceImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPModuleDeserializer.java
incubator/woden/trunk/java/src/org/apache/woden/wsdl20/xml/BindingElement.java
incubator/woden/trunk/java/src/org/apache/woden/wsdl20/xml/BindingOperationElement.java
incubator/woden/trunk/java/src/org/apache/woden/wsdl20/xml/ConfigurableElement.java
incubator/woden/trunk/java/src/org/apache/woden/wsdl20/xml/DescriptionElement.java
incubator/woden/trunk/java/src/org/apache/woden/wsdl20/xml/DocumentableElement.java
incubator/woden/trunk/java/src/org/apache/woden/wsdl20/xml/InterfaceElement.java
incubator/woden/trunk/java/src/org/apache/woden/wsdl20/xml/InterfaceOperationElement.java
incubator/woden/trunk/java/src/org/apache/woden/wsdl20/xml/ServiceElement.java
incubator/woden/trunk/java/test/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidatorTest.java
incubator/woden/trunk/java/test/org/apache/woden/internal/wsdl20/validation/WSDLDocumentValidatorTest.java
incubator/woden/trunk/java/test/org/apache/woden/tests/AllWodenTests.java
incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/OMServiceElementTest.java
incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/ServiceElementTest.java
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/DOMWSDLReader.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/DOMWSDLReader.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/DOMWSDLReader.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/DOMWSDLReader.java Mon Sep 18 05:21:19 2006
@@ -56,7 +56,9 @@
import org.apache.woden.wsdl20.xml.BindingFaultReferenceElement;
import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
import org.apache.woden.wsdl20.xml.BindingOperationElement;
+import org.apache.woden.wsdl20.xml.ConfigurableElement;
import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
import org.apache.woden.wsdl20.xml.DocumentationElement;
import org.apache.woden.wsdl20.xml.EndpointElement;
import org.apache.woden.wsdl20.xml.FeatureElement;
@@ -358,7 +360,7 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- desc.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_IMPORT, tempEl))
{
@@ -366,7 +368,7 @@
{
wsdlModules.put(documentBaseURI, desc);
}
- desc.addImportElement(parseImport(tempEl, desc, wsdlModules));
+ parseImport(tempEl, desc, wsdlModules);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INCLUDE, tempEl))
{
@@ -374,23 +376,23 @@
{
wsdlModules.put(documentBaseURI, desc);
}
- desc.addIncludeElement(parseInclude(tempEl, desc, wsdlModules));
+ parseInclude(tempEl, desc, wsdlModules);
}
else if (QNameUtils.matches(Constants.Q_ELEM_TYPES, tempEl))
{
- desc.setTypesElement(parseTypes(tempEl, desc));
+ parseTypes(tempEl, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INTERFACE, tempEl))
{
- desc.addInterfaceElement(parseInterface(tempEl, desc));
+ parseInterface(tempEl, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_BINDING, tempEl))
{
- desc.addBindingElement(parseBinding(tempEl, desc));
+ parseBinding(tempEl, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_SERVICE, tempEl))
{
- desc.addServiceElement(parseService(tempEl, desc));
+ parseService(tempEl, desc);
}
else
{
@@ -409,11 +411,10 @@
// statement in a WSDL 2.0 document. This method also does not work for when building the
// model programmatically.
// This method should be reevaluated at a later point.
- if(desc.getTypesElement() == null)
+ TypesElement types = desc.getTypesElement();
+ if (types.getTypeSystem() == null)
{
- TypesElement types = desc.createTypesElement();
types.setTypeSystem(Constants.TYPE_XSD_2001);
- desc.setTypesElement(types);
}
try
{
@@ -433,10 +434,11 @@
}
private DocumentationElement parseDocumentation(Element docEl,
- DescriptionElement desc)
+ DescriptionElement desc,
+ DocumentableElement parent)
throws WSDLException
{
- DocumentationElement documentation = desc.createDocumentationElement();
+ DocumentationElement documentation = parent.addDocumentationElement();
//TODO store docEl as below, or just extract any text?
documentation.setContent(docEl);
@@ -463,7 +465,7 @@
Map wsdlModules)
throws WSDLException
{
- ImportElement imp = desc.createImportElement();
+ ImportElement imp = desc.addImportElement();
String namespaceURI = DOMUtils.getAttribute(importEl, Constants.ATTR_NAMESPACE);
String locationURI = DOMUtils.getAttribute(importEl, Constants.ATTR_LOCATION);
@@ -493,7 +495,7 @@
Map wsdlModules)
throws WSDLException
{
- IncludeElement include = desc.createIncludeElement();
+ IncludeElement include = desc.addIncludeElement();
String locationURI = DOMUtils.getAttribute(includeEl, Constants.ATTR_LOCATION);
@@ -519,7 +521,7 @@
DescriptionElement desc)
throws WSDLException
{
- TypesElement types = desc.createTypesElement();
+ TypesElement types = desc.getTypesElement();
//TODO for now set to W3 XML Schema. Later, add support for non-XML Schema type systems
types.setTypeSystem(Constants.TYPE_XSD_2001);
@@ -536,7 +538,7 @@
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- types.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, types);
}
else if (SchemaConstants.XSD_IMPORT_QNAME_LIST.contains(tempElType))
{
@@ -735,7 +737,7 @@
DescriptionElement desc)
throws WSDLException
{
- InterfaceElement intface = desc.createInterfaceElement();
+ InterfaceElement intface = desc.addInterfaceElement();
String name = DOMUtils.getAttribute(interfaceEl, Constants.ATTR_NAME);
@@ -785,23 +787,23 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- intface.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, tempEl))
{
- intface.addInterfaceFaultElement(parseInterfaceFault(tempEl, desc, intface));
+ parseInterfaceFault(tempEl, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OPERATION, tempEl))
{
- intface.addInterfaceOperationElement(parseInterfaceOperation(tempEl, desc, intface));
+ parseInterfaceOperation(tempEl, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- intface.addFeatureElement(parseFeature(tempEl, desc, intface));
+ parseFeature(tempEl, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- intface.addPropertyElement(parseProperty(tempEl, desc, intface));
+ parseProperty(tempEl, desc, intface);
}
else
{
@@ -825,10 +827,10 @@
private InterfaceFaultElement parseInterfaceFault(
Element faultEl,
DescriptionElement desc,
- WSDLElement parent)
+ InterfaceElement parent)
throws WSDLException
{
- InterfaceFaultElement fault = desc.createInterfaceFaultElement();
+ InterfaceFaultElement fault = parent.addInterfaceFaultElement();
fault.setParentElement(parent);
String name = DOMUtils.getAttribute(faultEl, Constants.ATTR_NAME);
@@ -860,15 +862,15 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- fault.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- fault.addFeatureElement(parseFeature(tempEl, desc, fault));
+ parseFeature(tempEl, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- fault.addPropertyElement(parseProperty(tempEl, desc, fault));
+ parseProperty(tempEl, desc, fault);
}
else
{
@@ -885,10 +887,10 @@
private InterfaceOperationElement parseInterfaceOperation(
Element operEl,
DescriptionElement desc,
- WSDLElement parent)
+ InterfaceElement parent)
throws WSDLException
{
- InterfaceOperationElement oper = desc.createInterfaceOperationElement();
+ InterfaceOperationElement oper = parent.addInterfaceOperationElement();
oper.setParentElement(parent);
String name = DOMUtils.getAttribute(operEl, Constants.ATTR_NAME);
@@ -931,31 +933,31 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- oper.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- oper.addFeatureElement(parseFeature(tempEl, desc, oper));
+ parseFeature(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- oper.addPropertyElement(parseProperty(tempEl, desc, oper));
+ parseProperty(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, tempEl))
{
- oper.addInterfaceMessageReferenceElement(parseInterfaceMessageReference(tempEl, desc, oper));
+ parseInterfaceMessageReference(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTPUT, tempEl))
{
- oper.addInterfaceMessageReferenceElement(parseInterfaceMessageReference(tempEl, desc, oper));
+ parseInterfaceMessageReference(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INFAULT, tempEl))
{
- oper.addInterfaceFaultReferenceElement(parseInterfaceFaultReference(tempEl, desc, oper));
+ parseInterfaceFaultReference(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTFAULT, tempEl))
{
- oper.addInterfaceFaultReferenceElement(parseInterfaceFaultReference(tempEl, desc, oper));
+ parseInterfaceFaultReference(tempEl, desc, oper);
}
else
{
@@ -972,10 +974,10 @@
private InterfaceFaultReferenceElement parseInterfaceFaultReference(
Element faultRefEl,
DescriptionElement desc,
- WSDLElement parent)
+ InterfaceOperationElement parent)
throws WSDLException
{
- InterfaceFaultReferenceElement faultRef = desc.createInterfaceFaultReferenceElement();
+ InterfaceFaultReferenceElement faultRef = parent.addInterfaceFaultReferenceElement();
faultRef.setParentElement(parent);
if(Constants.ELEM_INFAULT.equals(faultRefEl.getLocalName())) {
@@ -1021,15 +1023,15 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- faultRef.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- faultRef.addFeatureElement(parseFeature(tempEl, desc, faultRef));
+ parseFeature(tempEl, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- faultRef.addPropertyElement(parseProperty(tempEl, desc, faultRef));
+ parseProperty(tempEl, desc, faultRef);
}
else
{
@@ -1046,10 +1048,10 @@
private InterfaceMessageReferenceElement parseInterfaceMessageReference(
Element msgRefEl,
DescriptionElement desc,
- WSDLElement parent)
+ InterfaceOperationElement parent)
throws WSDLException
{
- InterfaceMessageReferenceElement message = desc.createInterfaceMessageReferenceElement();
+ InterfaceMessageReferenceElement message = parent.addInterfaceMessageReferenceElement();
message.setParentElement(parent);
if(Constants.ELEM_INPUT.equals(msgRefEl.getLocalName())) {
@@ -1124,15 +1126,15 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- message.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- message.addFeatureElement(parseFeature(tempEl, desc, message));
+ parseFeature(tempEl, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- message.addPropertyElement(parseProperty(tempEl, desc, message));
+ parseProperty(tempEl, desc, message);
}
else
{
@@ -1150,7 +1152,7 @@
DescriptionElement desc)
throws WSDLException
{
- BindingElement binding = desc.createBindingElement();
+ BindingElement binding = desc.addBindingElement();
String name = DOMUtils.getAttribute(bindEl, Constants.ATTR_NAME);
if(name != null)
@@ -1194,23 +1196,23 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- binding.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, tempEl))
{
- binding.addBindingFaultElement(parseBindingFault(tempEl, desc, binding));
+ parseBindingFault(tempEl, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OPERATION, tempEl))
{
- binding.addBindingOperationElement(parseBindingOperation(tempEl, desc, binding));
+ parseBindingOperation(tempEl, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- binding.addFeatureElement(parseFeature(tempEl, desc, binding));
+ parseFeature(tempEl, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- binding.addPropertyElement(parseProperty(tempEl, desc, binding));
+ parseProperty(tempEl, desc, binding);
}
else
{
@@ -1226,10 +1228,10 @@
private BindingFaultElement parseBindingFault(Element bindFaultEl,
DescriptionElement desc,
- WSDLElement parent)
+ BindingElement parent)
throws WSDLException
{
- BindingFaultElement fault = desc.createBindingFaultElement();
+ BindingFaultElement fault = parent.addBindingFaultElement();
fault.setParentElement(parent);
QName intFltQN = null;
@@ -1263,15 +1265,15 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- fault.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- fault.addFeatureElement(parseFeature(tempEl, desc, fault));
+ parseFeature(tempEl, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- fault.addPropertyElement(parseProperty(tempEl, desc, fault));
+ parseProperty(tempEl, desc, fault);
}
else
{
@@ -1288,10 +1290,10 @@
private BindingOperationElement parseBindingOperation(
Element bindOpEl,
DescriptionElement desc,
- WSDLElement parent)
+ BindingElement parent)
throws WSDLException
{
- BindingOperationElement oper = desc.createBindingOperationElement();
+ BindingOperationElement oper = parent.addBindingOperationElement();
oper.setParentElement(parent);
QName refQN = null;
@@ -1325,31 +1327,31 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- oper.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- oper.addFeatureElement(parseFeature(tempEl, desc, oper));
+ parseFeature(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- oper.addPropertyElement(parseProperty(tempEl, desc, oper));
+ parseProperty(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, tempEl))
{
- oper.addBindingMessageReferenceElement(parseBindingMessageReference(tempEl, desc, oper));
+ parseBindingMessageReference(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTPUT, tempEl))
{
- oper.addBindingMessageReferenceElement(parseBindingMessageReference(tempEl, desc, oper));
+ parseBindingMessageReference(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INFAULT, tempEl))
{
- oper.addBindingFaultReferenceElement(parseBindingFaultReference(tempEl, desc, oper));
+ parseBindingFaultReference(tempEl, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTFAULT, tempEl))
{
- oper.addBindingFaultReferenceElement(parseBindingFaultReference(tempEl, desc, oper));
+ parseBindingFaultReference(tempEl, desc, oper);
}
else
{
@@ -1366,10 +1368,10 @@
private BindingFaultReferenceElement parseBindingFaultReference(
Element faultRefEl,
DescriptionElement desc,
- WSDLElement parent)
+ BindingOperationElement parent)
throws WSDLException
{
- BindingFaultReferenceElement faultRef = desc.createBindingFaultReferenceElement();
+ BindingFaultReferenceElement faultRef = parent.addBindingFaultReferenceElement();
faultRef.setParentElement(parent);
QName refQN = null;
@@ -1416,15 +1418,15 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- faultRef.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- faultRef.addFeatureElement(parseFeature(tempEl, desc, faultRef));
+ parseFeature(tempEl, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- faultRef.addPropertyElement(parseProperty(tempEl, desc, faultRef));
+ parseProperty(tempEl, desc, faultRef);
}
else
{
@@ -1441,10 +1443,10 @@
private BindingMessageReferenceElement parseBindingMessageReference(
Element msgRefEl,
DescriptionElement desc,
- WSDLElement parent)
+ BindingOperationElement parent)
throws WSDLException
{
- BindingMessageReferenceElement message = desc.createBindingMessageReferenceElement();
+ BindingMessageReferenceElement message = parent.addBindingMessageReferenceElement();
message.setParentElement(parent);
if(Constants.ELEM_INPUT.equals(msgRefEl.getLocalName())) {
@@ -1494,15 +1496,15 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- message.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- message.addFeatureElement(parseFeature(tempEl, desc, message));
+ parseFeature(tempEl, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- message.addPropertyElement(parseProperty(tempEl, desc, message));
+ parseProperty(tempEl, desc, message);
}
else
{
@@ -1520,7 +1522,7 @@
DescriptionElement desc)
throws WSDLException
{
- ServiceElement service = desc.createServiceElement();
+ ServiceElement service = desc.addServiceElement();
String name = DOMUtils.getAttribute(serviceEl, Constants.ATTR_NAME);
if(name != null)
@@ -1560,19 +1562,19 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- service.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_ENDPOINT, tempEl))
{
- service.addEndpointElement(parseEndpoint(tempEl, desc, service));
+ parseEndpoint(tempEl, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- service.addFeatureElement(parseFeature(tempEl, desc, service));
+ parseFeature(tempEl, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- service.addPropertyElement(parseProperty(tempEl, desc, service));
+ parseProperty(tempEl, desc, service);
}
else
{
@@ -1588,10 +1590,10 @@
private EndpointElement parseEndpoint(Element endpointEl,
DescriptionElement desc,
- WSDLElement parent)
+ ServiceElement parent)
throws WSDLException
{
- EndpointElement endpoint = desc.createEndpointElement();
+ EndpointElement endpoint = parent.addEndpointElement();
endpoint.setParentElement(parent);
String name = DOMUtils.getAttribute(endpointEl, Constants.ATTR_NAME);
@@ -1639,15 +1641,15 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- endpoint.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, endpoint);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, tempEl))
{
- endpoint.addFeatureElement(parseFeature(tempEl, desc, endpoint));
+ parseFeature(tempEl, desc, endpoint);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, tempEl))
{
- endpoint.addPropertyElement(parseProperty(tempEl, desc, endpoint));
+ parseProperty(tempEl, desc, endpoint);
}
else
{
@@ -1663,10 +1665,10 @@
private FeatureElement parseFeature(Element featEl,
DescriptionElement desc,
- WSDLElement parent)
+ ConfigurableElement parent)
throws WSDLException
{
- FeatureElement feature = desc.createFeatureElement();
+ FeatureElement feature = parent.addFeatureElement();
feature.setParentElement(parent);
String ref = DOMUtils.getAttribute(featEl, Constants.ATTR_REF);
@@ -1695,7 +1697,7 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- feature.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, feature);
}
else
{
@@ -1734,10 +1736,10 @@
*/
private PropertyElement parseProperty(Element propEl,
DescriptionElement desc,
- WSDLElement parent)
+ ConfigurableElement parent)
throws WSDLException
{
- PropertyElement property = desc.createPropertyElement();
+ PropertyElement property = parent.addPropertyElement();
property.setParentElement(parent);
String ref = DOMUtils.getAttribute(propEl, Constants.ATTR_REF);
@@ -1754,7 +1756,7 @@
{
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, tempEl))
{
- property.addDocumentationElement(parseDocumentation(tempEl, desc));
+ parseDocumentation(tempEl, desc, property);
}
else if(QNameUtils.matches(Constants.Q_ELEM_VALUE, tempEl))
{
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/OMWSDLReader.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/OMWSDLReader.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/OMWSDLReader.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/OMWSDLReader.java Mon Sep 18 05:21:19 2006
@@ -40,7 +40,9 @@
import org.apache.woden.wsdl20.xml.BindingFaultReferenceElement;
import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
import org.apache.woden.wsdl20.xml.BindingOperationElement;
+import org.apache.woden.wsdl20.xml.ConfigurableElement;
import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
import org.apache.woden.wsdl20.xml.DocumentationElement;
import org.apache.woden.wsdl20.xml.EndpointElement;
import org.apache.woden.wsdl20.xml.FeatureElement;
@@ -162,31 +164,31 @@
while (wsdlComponents.hasNext()){
OMElement wsdlComponent = ((OMElement)wsdlComponents.next());
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, wsdlComponent)){
- desc.addDocumentationElement(parseDocumentation(wsdlComponent, desc));
+ parseDocumentation(wsdlComponent, desc, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_TYPES, wsdlComponent)){
- desc.setTypesElement(parseTypes(wsdlComponent, desc));
+ parseTypes(wsdlComponent, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INTERFACE, wsdlComponent)){
- desc.addInterfaceElement(parseInterface(wsdlComponent, desc));
+ parseInterface(wsdlComponent, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_BINDING, wsdlComponent)){
- desc.addBindingElement(parseBinding(wsdlComponent, desc));
+ parseBinding(wsdlComponent, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_SERVICE, wsdlComponent)){
- desc.addServiceElement(parseService(wsdlComponent, desc));
+ parseService(wsdlComponent, desc);
}
else if (QNameUtils.matches(Constants.Q_ELEM_IMPORT, wsdlComponent)){
if(documentBaseURI != null && !wsdlModules.containsKey(documentBaseURI)){
wsdlModules.put(documentBaseURI, desc);
}
- desc.addImportElement(parseImport(wsdlComponent, desc, wsdlModules));
+ parseImport(wsdlComponent, desc, wsdlModules);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INCLUDE, wsdlComponent)){
if(documentBaseURI != null && !wsdlModules.containsKey(documentBaseURI)){
wsdlModules.put(documentBaseURI, desc);
}
- desc.addIncludeElement(parseInclude(wsdlComponent, desc, wsdlModules));
+ parseInclude(wsdlComponent, desc, wsdlModules);
}
else{
desc.addExtensionElement(parseExtensionElement(DescriptionElement.class, desc, wsdlComponent, desc) );
@@ -200,10 +202,11 @@
private DocumentationElement parseDocumentation(OMElement docEl,
- DescriptionElement desc)
+ DescriptionElement desc,
+ DocumentableElement parent)
throws WSDLException {
- DocumentationElement documentation = desc.createDocumentationElement();
+ DocumentationElement documentation = parent.addDocumentationElement();
//Stores the documentation values as a string
documentation.setContent(docEl.getText());
@@ -226,7 +229,7 @@
DescriptionElement desc)
throws WSDLException {
- TypesElement types = desc.createTypesElement();
+ TypesElement types = desc.getTypesElement();
//TODO for now set to W3 XML Schema. Later, add support for non-XML Schema type systems
types.setTypeSystem(Constants.TYPE_XSD_2001);
@@ -241,7 +244,7 @@
QName elementType = QNameUtils.newQName(typesChildElement);
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, typesChildElement)){
- types.addDocumentationElement(parseDocumentation(typesChildElement, desc));
+ parseDocumentation(typesChildElement, desc, types);
}
else if (SchemaConstants.XSD_IMPORT_QNAME_LIST.contains(typesChildElement)){
types.addSchema(parseSchemaImport(typesChildElement, desc));
@@ -262,7 +265,7 @@
DescriptionElement desc)
throws WSDLException{
- ServiceElement service = desc.createServiceElement();
+ ServiceElement service = desc.addServiceElement();
String name = OMUtils.getAttribute(serviceEl, Constants.ATTR_NAME);
if(name != null){
@@ -292,16 +295,16 @@
while (serviceElChildren.hasNext()){
OMElement serviceElChild = (OMElement)serviceElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, serviceElChild)){
- service.addDocumentationElement(parseDocumentation(serviceElChild, desc));
+ parseDocumentation(serviceElChild, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_ENDPOINT, serviceElChild)){
- service.addEndpointElement(parseEndpoint(serviceElChild, desc, service));
+ parseEndpoint(serviceElChild, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, serviceElChild)){
- service.addFeatureElement(parseFeature(serviceElChild, desc, service));
+ parseFeature(serviceElChild, desc, service);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, serviceElChild)){
- service.addPropertyElement(parseProperty(serviceElChild, desc, service));
+ parseProperty(serviceElChild, desc, service);
}
else{
service.addExtensionElement(parseExtensionElement(ServiceElement.class, service, serviceElChild, desc) );
@@ -313,10 +316,10 @@
private EndpointElement parseEndpoint(OMElement endpointEl,
DescriptionElement desc,
- WSDLElement parent)
+ ServiceElement parent)
throws WSDLException{
- EndpointElement endpoint = desc.createEndpointElement();
+ EndpointElement endpoint = parent.addEndpointElement();
endpoint.setParentElement(parent);
String name = OMUtils.getAttribute(endpointEl, Constants.ATTR_NAME);
@@ -353,13 +356,13 @@
while (endpointElChildren.hasNext()){
OMElement endpointElChild = (OMElement)endpointElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, endpointElChild)){
- endpoint.addDocumentationElement(parseDocumentation(endpointElChild, desc));
+ parseDocumentation(endpointElChild, desc, endpoint);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, endpointElChild)){
- endpoint.addFeatureElement(parseFeature(endpointElChild, desc, endpoint));
+ parseFeature(endpointElChild, desc, endpoint);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, endpointElChild)){
- endpoint.addPropertyElement(parseProperty(endpointElChild, desc, endpoint));
+ parseProperty(endpointElChild, desc, endpoint);
}
else{
endpoint.addExtensionElement(
@@ -374,7 +377,7 @@
DescriptionElement desc)
throws WSDLException{
- BindingElement binding = desc.createBindingElement();
+ BindingElement binding = desc.addBindingElement();
String name = OMUtils.getAttribute(bindEl, Constants.ATTR_NAME);
if(name != null){
@@ -409,19 +412,19 @@
while (bindElChildren.hasNext()){
OMElement bindElChild = (OMElement)bindElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, bindElChild)){
- binding.addDocumentationElement(parseDocumentation(bindElChild, desc));
+ parseDocumentation(bindElChild, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, bindElChild)){
- binding.addBindingFaultElement(parseBindingFault(bindElChild, desc, binding));
+ parseBindingFault(bindElChild, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OPERATION, bindElChild)){
- binding.addBindingOperationElement(parseBindingOperation(bindElChild, desc, binding));
+ parseBindingOperation(bindElChild, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, bindElChild)){
- binding.addFeatureElement(parseFeature(bindElChild, desc, binding));
+ parseFeature(bindElChild, desc, binding);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, bindElChild)){
- binding.addPropertyElement(parseProperty(bindElChild, desc, binding));
+ parseProperty(bindElChild, desc, binding);
}
else{
binding.addExtensionElement(parseExtensionElement(BindingElement.class, binding, bindElChild, desc) );
@@ -433,10 +436,10 @@
private BindingOperationElement parseBindingOperation(OMElement bindOpEl,
DescriptionElement desc,
- WSDLElement parent)
+ BindingElement parent)
throws WSDLException{
- BindingOperationElement oper = desc.createBindingOperationElement();
+ BindingOperationElement oper = parent.addBindingOperationElement();
oper.setParentElement(parent);
QName refQN = null;
@@ -462,25 +465,25 @@
while (bindOpElChildren.hasNext()){
OMElement bindOpElChild = (OMElement)bindOpElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, bindOpElChild)){
- oper.addDocumentationElement(parseDocumentation(bindOpElChild, desc));
+ parseDocumentation(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, bindOpElChild)){
- oper.addFeatureElement(parseFeature(bindOpElChild, desc, oper));
+ parseFeature(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, bindOpElChild)){
- oper.addPropertyElement(parseProperty(bindOpElChild, desc, oper));
+ parseProperty(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, bindOpElChild)){
- oper.addBindingMessageReferenceElement(parseBindingMessageReference(bindOpElChild, desc, oper));
+ parseBindingMessageReference(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTPUT, bindOpElChild)){
- oper.addBindingMessageReferenceElement(parseBindingMessageReference(bindOpElChild, desc, oper));
+ parseBindingMessageReference(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INFAULT, bindOpElChild)){
- oper.addBindingFaultReferenceElement(parseBindingFaultReference(bindOpElChild, desc, oper));
+ parseBindingFaultReference(bindOpElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTFAULT, bindOpElChild)){
- oper.addBindingFaultReferenceElement(parseBindingFaultReference(bindOpElChild, desc, oper));
+ parseBindingFaultReference(bindOpElChild, desc, oper);
}
else{
oper.addExtensionElement(
@@ -494,10 +497,10 @@
private BindingFaultReferenceElement parseBindingFaultReference(
OMElement faultRefEl,
DescriptionElement desc,
- WSDLElement parent)
+ BindingOperationElement parent)
throws WSDLException{
- BindingFaultReferenceElement faultRef = desc.createBindingFaultReferenceElement();
+ BindingFaultReferenceElement faultRef = parent.addBindingFaultReferenceElement();
faultRef.setParentElement(parent);
QName refQN = null;
@@ -537,13 +540,13 @@
while (faultRefElChildren.hasNext()){
OMElement faultRefChild = (OMElement)faultRefElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, faultRefChild)){
- faultRef.addDocumentationElement(parseDocumentation(faultRefChild, desc));
+ parseDocumentation(faultRefChild, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, faultRefChild)){
- faultRef.addFeatureElement(parseFeature(faultRefChild, desc, faultRef));
+ parseFeature(faultRefChild, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, faultRefChild)){
- faultRef.addPropertyElement(parseProperty(faultRefChild, desc, faultRef));
+ parseProperty(faultRefChild, desc, faultRef);
}
else{
faultRef.addExtensionElement(parseExtensionElement(BindingFaultReferenceElement.class, faultRef, faultRefChild, desc) );
@@ -556,10 +559,10 @@
private BindingMessageReferenceElement parseBindingMessageReference(
OMElement msgRefEl,
DescriptionElement desc,
- WSDLElement parent)
+ BindingOperationElement parent)
throws WSDLException {
- BindingMessageReferenceElement message = desc.createBindingMessageReferenceElement();
+ BindingMessageReferenceElement message = parent.addBindingMessageReferenceElement();
message.setParentElement(parent);
if(Constants.ELEM_INPUT.equals(msgRefEl.getLocalName())) {
@@ -599,13 +602,13 @@
while (msgRefElChildren.hasNext()){
OMElement msgRefChild = (OMElement)msgRefElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, msgRefChild)){
- message.addDocumentationElement(parseDocumentation(msgRefChild, desc));
+ parseDocumentation(msgRefChild, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, msgRefChild)){
- message.addFeatureElement(parseFeature(msgRefChild, desc, message));
+ parseFeature(msgRefChild, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, msgRefChild)){
- message.addPropertyElement(parseProperty(msgRefChild, desc, message));
+ parseProperty(msgRefChild, desc, message);
}
else{
message.addExtensionElement(parseExtensionElement(BindingMessageReferenceElement.class, message, msgRefChild, desc) );
@@ -617,10 +620,10 @@
private BindingFaultElement parseBindingFault(OMElement bindFaultEl,
DescriptionElement desc,
- WSDLElement parent)
+ BindingElement parent)
throws WSDLException{
- BindingFaultElement fault = desc.createBindingFaultElement();
+ BindingFaultElement fault = parent.addBindingFaultElement();
fault.setParentElement(parent);
QName intFltQN = null;
@@ -646,13 +649,13 @@
while (bindFaultElChildren.hasNext()){
OMElement bindFaultChild = (OMElement)bindFaultElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, bindFaultChild)){
- fault.addDocumentationElement(parseDocumentation(bindFaultChild, desc));
+ parseDocumentation(bindFaultChild, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, bindFaultChild)){
- fault.addFeatureElement(parseFeature(bindFaultChild, desc, fault));
+ parseFeature(bindFaultChild, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, bindFaultChild)){
- fault.addPropertyElement(parseProperty(bindFaultChild, desc, fault));
+ parseProperty(bindFaultChild, desc, fault);
}
else{
fault.addExtensionElement(parseExtensionElement(BindingFaultElement.class, fault, bindFaultChild, desc) );
@@ -665,7 +668,7 @@
DescriptionElement desc)
throws WSDLException {
- InterfaceElement intface = desc.createInterfaceElement();
+ InterfaceElement intface = desc.addInterfaceElement();
String name = OMUtils.getAttribute(interfaceEl, Constants.ATTR_NAME);
if(name != null){
intface.setName(new NCName(name));
@@ -699,19 +702,19 @@
while (interfaceChildren.hasNext()){
OMElement interfaceChild = (OMElement)interfaceChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, interfaceChild)){
- intface.addDocumentationElement(parseDocumentation(interfaceChild, desc));
+ parseDocumentation(interfaceChild, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FAULT, interfaceChild)){
- intface.addInterfaceFaultElement(parseInterfaceFault(interfaceChild, desc, intface));
+ parseInterfaceFault(interfaceChild, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OPERATION, interfaceChild)){
- intface.addInterfaceOperationElement(parseInterfaceOperation(interfaceChild, desc, intface));
+ parseInterfaceOperation(interfaceChild, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, interfaceChild)){
- intface.addFeatureElement(parseFeature(interfaceChild, desc, intface));
+ parseFeature(interfaceChild, desc, intface);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, interfaceChild)){
- intface.addPropertyElement(parseProperty(interfaceChild, desc, intface));
+ parseProperty(interfaceChild, desc, intface);
}
else{
intface.addExtensionElement(
@@ -725,10 +728,10 @@
private InterfaceOperationElement parseInterfaceOperation(
OMElement operEl,
DescriptionElement desc,
- WSDLElement parent)
+ InterfaceElement parent)
throws WSDLException{
- InterfaceOperationElement oper = desc.createInterfaceOperationElement();
+ InterfaceOperationElement oper = parent.addInterfaceOperationElement();
oper.setParentElement(parent);
String name = OMUtils.getAttribute(operEl, Constants.ATTR_NAME);
@@ -759,25 +762,25 @@
while (operElChildren.hasNext()){
OMElement operElChild = (OMElement)operElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, operElChild)){
- oper.addDocumentationElement(parseDocumentation(operElChild, desc));
+ parseDocumentation(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, operElChild)){
- oper.addFeatureElement(parseFeature(operElChild, desc, oper));
+ parseFeature(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, operElChild)){
- oper.addPropertyElement(parseProperty(operElChild, desc, oper));
+ parseProperty(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INPUT, operElChild)){
- oper.addInterfaceMessageReferenceElement(parseInterfaceMessageReference(operElChild, desc, oper));
+ parseInterfaceMessageReference(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTPUT, operElChild)){
- oper.addInterfaceMessageReferenceElement(parseInterfaceMessageReference(operElChild, desc, oper));
+ parseInterfaceMessageReference(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_INFAULT, operElChild)){
- oper.addInterfaceFaultReferenceElement(parseInterfaceFaultReference(operElChild, desc, oper));
+ parseInterfaceFaultReference(operElChild, desc, oper);
}
else if (QNameUtils.matches(Constants.Q_ELEM_OUTFAULT, operElChild)){
- oper.addInterfaceFaultReferenceElement(parseInterfaceFaultReference(operElChild, desc, oper));
+ parseInterfaceFaultReference(operElChild, desc, oper);
}
else{
oper.addExtensionElement(
@@ -791,10 +794,10 @@
private InterfaceFaultReferenceElement parseInterfaceFaultReference(
OMElement faultRefEl,
DescriptionElement desc,
- WSDLElement parent)
+ InterfaceOperationElement parent)
throws WSDLException{
- InterfaceFaultReferenceElement faultRef = desc.createInterfaceFaultReferenceElement();
+ InterfaceFaultReferenceElement faultRef = parent.addInterfaceFaultReferenceElement();
faultRef.setParentElement(parent);
if(Constants.ELEM_INFAULT.equals(faultRefEl.getLocalName())) {
@@ -840,13 +843,13 @@
while (faultRefElChildren.hasNext()){
OMElement faultRefElChild = (OMElement)faultRefElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, faultRefElChild)){
- faultRef.addDocumentationElement(parseDocumentation(faultRefElChild, desc));
+ parseDocumentation(faultRefElChild, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, faultRefElChild)){
- faultRef.addFeatureElement(parseFeature(faultRefElChild, desc, faultRef));
+ parseFeature(faultRefElChild, desc, faultRef);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, faultRefElChild)){
- faultRef.addPropertyElement(parseProperty(faultRefElChild, desc, faultRef));
+ parseProperty(faultRefElChild, desc, faultRef);
}
else{
faultRef.addExtensionElement(
@@ -860,10 +863,10 @@
private InterfaceMessageReferenceElement parseInterfaceMessageReference(
OMElement msgRefEl,
DescriptionElement desc,
- WSDLElement parent)
+ InterfaceOperationElement parent)
throws WSDLException{
- InterfaceMessageReferenceElement message = desc.createInterfaceMessageReferenceElement();
+ InterfaceMessageReferenceElement message = parent.addInterfaceMessageReferenceElement();
message.setParentElement(parent);
if(Constants.ELEM_INPUT.equals(msgRefEl.getLocalName())) {
@@ -923,13 +926,13 @@
while(msgRefElChildren.hasNext()){
OMElement msgRefChild = (OMElement)msgRefElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, msgRefChild)){
- message.addDocumentationElement(parseDocumentation(msgRefChild, desc));
+ parseDocumentation(msgRefChild, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, msgRefChild)){
- message.addFeatureElement(parseFeature(msgRefChild, desc, message));
+ parseFeature(msgRefChild, desc, message);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, msgRefChild)){
- message.addPropertyElement(parseProperty(msgRefChild, desc, message));
+ parseProperty(msgRefChild, desc, message);
}
else{
message.addExtensionElement(
@@ -943,10 +946,10 @@
private InterfaceFaultElement parseInterfaceFault(
OMElement faultEl,
DescriptionElement desc,
- WSDLElement parent)
+ InterfaceElement parent)
throws WSDLException{
- InterfaceFaultElement fault = desc.createInterfaceFaultElement();
+ InterfaceFaultElement fault = parent.addInterfaceFaultElement();
fault.setParentElement(parent);
String name = OMUtils.getAttribute(faultEl, Constants.ATTR_NAME);
@@ -977,13 +980,13 @@
while(faultElChildren.hasNext()){
OMElement faultElChild = (OMElement)faultElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, faultElChild)){
- fault.addDocumentationElement(parseDocumentation(faultElChild, desc));
+ parseDocumentation(faultElChild, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_FEATURE, faultElChild)){
- fault.addFeatureElement(parseFeature(faultElChild, desc, fault));
+ parseFeature(faultElChild, desc, fault);
}
else if (QNameUtils.matches(Constants.Q_ELEM_PROPERTY, faultElChild)){
- fault.addPropertyElement(parseProperty(faultElChild, desc, fault));
+ parseProperty(faultElChild, desc, fault);
}
else{
fault.addExtensionElement(
@@ -996,10 +999,10 @@
private PropertyElement parseProperty(OMElement propEl,
DescriptionElement desc,
- WSDLElement parent)
+ ConfigurableElement parent)
throws WSDLException{
- PropertyElement property = desc.createPropertyElement();
+ PropertyElement property = parent.addPropertyElement();
property.setParentElement(parent);
String ref = OMUtils.getAttribute(propEl, Constants.ATTR_REF);
@@ -1015,7 +1018,7 @@
OMElement propElChild = (OMElement)propElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, propElChild)){
- property.addDocumentationElement(parseDocumentation(propElChild, desc));
+ parseDocumentation(propElChild, desc, property);
}
else if(QNameUtils.matches(Constants.Q_ELEM_VALUE, propElChild)){
//the property value consists of the child info items of <value>
@@ -1214,10 +1217,10 @@
private FeatureElement parseFeature(OMElement featEl,
DescriptionElement desc,
- WSDLElement parent)
+ ConfigurableElement parent)
throws WSDLException {
- FeatureElement feature = desc.createFeatureElement();
+ FeatureElement feature = parent.addFeatureElement();
feature.setParentElement(parent);
String ref = OMUtils.getAttribute(featEl, Constants.ATTR_REF);
@@ -1237,7 +1240,7 @@
// Check if this step is necessary
while (featEl != null) {
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, featEl)){
- feature.addDocumentationElement(parseDocumentation(featEl, desc));
+ parseDocumentation(featEl, desc, feature);
}
else{
feature.addExtensionElement(parseExtensionElement(FeatureElement.class, feature, featEl, desc) );
@@ -1247,7 +1250,7 @@
while (featElChildren.hasNext()){
OMElement featElChild = (OMElement)featElChildren.next();
if (QNameUtils.matches(Constants.Q_ELEM_DOCUMENTATION, featElChild)){
- feature.addDocumentationElement(parseDocumentation(featElChild, desc));
+ parseDocumentation(featElChild, desc, feature);
}
else{
feature.addExtensionElement(parseExtensionElement(
@@ -1262,7 +1265,7 @@
DescriptionElement desc,
Map wsdlModules)
throws WSDLException{
- ImportElement imp = desc.createImportElement();
+ ImportElement imp = desc.addImportElement();
String namespaceURI = OMUtils.getAttribute(importEl, Constants.ATTR_NAMESPACE);
String locationURI = OMUtils.getAttribute(importEl, Constants.ATTR_LOCATION);
@@ -1289,7 +1292,7 @@
DescriptionElement desc,
Map wsdlModules)
throws WSDLException{
- IncludeElement include = desc.createIncludeElement();
+ IncludeElement include = desc.addIncludeElement();
String locationURI = OMUtils.getAttribute(includeEl, Constants.ATTR_LOCATION);
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingImpl.java Mon Sep 18 05:21:19 2006
@@ -169,14 +169,14 @@
}
/*
- * @see org.apache.woden.wsdl20.xml.BindingElement#addBindingFaultElement(org.apache.woden.wsdl20.xml.BindingFaultElement)
+ * @see org.apache.woden.wsdl20.xml.BindingElement#addBindingFaultElement()
*/
- public void addBindingFaultElement(BindingFaultElement fault)
+ public BindingFaultElement addBindingFaultElement()
{
- if(fault != null) {
- fFaults.add(fault);
- fault.setParentElement(this);
- }
+ BindingFaultElement fault = new BindingFaultImpl();
+ fFaults.add(fault);
+ fault.setParentElement(this);
+ return fault;
}
/*
@@ -190,14 +190,14 @@
}
/* (non-Javadoc)
- * @see org.apache.woden.wsdl20.xml.BindingElement#addBindingOperationElement(org.apache.woden.wsdl20.xml.BindingOperationElement)
+ * @see org.apache.woden.wsdl20.xml.BindingElement#addBindingOperationElement()
*/
- public void addBindingOperationElement(BindingOperationElement operation)
+ public BindingOperationElement addBindingOperationElement()
{
- if(operation != null) {
- fOperations.add(operation);
- operation.setParentElement(this);
- }
+ BindingOperationElement operation = new BindingOperationImpl();
+ fOperations.add(operation);
+ operation.setParentElement(this);
+ return operation;
}
/* (non-Javadoc)
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/BindingOperationImpl.java Mon Sep 18 05:21:19 2006
@@ -123,14 +123,14 @@
}
/* (non-Javadoc)
- * @see org.apache.woden.wsdl20.xml.BindingOperationElement#addBindingMessageReferenceElement(org.apache.woden.wsdl20.xml.BindingMessageReferenceElement)
+ * @see org.apache.woden.wsdl20.xml.BindingOperationElement#addBindingMessageReferenceElement()
*/
- public void addBindingMessageReferenceElement(BindingMessageReferenceElement msgRef)
+ public BindingMessageReferenceElement addBindingMessageReferenceElement()
{
- if(msgRef != null) {
- fMessageRefs.add(msgRef);
- msgRef.setParentElement(this);
- }
+ BindingMessageReferenceElement msgRef = new BindingMessageReferenceImpl();
+ fMessageRefs.add(msgRef);
+ msgRef.setParentElement(this);
+ return msgRef;
}
/* (non-Javadoc)
@@ -150,14 +150,14 @@
}
/* (non-Javadoc)
- * @see org.apache.woden.wsdl20.xml.BindingOperationElement#addBindingFaultReferenceElement(org.apache.woden.wsdl20.xml.BindingFaultReferenceElement)
+ * @see org.apache.woden.wsdl20.xml.BindingOperationElement#addBindingFaultReferenceElement()
*/
- public void addBindingFaultReferenceElement(BindingFaultReferenceElement faultRef)
+ public BindingFaultReferenceElement addBindingFaultReferenceElement()
{
- if(faultRef != null) {
- fFaultRefs.add(faultRef);
- faultRef.setParentElement(this);
- }
+ BindingFaultReferenceElement faultRef = new BindingFaultReferenceImpl();
+ fFaultRefs.add(faultRef);
+ faultRef.setParentElement(this);
+ return faultRef;
}
/* (non-Javadoc)
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ConfigurableImpl.java Mon Sep 18 05:21:19 2006
@@ -69,14 +69,14 @@
* ************************************************************/
/* (non-Javadoc)
- * @see org.apache.woden.wsdl20.xml.ConfigurableElement#addFeatureElement(org.apache.woden.wsdl20.xml.FeatureElement)
+ * @see org.apache.woden.wsdl20.xml.ConfigurableElement#addFeatureElement()
*/
- public void addFeatureElement(FeatureElement feature)
+ public FeatureElement addFeatureElement()
{
- if(feature != null) {
- fFeatures.add(feature);
- feature.setParentElement(this);
- }
+ FeatureElement feature = new FeatureImpl();
+ fFeatures.add(feature);
+ feature.setParentElement(this);
+ return feature;
}
/* (non-Javadoc)
@@ -92,12 +92,12 @@
/* (non-Javadoc)
* @see org.apache.woden.wsdl20.xml.ConfigurableElement#addPropertyElement(org.apache.woden.wsdl20.xml.PropertyElement)
*/
- public void addPropertyElement(PropertyElement property)
+ public PropertyElement addPropertyElement()
{
- if(property != null) {
- fProperties.add(property);
- property.setParentElement(this);
- }
+ PropertyElement property = new PropertyImpl();
+ fProperties.add(property);
+ property.setParentElement(this);
+ return property;
}
/* (non-Javadoc)
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DescriptionImpl.java Mon Sep 18 05:21:19 2006
@@ -33,21 +33,12 @@
import org.apache.woden.wsdl20.TypeDefinition;
import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
import org.apache.woden.wsdl20.xml.BindingElement;
-import org.apache.woden.wsdl20.xml.BindingFaultElement;
-import org.apache.woden.wsdl20.xml.BindingFaultReferenceElement;
-import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
-import org.apache.woden.wsdl20.xml.BindingOperationElement;
import org.apache.woden.wsdl20.xml.DescriptionElement;
import org.apache.woden.wsdl20.xml.DocumentationElement;
-import org.apache.woden.wsdl20.xml.EndpointElement;
import org.apache.woden.wsdl20.xml.FeatureElement;
import org.apache.woden.wsdl20.xml.ImportElement;
import org.apache.woden.wsdl20.xml.IncludeElement;
import org.apache.woden.wsdl20.xml.InterfaceElement;
-import org.apache.woden.wsdl20.xml.InterfaceFaultElement;
-import org.apache.woden.wsdl20.xml.InterfaceFaultReferenceElement;
-import org.apache.woden.wsdl20.xml.InterfaceMessageReferenceElement;
-import org.apache.woden.wsdl20.xml.InterfaceOperationElement;
import org.apache.woden.wsdl20.xml.NestedElement;
import org.apache.woden.wsdl20.xml.PropertyElement;
import org.apache.woden.wsdl20.xml.ServiceElement;
@@ -432,13 +423,6 @@
{
return fNamespaces;
}
-
- public void addImportElement(ImportElement importEl)
- {
- if(importEl != null) {
- fImportElements.add(importEl);
- }
- }
public ImportElement[] getImportElements()
{
@@ -447,13 +431,6 @@
return array;
}
- public void addIncludeElement(IncludeElement include)
- {
- if(include != null) {
- fIncludeElements.add(include);
- }
- }
-
public IncludeElement[] getIncludeElements()
{
IncludeElement[] array = new IncludeElement[fIncludeElements.size()];
@@ -461,23 +438,13 @@
return array;
}
- public void setTypesElement(TypesElement typesEl)
- {
- fTypesElement = typesEl;
- typesEl.setParentElement(this);
- }
-
public TypesElement getTypesElement()
{
- return fTypesElement;
- }
-
- public void addInterfaceElement(InterfaceElement intface)
- {
- if(intface != null) {
- fInterfaceElements.add(intface);
- intface.setParentElement(this);
+ if (fTypesElement == null) {
+ fTypesElement = new TypesImpl();
+ fTypesElement.setParentElement(this);
}
+ return fTypesElement;
}
public InterfaceElement[] getInterfaceElements()
@@ -487,14 +454,6 @@
return array;
}
- public void addBindingElement(BindingElement binding)
- {
- if(binding != null) {
- fBindingElements.add(binding);
- binding.setParentElement(this);
- }
- }
-
public BindingElement[] getBindingElements()
{
BindingElement[] array = new BindingElement[fBindingElements.size()];
@@ -502,14 +461,6 @@
return array;
}
- public void addServiceElement(ServiceElement service)
- {
- if(service != null) {
- fServiceElements.add(service);
- service.setParentElement(this);
- }
- }
-
public ServiceElement[] getServiceElements()
{
ServiceElement[] array = new ServiceElement[fServiceElements.size()];
@@ -519,76 +470,38 @@
//creator methods
- public DocumentationElement createDocumentationElement() {
- return new DocumentationImpl();
+ public ImportElement addImportElement() {
+ ImportElement importEl = new ImportImpl();
+ fImportElements.add(importEl);
+ return importEl;
}
- public ImportElement createImportElement() {
- return new ImportImpl();
+ public IncludeElement addIncludeElement() {
+ IncludeElement include = new IncludeImpl();
+ fIncludeElements.add(include);
+ return include;
}
- public IncludeElement createIncludeElement() {
- return new IncludeImpl();
- }
-
- public TypesElement createTypesElement() {
- return new TypesImpl();
- }
-
- public InterfaceElement createInterfaceElement() {
- return new InterfaceImpl();
- }
-
- public InterfaceFaultElement createInterfaceFaultElement() {
- return new InterfaceFaultImpl();
- }
-
- public InterfaceOperationElement createInterfaceOperationElement() {
- return new InterfaceOperationImpl();
- }
-
- public InterfaceFaultReferenceElement createInterfaceFaultReferenceElement() {
- return new InterfaceFaultReferenceImpl();
- }
-
- public InterfaceMessageReferenceElement createInterfaceMessageReferenceElement() {
- return new InterfaceMessageReferenceImpl();
- }
-
- public BindingElement createBindingElement() {
- return new BindingImpl();
- }
-
- public BindingFaultElement createBindingFaultElement() {
- return new BindingFaultImpl();
- }
-
- public BindingOperationElement createBindingOperationElement() {
- return new BindingOperationImpl();
- }
-
- public BindingFaultReferenceElement createBindingFaultReferenceElement() {
- return new BindingFaultReferenceImpl();
- }
-
- public BindingMessageReferenceElement createBindingMessageReferenceElement() {
- return new BindingMessageReferenceImpl();
- }
-
- public ServiceElement createServiceElement() {
- return new ServiceImpl();
- }
-
- public EndpointElement createEndpointElement() {
- return new EndpointImpl();
+ public InterfaceElement addInterfaceElement() {
+ InterfaceElement intface = new InterfaceImpl();
+ fInterfaceElements.add(intface);
+ intface.setParentElement(this);
+
+ return intface;
}
- public FeatureElement createFeatureElement() {
- return new FeatureImpl();
+ public BindingElement addBindingElement() {
+ BindingElement binding = new BindingImpl();
+ fBindingElements.add(binding);
+ binding.setParentElement(this);
+ return binding;
}
- public PropertyElement createPropertyElement() {
- return new PropertyImpl();
+ public ServiceElement addServiceElement() {
+ ServiceElement service = new ServiceImpl();
+ fServiceElements.add(service);
+ service.setParentElement(this);
+ return service;
}
public void setExtensionRegistry(ExtensionRegistry extReg)
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/DocumentableImpl.java Mon Sep 18 05:21:19 2006
@@ -28,19 +28,19 @@
*
* @author jkaputin@apache.org
*/
-public abstract class DocumentableImpl extends WSDLObjectImpl
+public abstract class DocumentableImpl extends WSDLObjectImpl
implements DocumentableElement
{
private List fDocumentationElements = new Vector();
/* (non-Javadoc)
- * @see org.apache.woden.wsdl20.xml.DocumentableElement#addDocumentationElement(org.apache.woden.wsdl20.xml.DocumentationElement)
+ * @see org.apache.woden.wsdl20.xml.DocumentationElement org.apache.woden.wsdl20.xml.DocumentableElement#addDocumentationElement()
*/
- public void addDocumentationElement(DocumentationElement docEl)
+ public DocumentationElement addDocumentationElement()
{
- if(docEl != null) {
- fDocumentationElements.add(docEl);
- }
+ DocumentationElement docEl = new DocumentationImpl();
+ fDocumentationElements.add(docEl);
+ return docEl;
}
/* (non-Javadoc)
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java Mon Sep 18 05:21:19 2006
@@ -297,14 +297,14 @@
}
/*
- * @see org.apache.woden.wsdl20.xml.InterfaceElement#addInterfaceFaultElement(org.apache.woden.wsdl20.xml.InterfaceFaultElement)
+ * @see org.apache.woden.wsdl20.xml.InterfaceElement#addInterfaceFaultElement()
*/
- public void addInterfaceFaultElement(InterfaceFaultElement fault)
+ public InterfaceFaultElement addInterfaceFaultElement()
{
- if(fault != null) {
- fInterfaceFaultElements.add(fault);
- fault.setParentElement(this);
- }
+ InterfaceFaultElement fault = new InterfaceFaultImpl();
+ fInterfaceFaultElements.add(fault);
+ fault.setParentElement(this);
+ return fault;
}
/*
@@ -342,14 +342,14 @@
}
/*
- * @see org.apache.woden.wsdl20.xml.InterfaceElement#addInterfaceOperationElement(OperationElement)
+ * @see org.apache.woden.wsdl20.xml.InterfaceElement#addInterfaceOperationElement()
*/
- public void addInterfaceOperationElement(InterfaceOperationElement operation)
+ public InterfaceOperationElement addInterfaceOperationElement()
{
- if(operation != null) {
- fInterfaceOperationElements.add(operation);
- operation.setParentElement(this);
- }
+ InterfaceOperationElement operation = new InterfaceOperationImpl();
+ fInterfaceOperationElements.add(operation);
+ operation.setParentElement(this);
+ return operation;
}
/*
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/InterfaceOperationImpl.java Mon Sep 18 05:21:19 2006
@@ -159,14 +159,14 @@
}
/*
- * @see org.apache.woden.wsdl20.xml.InterfaceOperationElement#addInterfaceMessageReferenceElement(InterfaceMessageReferenceElement)
+ * @see org.apache.woden.wsdl20.xml.InterfaceOperationElement#addInterfaceMessageReferenceElement()
*/
- public void addInterfaceMessageReferenceElement(InterfaceMessageReferenceElement msgRef)
+ public InterfaceMessageReferenceElement addInterfaceMessageReferenceElement()
{
- if(msgRef != null) {
- fMessageRefs.add(msgRef);
- msgRef.setParentElement(this);
- }
+ InterfaceMessageReferenceElement msgRef = new InterfaceMessageReferenceImpl();
+ fMessageRefs.add(msgRef);
+ msgRef.setParentElement(this);
+ return msgRef;
}
/*
@@ -188,14 +188,14 @@
}
/*
- * @see org.apache.woden.wsdl20.xml.InterfaceOperationElement#addInterfaceFaultReferenceElement(InterfaceFaultReferenceElement)
+ * @see org.apache.woden.wsdl20.xml.InterfaceOperationElement#addInterfaceFaultReferenceElement()
*/
- public void addInterfaceFaultReferenceElement(InterfaceFaultReferenceElement faultRef)
+ public InterfaceFaultReferenceElement addInterfaceFaultReferenceElement()
{
- if(faultRef != null) {
- fFaultRefs.add(faultRef);
- faultRef.setParentElement(this);
- }
+ InterfaceFaultReferenceElement faultRef = new InterfaceFaultReferenceImpl();
+ fFaultRefs.add(faultRef);
+ faultRef.setParentElement(this);
+ return faultRef;
}
/*
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ServiceImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ServiceImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/ServiceImpl.java Mon Sep 18 05:21:19 2006
@@ -166,14 +166,14 @@
}
/* (non-Javadoc)
- * @see org.apache.woden.wsdl20.xml.ServiceElement#addEndpointElement(org.apache.woden.wsdl20.xml.EndpointElement)
+ * @see org.apache.woden.wsdl20.xml.ServiceElement#addEndpointElement()
*/
- public void addEndpointElement(EndpointElement endpoint)
+ public EndpointElement addEndpointElement()
{
- if(endpoint != null) {
- fEndpoints.add(endpoint);
- endpoint.setParentElement(this);
- }
+ EndpointElement endpoint = new EndpointImpl();
+ fEndpoints.add(endpoint);
+ endpoint.setParentElement(this);
+ return endpoint;
}
/* (non-Javadoc)
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/WSDLReferenceImpl.java Mon Sep 18 05:21:19 2006
@@ -32,7 +32,7 @@
*
* @author jkaputin@apache.org
*/
-public abstract class WSDLReferenceImpl extends WSDLElementImpl
+public abstract class WSDLReferenceImpl extends DocumentableImpl
{
private List fDocumentationElements = new Vector();
private URI fLocation = null;
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/http/HTTPHeaderDeserializer.java Mon Sep 18 05:21:19 2006
@@ -27,6 +27,7 @@
import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
import org.apache.woden.wsdl20.extensions.http.HTTPHeaderElement;
import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
import org.apache.woden.wsdl20.xml.DocumentationElement;
import org.apache.woden.wsdl20.xml.WSDLElement;
import org.w3c.dom.Element;
@@ -82,10 +83,10 @@
}
private DocumentationElement parseDocumentation(Element docEl,
- DescriptionElement desc)
+ DocumentableElement parent)
throws WSDLException
{
- DocumentationElement documentation = desc.createDocumentationElement();
+ DocumentationElement documentation = parent.addDocumentationElement();
documentation.setContent(docEl);
//TODO parseExtensionAttributes(docEl, DocumentationElement.class, documentation, desc);
Modified: incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java?view=diff&rev=447385&r1=447384&r2=447385
==============================================================================
--- incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java (original)
+++ incubator/woden/trunk/java/src/org/apache/woden/internal/wsdl20/extensions/soap/SOAPHeaderBlockDeserializer.java Mon Sep 18 05:21:19 2006
@@ -28,6 +28,7 @@
import org.apache.woden.wsdl20.extensions.ExtensionRegistry;
import org.apache.woden.wsdl20.extensions.soap.SOAPHeaderBlockElement;
import org.apache.woden.wsdl20.xml.DescriptionElement;
+import org.apache.woden.wsdl20.xml.DocumentableElement;
import org.apache.woden.wsdl20.xml.DocumentationElement;
import org.apache.woden.wsdl20.xml.WSDLElement;
import org.w3c.dom.Element;
@@ -104,10 +105,10 @@
}
private DocumentationElement parseDocumentation(Element docEl,
- DescriptionElement desc)
+ DocumentableElement parent)
throws WSDLException
{
- DocumentationElement documentation = desc.createDocumentationElement();
+ DocumentationElement documentation = parent.addDocumentationElement();
documentation.setContent(docEl);
//TODO parseExtensionAttributes(docEl, DocumentationElement.class, documentation, desc);
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org