public JaxwsWsdlFile(Enunciate enunciate, String artifactId, WsdlInfo wsdlInfo, EnunciateJaxbContext context, String baseUri, Map<String, String> namespacePrefixes, FacetFilter facetFilter) { super(enunciate, artifactId, wsdlInfo.getFilename(), namespacePrefixes, facetFilter); this.wsdlInfo = wsdlInfo; this.baseUri = baseUri; this.context = context; }
/** * Get the schema associated with this WSDL. * * @return The schema associated with this WSDL. */ public SchemaInfo getAssociatedSchema() { return lookupSchema(getTargetNamespace()); }
@Override public ApiRegistry getApiRegistry() { return new JaxwsApiRegistry(this.jaxwsContext); }
@Override public ServiceGroup getGroup() { return new ServiceGroupImpl(this.ei.getContext().getWsdls().get(this.ei.getTargetNamespace()), this.registrationContext); }
protected File copyResources() { File resourcesDir = getResourcesDir(); resourcesDir.mkdirs(); try { if (this.jaxwsModule != null) { for (WsdlInfo wsdlInfo : this.jaxwsModule.getJaxwsContext().getWsdls().values()) { if (wsdlInfo.getWsdlFile() != null) { wsdlInfo.getWsdlFile().writeTo(resourcesDir); } } } for (SchemaInfo schemaInfo : this.jaxbModule.getJaxbContext().getSchemas().values()) { if (schemaInfo.getSchemaFile() != null) { schemaInfo.getSchemaFile().writeTo(resourcesDir); } } } catch (IOException e) { throw new EnunciateException(e); } return resourcesDir; }
@Override public String getSlug() { return "service_" + this.ei.getContext().getJaxbContext().getNamespacePrefixes().get(this.ei.getTargetNamespace()) + "_" + this.ei.getServiceName(); }
@Override public List<ServiceGroup> getServiceGroups() { Map<String, WsdlInfo> wsdls = this.context.getWsdls(); ArrayList<ServiceGroup> serviceGroups = new ArrayList<ServiceGroup>(); for (WsdlInfo wsdlInfo : wsdls.values()) { serviceGroups.add(new ServiceGroupImpl(wsdlInfo, registrationContext)); } return serviceGroups; }
/** * Gets the xml type of this result. * * @return The xml type of this result. */ public XmlType getXmlType() { XmlType xmlType = XmlTypeFactory.findSpecifiedType(this, this.context.getJaxbContext()); if (xmlType == null) { xmlType = XmlTypeFactory.getXmlType(getType(), this.context.getJaxbContext()); } return xmlType; }
protected void addReferencedDataTypeDefinitions(EndpointInterface ei) { LinkedList<Element> contextStack = new LinkedList<>(); contextStack.push(ei); try { for (WebMethod webMethod : ei.getWebMethods()) { addReferencedTypeDefinitions(webMethod, contextStack); } } finally { contextStack.pop(); } }
@Override public List<ServiceApi> getServiceApis(ApiRegistrationContext context) { return this.context.getEndpointInterfaces().isEmpty() ? Collections.<ServiceApi>emptyList() : Collections.<ServiceApi>singletonList(new JaxwsServiceApi(this.context, context)); }
@Override public Set<Syntax> getSyntaxes(ApiRegistrationContext context) { return this.context.getEndpointInterfaces().isEmpty() ? Collections.<Syntax>emptySet() : Collections.<Syntax>singleton(new SyntaxImpl(this.context.getJaxbContext(), context)); }
@Override public String getNamespace() { return this.wsdlInfo.getTargetNamespace(); }
@Override public InterfaceDescriptionFile getWsdlFile() { return this.wsdlInfo.getWsdlFile(); }
/** * A web fault has an explicit fault bean if all three of the following are present: * <p/> * <ol> * <li>A getFaultInfo method that returns the bean instance of a class type. * <li>A constructor taking a message and bean instance. * <li>A constructor taking a message, a bean instance, and a cause. * </ol> * * @return The explicit fault bean of this web fault, if exists, or null otherwise. */ public ElementDeclaration findExplicitFaultBean() { if (this.explicitFaultBeanType == null || this.explicitFaultBeanType.asElement() == null) { return null; } return this.context.getJaxbContext().findElementDeclaration(this.explicitFaultBeanType.asElement()); }
@Override public String getContextPath() { return this.context.getContextPath(); }
@Override public List<DependencySpec> getDependencySpecifications() { return Collections.singletonList(new JaxbDependencySpec()); }
public File getSunJaxwsXmlFile() { File sunJaxwsXmlFile = null; String configuredSunJaxwsXmlFile = this.config.getString("[@sun-jaxws-xml-file]", null); if (configuredSunJaxwsXmlFile != null) { sunJaxwsXmlFile = resolveFile(configuredSunJaxwsXmlFile); } else if (this.webInfDir != null) { sunJaxwsXmlFile = new File(this.webInfDir, "sun-jaxws.xml"); } if (sunJaxwsXmlFile != null && sunJaxwsXmlFile.exists()) { return sunJaxwsXmlFile; } return null; }
public JaxwsWsdlFile(Enunciate enunciate, String artifactId, WsdlInfo wsdlInfo, EnunciateJaxbContext context, String baseUri, Map<String, String> namespacePrefixes, FacetFilter facetFilter) { super(enunciate, artifactId, wsdlInfo.getFilename(), namespacePrefixes, facetFilter); this.wsdlInfo = wsdlInfo; this.baseUri = baseUri; this.context = context; }
@Override public TypeMirror getType() { TypeMirror type = super.asType(); MapType mapType = MapType.findMapType(type, this.context.getJaxbContext()); if (mapType != null) { type = mapType; } return type; }
@Override public DecoratedTypeMirror getReturnType() { TypeMirror type = super.getReturnType(); MapType mapType = MapType.findMapType(type, this.context.getJaxbContext()); if (mapType != null) { type = mapType; } return (DecoratedTypeMirror) TypeMirrorDecorator.decorate(type, this.env); }