private void generateOperation(GenerationContext context, OperationInfo op, JMethod method)
throws GenerationException
{
Collection bindings = getCurrentService().getBindings();
SchemaSupport schema = context.getSchemaGenerator();
List<String> partNames = new ArrayList<String>();
Map<String, ParamInfo> params = new HashMap<String, ParamInfo>();
// input parts
MessageInfo inputMsg = op.getInputMessage();
for (Iterator pitr = inputMsg.getMessageParts().iterator(); pitr.hasNext();)
{
MessagePartInfo part = (MessagePartInfo) pitr.next();
String varName = getUniqueName(javify(part.getName().getLocalPart()), partNames);
partNames.add(varName);
JType paramType = schema.getType(context, part);
ParamInfo param = new ParamInfo(paramType,varName);
param.setIn(true);
param.setName(part.getName());
param.setPart(part);
params.put(varName, param );
}
// input parts for each binding
for (Iterator itr = bindings.iterator(); itr.hasNext();)
{
Binding binding = (Binding) itr.next();
annotate(context, op, method, binding);
List headers = binding.getHeaders(inputMsg).getMessageParts();
for (Iterator bitr = headers.iterator(); bitr.hasNext();)
{
MessagePartInfo part = (MessagePartInfo) bitr.next();
String varName = getUniqueName(javify(part.getName().getLocalPart()), partNames);
partNames.add(varName);
JType paramType = schema.getType(context, part);
ParamInfo param = new ParamInfo(paramType,varName, true);
param.setIn(true);
param.setName(part.getName());
param.setPart(part);