public abstract class AbstractBodyBuilder extends Object implements BodyBuilder
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractBodyBuilder.Style |
protected static class |
AbstractBodyBuilder.Use |
Modifier and Type | Field and Description |
---|---|
protected List<TypeDescriptor> |
inputDescriptors |
protected Map<String,String> |
namespaceMappings |
Constructor and Description |
---|
AbstractBodyBuilder(String style,
WSDLParser parser,
String operationName,
List<TypeDescriptor> inputDescriptors) |
Modifier and Type | Method and Description |
---|---|
protected abstract SOAPElement |
addElementToBody(String operationNamespace,
SOAPElement body,
Element el) |
SOAPElement |
build(Map inputMap) |
protected SOAPElement |
createBodyElementForData(String operationName,
Map<String,String> namespaceMappings,
String operationNamespace,
SOAPElement body,
TypeDescriptor descriptor,
String inputName,
Object dataValue) |
protected abstract Element |
createElementForArrayType(Map<String,String> namespaceMappings,
String inputName,
Object dataValue,
TypeDescriptor descriptor,
String mimeType,
String typeName)
generates an XML DOM Element for an array
|
protected Element |
createElementNS(String namespace,
String name) |
protected abstract Element |
createSkeletonElementForSingleItem(Map<String,String> namespaceMappings,
TypeDescriptor descriptor,
String inputName,
String typeName) |
protected Map<String,String> |
generateNamespaceMappings(List inputs)
Generates a map of all the namespaces for the operation and all of the
types required to call the operation.
|
protected String |
getMimeTypeForInputName(String inputName)
Provides the mime type for a given input
|
protected AbstractBodyBuilder.Style |
getStyle() |
protected abstract AbstractBodyBuilder.Use |
getUse() |
protected int |
mapNamespace(TypeDescriptor descriptor,
List<TypeDescriptor> visitedDescriptors,
Map<String,String> namespaceMap,
int nsCount)
creates a namespace prefix and adds the namespace to the namespaceMap for
a TypeDescriptor.
|
protected void |
populateElementWithList(String mimeType,
Element element,
List dataValues,
TypeDescriptor elementType)
Populates a DOM XML Element with the contents of a List of dataValues
|
protected void |
populateElementWithObjectData(String mimeType,
Element element,
Object dataValue,
TypeDescriptor descriptor)
Populates a DOM XML Element with dataValue according to its mimetype
|
protected List<TypeDescriptor> inputDescriptors
public AbstractBodyBuilder(String style, WSDLParser parser, String operationName, List<TypeDescriptor> inputDescriptors)
protected AbstractBodyBuilder.Style getStyle()
protected abstract AbstractBodyBuilder.Use getUse()
public SOAPElement build(Map inputMap) throws javax.wsdl.WSDLException, ParserConfigurationException, SOAPException, IOException, SAXException, UnknownOperationException
build
in interface BodyBuilder
javax.wsdl.WSDLException
ParserConfigurationException
SOAPException
IOException
SAXException
UnknownOperationException
protected SOAPElement createBodyElementForData(String operationName, Map<String,String> namespaceMappings, String operationNamespace, SOAPElement body, TypeDescriptor descriptor, String inputName, Object dataValue) throws ParserConfigurationException, SAXException, IOException, UnknownOperationException, SOAPException
protected abstract SOAPElement addElementToBody(String operationNamespace, SOAPElement body, Element el) throws SOAPException
SOAPException
protected abstract Element createSkeletonElementForSingleItem(Map<String,String> namespaceMappings, TypeDescriptor descriptor, String inputName, String typeName)
protected abstract Element createElementForArrayType(Map<String,String> namespaceMappings, String inputName, Object dataValue, TypeDescriptor descriptor, String mimeType, String typeName) throws ParserConfigurationException, SAXException, IOException, UnknownOperationException
namespaceMappings
- inputName
- dataValue
- descriptor
- mimeType
- typeName
- ParserConfigurationException
SAXException
IOException
UnknownOperationException
protected void populateElementWithList(String mimeType, Element element, List dataValues, TypeDescriptor elementType) throws ParserConfigurationException, SAXException, IOException
mimeType
- -
the mime type of the dataelement
- -
the Element to be populateddataValues
- -
the List of Objects containing the dataelementType
- -
the TypeDescriptor for the element being populatedParserConfigurationException
SAXException
IOException
protected void populateElementWithObjectData(String mimeType, Element element, Object dataValue, TypeDescriptor descriptor) throws ParserConfigurationException, SAXException, IOException
mimeType
- element
- dataValue
- descriptor
- ParserConfigurationException
SAXException
IOException
protected String getMimeTypeForInputName(String inputName)
inputName
- protected Map<String,String> generateNamespaceMappings(List inputs) throws UnknownOperationException, IOException
inputs
- -
List of input TypeDescriptor'sUnknownOperationException
IOException
protected int mapNamespace(TypeDescriptor descriptor, List<TypeDescriptor> visitedDescriptors, Map<String,String> namespaceMap, int nsCount)
descriptor
- namespaceMap
- nsCount
- Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.