WSComponent wsdlComponent = node.getComponent();
String operation = wsdlComponent.getOperationName();
QName portTypeQName = wsdlComponent.getPortTypeQName();
XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(id
.toLowerCase(), portTypeQName.getNamespaceURI(), false,
this.process.xml());
// Variable
String inputVariableName = id + INPUT_SUFFIX;
this.process.addMessageVariable(inputVariableName, namespace,
portTypeQName.getLocalPart());
String outputVariableName = id + OUTPUT_SUFFIX;
this.process.addMessageVariable(outputVariableName, namespace,
portTypeQName.getLocalPart());
// Assign
List<GpelAssignCopy> copies = new ArrayList<GpelAssignCopy>();
for (Port port : node.getInputPorts()) {
Port fromPort = port.getFromPort();
if (fromPort == null) {
// optional input
continue;
}
GpelAssignCopyFrom from = createAssignCopyFrom(port);
GpelAssignCopyTo to = createAssignCopyTo(port, true);
GpelAssignCopy copy = new GpelAssignCopy(this.bpelNS, from, to);
copies.add(copy);
}
GpelAssign assign = new GpelAssign(this.bpelNS, copies);
sequence.addActivity(assign);
PartnerLinkRole partnerRoll = this.workflowWSDL
.getPartnerRoll(portTypeQName);
if (partnerRoll == null) {
String partnerLinkTypeName = id + PARTNER_LINK_TYPE_SUFFIX;
String partnerRollName = id + PARTNER_ROLE_SUFFIX;
partnerRoll = this.workflowWSDL.addPartnerLinkTypeAndRoll(
partnerLinkTypeName, partnerRollName, portTypeQName);
}
PartnerLinkType partnerLinkType = partnerRoll.getPartnerLinkType();
// partnerLink
String partnerLinkName = createPartnerLinkName(id);
XmlNamespace partnerLinkTypeNS = this.targetNamespace;
this.process.addPartnerLink(partnerLinkName, partnerLinkTypeNS,
partnerLinkType.getName(), null, partnerRoll.getName());
// Invoke
GpelInvoke invoke = new GpelInvoke(this.bpelNS, partnerLinkName, namespace,