protected Iterator<EndpointInterface> getLoop(TemplateModel model) throws TemplateException { WsdlInfo wsdl = this.wsdl; if (wsdl == null) { throw new MissingParameterException("wsdl"); } return wsdl.getEndpointInterfaces().iterator(); }
protected Iterator<ServiceEndpoint> getLoop(TemplateModel model) throws TemplateException { Set<ServiceEndpoint> interfaces = new TreeSet<ServiceEndpoint>(new Comparator<ServiceEndpoint>() { public int compare(ServiceEndpoint e1, ServiceEndpoint e2) { return e1.getServiceEndpointId().compareTo(e2.getServiceEndpointId()); } }); Collection<WsdlInfo> wsdls = getNamespacesToWSDLs().values(); for (WsdlInfo wsdl : wsdls) { for (EndpointInterface endpointInterface : wsdl.getEndpointInterfaces()) { for (EndpointImplementation impl : endpointInterface.getEndpointImplementations()) { interfaces.add(impl); } } } return interfaces.iterator(); }
protected Iterator<EndpointInterface> getLoop(TemplateModel model) throws TemplateException { WsdlInfo wsdl = this.wsdl; if (wsdl == null) { throw new MissingParameterException("wsdl"); } Collection<EndpointInterface> eis = new ArrayList<EndpointInterface>(wsdl.getEndpointInterfaces()); if (considerFacets) { Iterator<EndpointInterface> vit = eis.iterator(); while (vit.hasNext()) { EndpointInterface next = vit.next(); if (!FacetFilter.accept(next)) { vit.remove(); } } } return eis.iterator(); }
/** * Get the imported namespaces used by this WSDL. * * @return The imported namespaces used by this WSDL. */ public Set<String> getImportedNamespaces() { Collection<EndpointInterface> endpointInterfaces = getEndpointInterfaces(); if ((endpointInterfaces == null) || (endpointInterfaces.size() == 0)) { throw new IllegalStateException("WSDL for " + getTargetNamespace() + " has no endpoint interfaces!"); } HashSet<String> importedNamespaces = new HashSet<String>(); //always import the list of known namespaces. importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/http/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/mime/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/soap/"); importedNamespaces.add("http://schemas.xmlsoap.org/soap/encoding/"); importedNamespaces.add("http://www.w3.org/2001/XMLSchema"); for (EndpointInterface endpointInterface : endpointInterfaces) { importedNamespaces.addAll(endpointInterface.getReferencedNamespaces()); } return importedNamespaces; }
/** * Get the imported namespaces used by this WSDL. * * @return The imported namespaces used by this WSDL. */ public Set<String> getImportedNamespaces() { Collection<EndpointInterface> endpointInterfaces = getEndpointInterfaces(); if ((endpointInterfaces == null) || (endpointInterfaces.size() == 0)) { throw new IllegalStateException("WSDL for " + getTargetNamespace() + " has no endpoint interfaces!"); } HashSet<String> importedNamespaces = new HashSet<String>(); //always import the list of known namespaces. importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/http/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/mime/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/soap/"); importedNamespaces.add("http://schemas.xmlsoap.org/soap/encoding/"); importedNamespaces.add("http://www.w3.org/2001/XMLSchema"); for (EndpointInterface endpointInterface : endpointInterfaces) { importedNamespaces.addAll(endpointInterface.getReferencedNamespaces()); } return importedNamespaces; }
protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException { WsdlInfo wsdl = this.wsdl; if (wsdl == null) { throw new MissingParameterException("wsdl"); } HashMap<String, WebFault> declaredFaults = new HashMap<String, WebFault>(); for (EndpointInterface ei : wsdl.getEndpointInterfaces()) { Collection<WebMethod> webMethods = ei.getWebMethods(); for (WebMethod webMethod : webMethods) { for (WebFault webFault : webMethod.getWebFaults()) { declaredFaults.put(webFault.getQualifiedName(), webFault); } } } return declaredFaults.values().iterator(); }
protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException { Collection<WsdlInfo> wsdls; if (this.wsdl != null) { wsdls = Arrays.asList(wsdl); } else { wsdls = getNamespacesToWSDLs().values(); } HashMap<String, WebFault> declaredFaults = new HashMap<String, WebFault>(); for (WsdlInfo wsdl : wsdls) { for (EndpointInterface ei : wsdl.getEndpointInterfaces()) { Collection<WebMethod> webMethods = ei.getWebMethods(); for (WebMethod webMethod : webMethods) { for (WebFault webFault : webMethod.getWebFaults()) { declaredFaults.put(webFault.getQualifiedName(), webFault); } } } } return declaredFaults.values().iterator(); }
for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { exportedClasses.add(ei.getQualifiedName());
messages = new ArrayList<WebMessage>(); HashSet<String> foundFaults = new HashSet<String>(); for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { if (!considerFacets || FacetFilter.accept(ei)) { Collection<WebMethod> webMethods = ei.getWebMethods();
messages = new ArrayList<WebMessage>(); HashSet<String> foundFaults = new HashSet<String>(); for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { Collection<WebMethod> webMethods = ei.getWebMethods(); for (WebMethod method : webMethods) {
TreeSet<String> urlMappings = new TreeSet<String>(); for (WsdlInfo wsdlInfo : getModel().getNamespacesToWSDLs().values()) { for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { urlMappings.add(getAmfSubcontext() + ei.getServiceName());
TreeSet<WebFault> allFaults = new TreeSet<WebFault>(new TypeDeclarationComparator()); for (WsdlInfo wsdlInfo : model.getNamespacesToWSDLs().values()) { for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { String pckg = ei.getPackage().getQualifiedName(); if (!this.packageToNamespaceConversions.containsKey(pckg)) {
wsdlInfo.getEndpointInterfaces().add(ei); this.endpointInterfaces.add(ei);
for (EndpointInterface ei : wsdl.getEndpointInterfaces()) { gatherFacets(ei, facets);
wsdlInfo.getEndpointInterfaces().add(ei); this.endpointInterfaces.add(ei);
for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { WebAppComponent gwtServlet = new WebAppComponent(); gwtServlet.setClassname(ei.getPackage().getQualifiedName() + ".gwt.GWT" + ei.getSimpleName() + "Impl");
for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { for (WebMethod webMethod : ei.getWebMethods()) { for (WebMessage webMessage : webMethod.getMessages()) {
for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { for (WebMethod webMethod : ei.getWebMethods()) { for (WebMessage webMessage : webMethod.getMessages()) {
@Override public void doFreemarkerGenerate() throws IOException, TemplateException { if (!isUpToDate()) { EnunciateFreemarkerModel model = getModel(); //generate the rpc request/response beans. for (WsdlInfo wsdlInfo : model.getNamespacesToWSDLs().values()) { for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { for (WebMethod webMethod : ei.getWebMethods()) { for (WebMessage webMessage : webMethod.getMessages()) { if (webMessage instanceof RPCInputMessage) { model.put("message", webMessage); processTemplate(getRPCRequestBeanTemplateURL(), model); } else if (webMessage instanceof RPCOutputMessage) { model.put("message", webMessage); processTemplate(getRPCResponseBeanTemplateURL(), model); } } } } } } else { info("Skipping generation of XFire support classes as everything appears up-to-date...."); } getEnunciate().setProperty("xfire-server.src.dir", getGenerateDir()); getEnunciate().addArtifact(new FileArtifact(getName(), "xfire-server.src.dir", getGenerateDir())); }
for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { if (!isAMFTransient(ei)) { model.put("endpointInterface", ei); for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) { if (!isAMFTransient(ei)) { model.put("endpointInterface", ei);