Package org.apache.cxf.wsdl11
Class ServiceWSDLBuilder
java.lang.Object
org.apache.cxf.wsdl11.ServiceWSDLBuilder
Consume a set of service definitions and produce a WSDL model. The ServiceInfo objects
contain the bindings, operations, and ports, plus XMLSchema schemas.
Each wsdl:definition has to have a single target namespace. The first service in the list
defines the TNS of the overall WSDL. If a subsequent service has a divergent TNS, then
the code creates a new definition element (i.e., Definition object), and imports it into
the top-level object.
-
Constructor Summary
ConstructorsConstructorDescriptionServiceWSDLBuilder(org.apache.cxf.Bus b, List<org.apache.cxf.service.model.ServiceInfo> services) Sets up the builder on a bus with a list of services.ServiceWSDLBuilder(org.apache.cxf.Bus b, org.apache.cxf.service.model.ServiceInfo... services) For callers who prefer varargs, an inline list of ServiceInfo objects instead of a List. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDocumentation(javax.wsdl.WSDLElement wsdlel, String text) protected voidaddExtensibilityElements(javax.wsdl.Definition def, javax.wsdl.extensions.ElementExtensible elementExtensible, List<javax.wsdl.extensions.ExtensibilityElement> extensibilityElements) protected voidaddNamespace(String prefix, String namespaceURI, javax.wsdl.Definition def) protected voidaddNamespace(String namespaceURI, javax.wsdl.Definition def) javax.wsdl.Definitionbuild()Create the WSDL Definition object and return it.javax.wsdl.DefinitionCreate the WSDL Definition object and return it.protected voidbuildBinding(javax.wsdl.Definition definition, Collection<org.apache.cxf.service.model.BindingInfo> bindingInfos, Collection<javax.wsdl.PortType> portTypes) protected voidbuildBindingFault(javax.wsdl.Definition def, javax.wsdl.BindingOperation bindingOperation, Collection<org.apache.cxf.service.model.BindingFaultInfo> bindingFaultInfos) protected voidbuildBindingInput(javax.wsdl.Definition def, javax.wsdl.BindingOperation bindingOperation, org.apache.cxf.service.model.BindingMessageInfo bindingMessageInfo) protected voidbuildBindingOperation(javax.wsdl.Definition def, javax.wsdl.Binding binding, Collection<org.apache.cxf.service.model.BindingOperationInfo> bindingOperationInfos) protected voidbuildBindingOutput(javax.wsdl.Definition def, javax.wsdl.BindingOperation bindingOperation, org.apache.cxf.service.model.BindingMessageInfo bindingMessageInfo) protected voidbuildMessage(javax.wsdl.Message message, org.apache.cxf.service.model.AbstractMessageContainer messageContainer, javax.wsdl.Definition def) protected javax.wsdl.PortTypebuildPortType(org.apache.cxf.service.model.InterfaceInfo intf, javax.wsdl.Definition def) protected voidbuildPortTypeOperation(javax.wsdl.PortType portType, Collection<org.apache.cxf.service.model.OperationInfo> operationInfos, javax.wsdl.Definition def) protected voidbuildService(org.apache.cxf.service.model.ServiceInfo serviceInfo, javax.wsdl.Definition definition) protected voidbuildTypes(Collection<org.apache.cxf.service.model.SchemaInfo> schemas, Map<String, org.apache.cxf.service.model.SchemaInfo> imports, javax.wsdl.Definition def) protected voidbuildTypesWithSchemaImports(Collection<org.apache.cxf.service.model.SchemaInfo> schemas, Map<String, org.apache.cxf.service.model.SchemaInfo> imports, javax.wsdl.Definition def) List<javax.wsdl.extensions.ExtensibilityElement>getWSDL11Extensors(org.apache.cxf.service.model.AbstractPropertiesHolder holder) Return a list of ExtensibilityElements for a particular component, such as a BindingFaultInfo.voidBase filename for imported files.voidsetUseSchemaImports(boolean b) Set whether to emit references to imported schema files.
-
Constructor Details
-
ServiceWSDLBuilder
public ServiceWSDLBuilder(org.apache.cxf.Bus b, List<org.apache.cxf.service.model.ServiceInfo> services) Sets up the builder on a bus with a list of services.- Parameters:
b- the bus.services- the services.
-
ServiceWSDLBuilder
public ServiceWSDLBuilder(org.apache.cxf.Bus b, org.apache.cxf.service.model.ServiceInfo... services) For callers who prefer varargs, an inline list of ServiceInfo objects instead of a List. Primarily used for tests or other callers with only one service in hand.- Parameters:
b- the bus.services- the services.
-
-
Method Details
-
setUseSchemaImports
public void setUseSchemaImports(boolean b) Set whether to emit references to imported schema files. This is only effective forbuild(Map), which is passed additional schemas for import.build()resets this flag to false.- Parameters:
b- true to use imports.
-
setBaseFileName
Base filename for imported files.- Parameters:
s- pathname.
-
build
public javax.wsdl.Definition build() throws javax.wsdl.WSDLExceptionCreate the WSDL Definition object and return it. This function will never create imports to schemas.- Returns:
- the WSDL definition.
- Throws:
javax.wsdl.WSDLException
-
build
public javax.wsdl.Definition build(Map<String, org.apache.cxf.service.model.SchemaInfo> imports) throws javax.wsdl.WSDLExceptionCreate the WSDL Definition object and return it. This function respects the setting ofsetUseSchemaImports(boolean).- Parameters:
imports- A set of schema imports to either reference as imports or read and then inline.- Returns:
- the WSDL definition
- Throws:
javax.wsdl.WSDLException
-
getWSDL11Extensors
public List<javax.wsdl.extensions.ExtensibilityElement> getWSDL11Extensors(org.apache.cxf.service.model.AbstractPropertiesHolder holder) Return a list of ExtensibilityElements for a particular component, such as a BindingFaultInfo. This perhaps should be protected.- Parameters:
holder- The item containing the extensibility elements.- Returns:
- the extensibility elements.
-
addDocumentation
-
addExtensibilityElements
protected void addExtensibilityElements(javax.wsdl.Definition def, javax.wsdl.extensions.ElementExtensible elementExtensible, List<javax.wsdl.extensions.ExtensibilityElement> extensibilityElements) -
buildTypes
protected void buildTypes(Collection<org.apache.cxf.service.model.SchemaInfo> schemas, Map<String, org.apache.cxf.service.model.SchemaInfo> imports, javax.wsdl.Definition def) -
buildTypesWithSchemaImports
protected void buildTypesWithSchemaImports(Collection<org.apache.cxf.service.model.SchemaInfo> schemas, Map<String, org.apache.cxf.service.model.SchemaInfo> imports, javax.wsdl.Definition def) - Parameters:
schemas-imports-def-
-
buildBinding
protected void buildBinding(javax.wsdl.Definition definition, Collection<org.apache.cxf.service.model.BindingInfo> bindingInfos, Collection<javax.wsdl.PortType> portTypes) -
buildBindingOperation
protected void buildBindingOperation(javax.wsdl.Definition def, javax.wsdl.Binding binding, Collection<org.apache.cxf.service.model.BindingOperationInfo> bindingOperationInfos) -
buildBindingFault
protected void buildBindingFault(javax.wsdl.Definition def, javax.wsdl.BindingOperation bindingOperation, Collection<org.apache.cxf.service.model.BindingFaultInfo> bindingFaultInfos) -
buildBindingInput
protected void buildBindingInput(javax.wsdl.Definition def, javax.wsdl.BindingOperation bindingOperation, org.apache.cxf.service.model.BindingMessageInfo bindingMessageInfo) -
buildBindingOutput
protected void buildBindingOutput(javax.wsdl.Definition def, javax.wsdl.BindingOperation bindingOperation, org.apache.cxf.service.model.BindingMessageInfo bindingMessageInfo) -
buildService
protected void buildService(org.apache.cxf.service.model.ServiceInfo serviceInfo, javax.wsdl.Definition definition) -
buildPortType
protected javax.wsdl.PortType buildPortType(org.apache.cxf.service.model.InterfaceInfo intf, javax.wsdl.Definition def) -
addNamespace
-
addNamespace
-
buildPortTypeOperation
protected void buildPortTypeOperation(javax.wsdl.PortType portType, Collection<org.apache.cxf.service.model.OperationInfo> operationInfos, javax.wsdl.Definition def) -
buildMessage
protected void buildMessage(javax.wsdl.Message message, org.apache.cxf.service.model.AbstractMessageContainer messageContainer, javax.wsdl.Definition def)
-