/** * Return a WSDL definition model for a server. * * @param server the server. * @return the definition. * @throws WSDLException */ public Definition getWSDLDefinition(Server server) throws WSDLException { Service service = server.getEndpoint().getService(); ServiceWSDLBuilder wsdlBuilder = new ServiceWSDLBuilder(bus, service.getServiceInfos().get(0)); wsdlBuilder.setUseSchemaImports(false); return wsdlBuilder.build(); }
/** * Return a WSDL definition model for a server. * * @param server the server. * @return the definition. * @throws WSDLException */ public Definition getWSDLDefinition(Server server) throws WSDLException { Service service = server.getEndpoint().getService(); ServiceWSDLBuilder wsdlBuilder = new ServiceWSDLBuilder(bus, service.getServiceInfos().get(0)); wsdlBuilder.setUseSchemaImports(false); return wsdlBuilder.build(); }
/** * Return a WSDL definition model for a server. * * @param server the server. * @return the definition. * @throws WSDLException */ public Definition getWSDLDefinition(Server server) throws WSDLException { Service service = server.getEndpoint().getService(); ServiceWSDLBuilder wsdlBuilder = new ServiceWSDLBuilder(bus, service.getServiceInfos().get(0)); wsdlBuilder.setUseSchemaImports(false); return wsdlBuilder.build(); }
/** * Create a wsdl Definition object from the endpoint information and register * it in the local data structure for future reference. * * @param bus CXF's hub for access to internal constructs * @param mp a map of known wsdl Definition objects * @param message * @param smp a map of known xsd SchemaReference objects * @param base the request URL * @param endpointInfo information for a web service 'port' inside of a service * @throws WSDLException */ protected void updateWSDLKeyDefinition(Bus bus, Map<String, Definition> mp, Message message, Map<String, SchemaReference> smp, String base, EndpointInfo endpointInfo) throws WSDLException { if (!mp.containsKey("")) { ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, endpointInfo.getService()); builder.setUseSchemaImports( MessageUtils.getContextualBoolean(message, WSDL_CREATE_IMPORTS, false)); // base file name is ignored if createSchemaImports == false! builder.setBaseFileName(endpointInfo.getService().getName().getLocalPart()); Definition def = builder.build(new HashMap<String, SchemaInfo>()); mp.put("", def); updateDefinition(bus, def, mp, smp, base, "", ""); } }
/** * Create a wsdl Definition object from the endpoint information and register * it in the local data structure for future reference. * * @param bus CXF's hub for access to internal constructs * @param mp a map of known wsdl Definition objects * @param message * @param smp a map of known xsd SchemaReference objects * @param base the request URL * @param endpointInfo information for a web service 'port' inside of a service * @throws WSDLException */ protected void updateWSDLKeyDefinition(Bus bus, Map<String, Definition> mp, Message message, Map<String, SchemaReference> smp, String base, EndpointInfo endpointInfo) throws WSDLException { if (!mp.containsKey("")) { ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, endpointInfo.getService()); builder.setUseSchemaImports( MessageUtils.getContextualBoolean(message, WSDL_CREATE_IMPORTS, false)); // base file name is ignored if createSchemaImports == false! builder.setBaseFileName(endpointInfo.getService().getName().getLocalPart()); Definition def = builder.build(new HashMap<String, SchemaInfo>()); mp.put("", def); updateDefinition(bus, def, mp, smp, base, "", ""); } }
builder.setUseSchemaImports(this.allowImports());
builder.setUseSchemaImports(this.allowImports());