* component send information in soap header
*/
for (Node n : wsNode.getControlInPort().getFromNodes()) {
if (n instanceof InstanceNode) {
// TODO make it as constant
LeadResourceMapping x = new LeadResourceMapping(
"AMAZON");
x.addAttribute("ACCESS_KEY", AmazonCredential
.getInstance().getAwsAccessKeyId());
x.addAttribute("SECRET_KEY", AmazonCredential
.getInstance().getAwsSecretAccessKey());
if (((InstanceNode) n).isStartNewInstance()) {
x.addAttribute("AMI_ID",
((InstanceNode) n).getIdAsValue());
x.addAttribute("INS_TYPE",
((InstanceNode) n).getInstanceType());
} else {
x.addAttribute("INS_ID",
((InstanceNode) n).getIdAsValue());
}
x.addAttribute("USERNAME",
((InstanceNode) n).getUsername());
// set to leadHeader
leadCtxHeader.setResourceMapping(x);
}