addedLocal = true;
}
for (Iterator itr = service.getEndpoints().iterator(); itr.hasNext();)
{
Endpoint endpoint = (Endpoint) itr.next();
JInvocation newQN = JExpr._new(qnameType);
newQN.arg(endpoint.getName().getNamespaceURI());
newQN.arg(endpoint.getName().getLocalPart());
JInvocation bindingQN = JExpr._new(qnameType);
bindingQN.arg(endpoint.getBinding().getName().getNamespaceURI());
bindingQN.arg(endpoint.getBinding().getName().getLocalPart());
// Add a getFooEndpointMethod
JMethod getFooEndpoint = servCls.method(JMod.PUBLIC, serviceIntf, javify("get" + endpoint.getName().getLocalPart()));
JBlock geBody = getFooEndpoint.body();
geBody._return(JExpr.cast(serviceIntf, JExpr.direct("this").invoke("getPort").arg(newQN).arg(intfClass)));
JAnnotationUse weAnn = getFooEndpoint.annotate(WebEndpoint.class);
weAnn.param("name", endpoint.getName().getLocalPart());
staticBlock.add(portsVar.invoke("put").arg(newQN).arg(intfClass));
}
}
}