//
// type
//
QName type = port.getType();
WSComponentPort componentPort = port.getWSComponentPort();
WsdlDefinitions wsdl = null;
if (componentPort != null) {
wsdl = componentPort.getComponent().getWSDL();
type = declareTypeIfNecessary(wsdl, type);
}
int arrayDimension = port.getArrayDimension();
if (arrayDimension == 1) {
String typeName = declareArrayType(schema, type, wsdl);
type = new QName(this.typesNamespace.getName(), typeName);
} else if (arrayDimension > 1) {
// TODO
throw new WorkflowRuntimeException("multi-dimentional arrays are not supported yet.");
}
if (WSConstants.XSD_ANY_TYPE.equals(type) && componentPort != null) {
XmlElement elementElement = componentPort.getElement();
if (elementElement == null) {
// Types are not defined anywhare. Leave it as xsd:any.
setTypeAttribute(element, type);
} else {
// Copy the embedded type defition.