to.setVariable(WORKFLOW_OUTPUT_NAME);
to.setPart(WorkflowWSDL.OUTPUT_PART_NAME);
to.setQuery("/" + this.typesNamespace.getPrefix() + ":"
+ this.workflowWSDL.getWorkflowOutputMessageElementName() + "/" + toNode.getID());
} else {
WSComponentPort toComponentPort = (WSComponentPort) toPort.getComponentPort();
String toID = toNode.getID();
WSComponent toWSComponent = (WSComponent) toNode.getComponent();
to.setVariable(toID + INPUT_SUFFIX);
to.setPart(toWSComponent.getInputPartName());
if (toComponentPort.isSchemaUsed()) {
// Normal case.
// e.g. <part name="name" type="typens:fooType">
String typesTargetNamespace = toComponentPort.getTargetNamespace();
XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(toID.toLowerCase() + TYPENS_SUFFIX,
typesTargetNamespace, false, this.process.xml());
String typeName = input ? toWSComponent.getInputTypeName() : toWSComponent.getOutputTypeName();
to.setQuery("/" + namespace.getPrefix() + ":" + typeName + "/" + toComponentPort.getName());
} else {
// e.g. <part name="name" type="xsd:string">
// No query is needed?
}
}