return wsdlInterface;
}
public WSDLInterfaceContract read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
// Read an <interface.wsdl>
WSDLInterfaceContract wsdlInterfaceContract = wsdlFactory.createWSDLInterfaceContract();
// Read wsdlLocation
String location = reader.getAttributeValue(WSDLI_NS, WSDL_LOCATION);
wsdlInterfaceContract.setLocation(location);
String uri = reader.getAttributeValue(null, INTERFACE);
if (uri != null) {
WSDLInterface wsdlInterface = createWSDLInterface(uri);
if (wsdlInterface != null)
wsdlInterfaceContract.setInterface(wsdlInterface);
}
uri = reader.getAttributeValue(null, CALLBACK_INTERFACE);
if (uri != null) {
WSDLInterface wsdlCallbackInterface = createWSDLInterface(uri);
if (wsdlCallbackInterface != null)
wsdlInterfaceContract.setCallbackInterface(wsdlCallbackInterface);
}
// Handle extended attributes
for (int a = 0; a < reader.getAttributeCount(); a++) {
QName attributeName = reader.getAttributeName(a);
if( attributeName.getNamespaceURI() != null && attributeName.getNamespaceURI().length() > 0) {
if( (! Constants.SCA10_NS.equals(attributeName.getNamespaceURI()) &&
(! Constants.SCA10_TUSCANY_NS.equals(attributeName.getNamespaceURI()) ))) {
Object attributeValue = extensionAttributeProcessor.read(attributeName, reader);
Extension attributeExtension;
if (attributeValue instanceof Extension) {
attributeExtension = (Extension) attributeValue;
} else {
attributeExtension = extensionFactory.createExtension(attributeName, attributeValue, true);
}
wsdlInterfaceContract.getAttributeExtensions().add(attributeExtension);
}
}
}
// Skip to end element