/* * Calculate the invocation style of the target(s) associated with the given service * If more than one target exists, then take the intersection of their individual styles. * * (non-Javadoc) * @see org.apache.ode.bpel.iapi.BpelServer#getSupportedInvocationStyle(javax.xml.namespace.QName) */ public Set<InvocationStyle> getSupportedInvocationStyle(QName serviceId) { List<ODEProcess> processes = route(serviceId, null); if (processes == null || processes.size() == 0) throw new BpelEngineException("No such service: " + serviceId); // Compute the intersection of the styles of all providing processes Set<InvocationStyle> istyles = new HashSet<InvocationStyle>(); for (ODEProcess process : processes) { Set<InvocationStyle> pistyles = process.getSupportedInvocationStyle(serviceId); if (istyles.isEmpty()) { istyles.addAll(pistyles); } else { for (InvocationStyle istyle : istyles) { if (!pistyles.contains(istyle)) { istyles.remove(istyle); } } } } return istyles; }