Class SoapDataFormat.Builder
- java.lang.Object
-
- org.apache.camel.model.dataformat.SoapDataFormat.Builder
-
- All Implemented Interfaces:
DataFormatBuilder<SoapDataFormat>
- Enclosing class:
- SoapDataFormat
public static class SoapDataFormat.Builder extends Object implements DataFormatBuilder<SoapDataFormat>
Builder
is a specific builder forSoapDataFormat
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SoapDataFormat.Builder
contextPath(String contextPath)
Package name where your JAXB classes are located.SoapDataFormat.Builder
elementNameStrategy(Object elementNameStrategy)
Sets an element strategy instance to use.SoapDataFormat.Builder
elementNameStrategyRef(String elementNameStrategyRef)
Refers to an element strategy to lookup from the registry.SoapDataFormat.Builder
encoding(String encoding)
To overrule and use a specific encodingSoapDataFormat
end()
Ends the build of the data format.SoapDataFormat.Builder
namespacePrefixRef(String namespacePrefixRef)
When marshalling using JAXB or SOAP then the JAXB implementation will automatic assign namespace prefixes, such as ns2, ns3, ns4 etc.SoapDataFormat.Builder
schema(String schema)
To validate against an existing schema.SoapDataFormat.Builder
version(String version)
SOAP version should either be 1.1 or 1.2.
-
-
-
Method Detail
-
contextPath
public SoapDataFormat.Builder contextPath(String contextPath)
Package name where your JAXB classes are located.
-
encoding
public SoapDataFormat.Builder encoding(String encoding)
To overrule and use a specific encoding
-
elementNameStrategyRef
public SoapDataFormat.Builder elementNameStrategyRef(String elementNameStrategyRef)
Refers to an element strategy to lookup from the registry. An element name strategy is used for two purposes. The first is to find a xml element name for a given object and soap action when marshaling the object into a SOAP message. The second is to find an Exception class for a given soap fault name. The following three element strategy class name is provided out of the box. QNameStrategy - Uses a fixed qName that is configured on instantiation. Exception lookup is not supported TypeNameStrategy - Uses the name and namespace from the @XMLType annotation of the given type. If no namespace is set then package-info is used. Exception lookup is not supported ServiceInterfaceStrategy - Uses information from a webservice interface to determine the type name and to find the exception class for a SOAP fault All three classes is located in the package name org.apache.camel.dataformat.soap.name If you have generated the web service stub code with cxf-codegen or a similar tool then you probably will want to use the ServiceInterfaceStrategy. In the case you have no annotated service interface you should use QNameStrategy or TypeNameStrategy.
-
version
public SoapDataFormat.Builder version(String version)
SOAP version should either be 1.1 or 1.2. Is by default 1.1
-
elementNameStrategy
public SoapDataFormat.Builder elementNameStrategy(Object elementNameStrategy)
Sets an element strategy instance to use. An element name strategy is used for two purposes. The first is to find a xml element name for a given object and soap action when marshaling the object into a SOAP message. The second is to find an Exception class for a given soap fault name. The following three element strategy class name is provided out of the box. QNameStrategy - Uses a fixed qName that is configured on instantiation. Exception lookup is not supported TypeNameStrategy - Uses the name and namespace from the @XMLType annotation of the given type. If no namespace is set then package-info is used. Exception lookup is not supported ServiceInterfaceStrategy - Uses information from a webservice interface to determine the type name and to find the exception class for a SOAP fault All three classes is located in the package name org.apache.camel.dataformat.soap.name If you have generated the web service stub code with cxf-codegen or a similar tool then you probably will want to use the ServiceInterfaceStrategy. In the case you have no annotated service interface you should use QNameStrategy or TypeNameStrategy.
-
namespacePrefixRef
public SoapDataFormat.Builder namespacePrefixRef(String namespacePrefixRef)
When marshalling using JAXB or SOAP then the JAXB implementation will automatic assign namespace prefixes, such as ns2, ns3, ns4 etc. To control this mapping, Camel allows you to refer to a map which contains the desired mapping.
-
schema
public SoapDataFormat.Builder schema(String schema)
To validate against an existing schema. Your can use the prefix classpath:, file:* or *http: to specify how the resource should be resolved. You can separate multiple schema files by using the ',' character.
-
end
public SoapDataFormat end()
Description copied from interface:DataFormatBuilder
Ends the build of the data format.- Specified by:
end
in interfaceDataFormatBuilder<SoapDataFormat>
- Returns:
- the data format fully built.
-
-