|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2001, 2007 IBM Corporation and others. |
2 |
* Copyright (c) 2001, 2008 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 44-49
Link Here
|
| 44 |
import javax.wsdl.extensions.ExtensionDeserializer; |
44 |
import javax.wsdl.extensions.ExtensionDeserializer; |
| 45 |
import javax.wsdl.extensions.ExtensionRegistry; |
45 |
import javax.wsdl.extensions.ExtensionRegistry; |
| 46 |
import javax.wsdl.extensions.UnknownExtensibilityElement; |
46 |
import javax.wsdl.extensions.UnknownExtensibilityElement; |
|
|
47 |
import javax.wsdl.extensions.schema.Schema; |
| 47 |
import javax.wsdl.factory.WSDLFactory; |
48 |
import javax.wsdl.factory.WSDLFactory; |
| 48 |
import javax.xml.namespace.QName; |
49 |
import javax.xml.namespace.QName; |
| 49 |
|
50 |
|
|
Lines 513-519
Link Here
|
| 513 |
QName portTypeName; |
514 |
QName portTypeName; |
| 514 |
try |
515 |
try |
| 515 |
{ |
516 |
{ |
| 516 |
portTypeName = DOMUtils.getQualifiedAttributeValue(bindingEl, Constants.ATTR_TYPE, Constants.ELEM_BINDING, false); |
517 |
portTypeName = DOMUtils.getQualifiedAttributeValue(bindingEl, Constants.ATTR_TYPE, Constants.ELEM_BINDING, false, def); |
| 517 |
} |
518 |
} |
| 518 |
catch (Exception e) |
519 |
catch (Exception e) |
| 519 |
{ |
520 |
{ |
|
Lines 962-969
Link Here
|
| 962 |
} |
963 |
} |
| 963 |
else |
964 |
else |
| 964 |
{ |
965 |
{ |
| 965 |
// XML Validation will catch this |
966 |
// message allows extensibility elements |
| 966 |
DOMUtils.throwWSDLException(tempEl); |
967 |
msg.addExtensibilityElement(parseExtensibilityElement(Message.class, tempEl, def)); |
| 967 |
} |
968 |
} |
| 968 |
|
969 |
|
| 969 |
tempEl = DOMUtils.getNextSiblingElement(tempEl); |
970 |
tempEl = DOMUtils.getNextSiblingElement(tempEl); |
|
Lines 991-997
Link Here
|
| 991 |
QName elementName; |
992 |
QName elementName; |
| 992 |
try |
993 |
try |
| 993 |
{ |
994 |
{ |
| 994 |
elementName = DOMUtils.getQualifiedAttributeValue(partEl, Constants.ATTR_ELEMENT, Constants.ELEM_MESSAGE, false); |
995 |
elementName = DOMUtils.getQualifiedAttributeValue(partEl, Constants.ATTR_ELEMENT, Constants.ELEM_MESSAGE, false, def); |
| 995 |
} |
996 |
} |
| 996 |
catch (Exception e) |
997 |
catch (Exception e) |
| 997 |
{ |
998 |
{ |
|
Lines 1004-1010
Link Here
|
| 1004 |
{ |
1005 |
{ |
| 1005 |
typeName = DOMUtils.getQualifiedAttributeValue(partEl, Constants.ATTR_TYPE, |
1006 |
typeName = DOMUtils.getQualifiedAttributeValue(partEl, Constants.ATTR_TYPE, |
| 1006 |
// Corrected - was ATTR_ELEMENT |
1007 |
// Corrected - was ATTR_ELEMENT |
| 1007 |
Constants.ELEM_MESSAGE, false); |
1008 |
Constants.ELEM_MESSAGE, false, def); |
| 1008 |
} |
1009 |
} |
| 1009 |
catch (Exception e) |
1010 |
catch (Exception e) |
| 1010 |
{ |
1011 |
{ |
|
Lines 1087-1093
Link Here
|
| 1087 |
|
1088 |
|
| 1088 |
try |
1089 |
try |
| 1089 |
{ |
1090 |
{ |
| 1090 |
qValue = DOMUtils.getQName(strValue, el); |
1091 |
qValue = DOMUtils.getQName(strValue, el, def); |
| 1091 |
} |
1092 |
} |
| 1092 |
catch (WSDLException e) |
1093 |
catch (WSDLException e) |
| 1093 |
{ |
1094 |
{ |
|
Lines 1232-1237
Link Here
|
| 1232 |
Input input = null; |
1233 |
Input input = null; |
| 1233 |
Output output = null; |
1234 |
Output output = null; |
| 1234 |
List faults = new Vector(); |
1235 |
List faults = new Vector(); |
|
|
1236 |
List extElements = new ArrayList(); |
| 1235 |
|
1237 |
|
| 1236 |
while (tempEl != null) |
1238 |
while (tempEl != null) |
| 1237 |
{ |
1239 |
{ |
|
Lines 1255-1263
Link Here
|
| 1255 |
} |
1257 |
} |
| 1256 |
else |
1258 |
else |
| 1257 |
{ |
1259 |
{ |
| 1258 |
// invalid element in the operation |
1260 |
// operation allows extensibility elements |
| 1259 |
// XML check will catch this |
1261 |
extElements.add(parseExtensibilityElement(Operation.class, tempEl, def)); |
| 1260 |
DOMUtils.throwWSDLException(tempEl); |
|
|
| 1261 |
} |
1262 |
} |
| 1262 |
|
1263 |
|
| 1263 |
tempEl = DOMUtils.getNextSiblingElement(tempEl); |
1264 |
tempEl = DOMUtils.getNextSiblingElement(tempEl); |
|
Lines 1450-1455
Link Here
|
| 1450 |
} |
1451 |
} |
| 1451 |
} |
1452 |
} |
| 1452 |
} |
1453 |
} |
|
|
1454 |
|
| 1455 |
if (extElements.size() > 0) |
| 1456 |
{ |
| 1457 |
Iterator extElementsIterator = extElements.iterator(); |
| 1458 |
while (extElementsIterator.hasNext()) |
| 1459 |
{ |
| 1460 |
op.addExtensibilityElement((ExtensibilityElement)extElementsIterator.next()); |
| 1461 |
} |
| 1462 |
} |
| 1453 |
|
1463 |
|
| 1454 |
OperationType style = null; |
1464 |
OperationType style = null; |
| 1455 |
|
1465 |
|
|
Lines 1555-1561
Link Here
|
| 1555 |
QName bindingStr; |
1565 |
QName bindingStr; |
| 1556 |
try |
1566 |
try |
| 1557 |
{ |
1567 |
{ |
| 1558 |
bindingStr = DOMUtils.getQualifiedAttributeValue(portEl, Constants.ATTR_BINDING, Constants.ELEM_PORT, false); |
1568 |
bindingStr = DOMUtils.getQualifiedAttributeValue(portEl, Constants.ATTR_BINDING, Constants.ELEM_PORT, false, def); |
| 1559 |
} |
1569 |
} |
| 1560 |
catch (Exception e) |
1570 |
catch (Exception e) |
| 1561 |
{ |
1571 |
{ |
|
Lines 1676-1682
Link Here
|
| 1676 |
QName messageName = null; |
1686 |
QName messageName = null; |
| 1677 |
try |
1687 |
try |
| 1678 |
{ |
1688 |
{ |
| 1679 |
messageName = DOMUtils.getQualifiedAttributeValue(inputEl, Constants.ATTR_MESSAGE, Constants.ELEM_INPUT, false); |
1689 |
messageName = DOMUtils.getQualifiedAttributeValue(inputEl, Constants.ATTR_MESSAGE, Constants.ELEM_INPUT, false, def); |
| 1680 |
} |
1690 |
} |
| 1681 |
catch (Exception e) |
1691 |
catch (Exception e) |
| 1682 |
{ |
1692 |
{ |
|
Lines 1741-1747
Link Here
|
| 1741 |
QName messageName = null; |
1751 |
QName messageName = null; |
| 1742 |
try |
1752 |
try |
| 1743 |
{ |
1753 |
{ |
| 1744 |
messageName = DOMUtils.getQualifiedAttributeValue(outputEl, Constants.ATTR_MESSAGE, Constants.ELEM_OUTPUT, false); |
1754 |
messageName = DOMUtils.getQualifiedAttributeValue(outputEl, Constants.ATTR_MESSAGE, Constants.ELEM_OUTPUT, false, def); |
| 1745 |
} |
1755 |
} |
| 1746 |
catch (Exception e) |
1756 |
catch (Exception e) |
| 1747 |
{ |
1757 |
{ |
|
Lines 1806-1812
Link Here
|
| 1806 |
QName messageName = null; |
1816 |
QName messageName = null; |
| 1807 |
try |
1817 |
try |
| 1808 |
{ |
1818 |
{ |
| 1809 |
messageName = DOMUtils.getQualifiedAttributeValue(faultEl, Constants.ATTR_MESSAGE, Constants.ELEM_INPUT, false); |
1819 |
messageName = DOMUtils.getQualifiedAttributeValue(faultEl, Constants.ATTR_MESSAGE, Constants.ELEM_INPUT, false, def); |
| 1810 |
} |
1820 |
} |
| 1811 |
catch (Exception e) |
1821 |
catch (Exception e) |
| 1812 |
{ |
1822 |
{ |
|
Lines 1929-1934
Link Here
|
| 1929 |
{ |
1939 |
{ |
| 1930 |
Element elem = ((UnknownExtensibilityElement)extElem).getElement(); |
1940 |
Element elem = ((UnknownExtensibilityElement)extElem).getElement(); |
| 1931 |
registerChildElementsRecursively(elem); |
1941 |
registerChildElementsRecursively(elem); |
|
|
1942 |
} else if (extElem instanceof Schema) |
| 1943 |
{ |
| 1944 |
Element elem = ((Schema)extElem).getElement(); |
| 1945 |
registerChildElementsRecursively(elem); |
| 1932 |
} |
1946 |
} |
| 1933 |
} |
1947 |
} |
| 1934 |
|
1948 |
|