public class BuilderUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BOM_SIZE
Deprecated.
|
Constructor and Description |
---|
BuilderUtil() |
Modifier and Type | Method and Description |
---|---|
static org.apache.axiom.soap.SOAPEnvelope |
buildsoapMessage(MessageContext messageContext,
MultipleEntryHashMap requestParameterMap,
org.apache.axiom.soap.SOAPFactory soapFactory) |
static org.apache.axiom.attachments.Attachments |
createAttachments(MessageContext msgContext,
InputStream inStream,
String contentTypeString,
boolean fileCacheForAttachments,
String attachmentRepoDir,
String attachmentSizeThreshold,
int contentLength) |
protected static org.apache.axiom.attachments.Attachments |
createAttachmentsMap(MessageContext msgContext,
InputStream inStream,
String contentTypeString) |
static org.apache.axiom.om.OMXMLParserWrapper |
createPOXBuilder(InputStream in,
String encoding)
Create a builder suitable for an XML message.
|
static void |
createSOAPMessageWithoutSchema(org.apache.axiom.soap.SOAPFactory soapFactory,
org.apache.axiom.om.OMElement bodyFirstChild,
MultipleEntryHashMap requestParameterMap) |
static org.apache.axiom.soap.SOAPModelBuilder |
createSOAPModelBuilder(InputStream in,
String encoding)
Create a SOAP model builder.
|
static org.apache.axiom.om.impl.builder.StAXBuilder |
getAttachmentsBuilder(MessageContext msgContext,
InputStream inStream,
String contentTypeString,
boolean isSOAP) |
static org.apache.axiom.om.impl.builder.StAXBuilder |
getBuilder(InputStream inStream)
Deprecated.
Please use
OMXMLBuilderFactory.createOMBuilder(InputStream) instead. |
static org.apache.axiom.om.impl.builder.StAXBuilder |
getBuilder(InputStream inStream,
String charSetEnc)
Deprecated.
Please use
createSOAPModelBuilder(InputStream, String) to enable usage
of non standard Axiom implementations. |
static org.apache.axiom.om.impl.builder.StAXBuilder |
getBuilder(Reader in)
Deprecated.
If some one really need this method, please shout.
|
static org.apache.axiom.om.impl.builder.StAXBuilder |
getBuilder(org.apache.axiom.soap.SOAPFactory soapFactory,
InputStream in,
String charSetEnc) |
static Builder |
getBuilderFromSelector(String type,
MessageContext msgContext)
Initial work for a builder selector which selects the builder for a given message format
based on the the content type of the recieved message.
|
static String |
getCharSetEncoding(PushbackInputStream is2,
String defaultEncoding)
Deprecated.
It's the role of the XML parser to determine the charset encoding and/or byte
order using the algorithm described in the "Autodetection of Character Encodings"
appendix of the XML spec. If you need this method, then something is wrong:
probably you are using a
Reader where you should use an
InputStream . |
static String |
getCharSetEncoding(String contentType)
Extracts and returns the character set encoding from the Content-type header
Example: "Content-Type: text/xml; charset=utf-8" would return "utf-8"
|
static String |
getEnvelopeNamespace(String contentType) |
static org.apache.axiom.om.impl.builder.StAXBuilder |
getPOXBuilder(InputStream inStream,
String charSetEnc)
Deprecated.
Please use
createPOXBuilder(InputStream, String) to enable usage of non
standard Axiom implementations. |
static PushbackInputStream |
getPushbackInputStream(InputStream is)
Deprecated.
If you need a
PushbackInputStream just construct one (with the
appropriate size). |
static Reader |
getReader(InputStream is,
String charSetEncoding)
Deprecated.
Instead of using this method, you should probably pass the
InputStream
directly to the XML parser. If the stream is not XML, you shouldn't be using this
method anyway. |
static org.apache.axiom.om.impl.builder.StAXBuilder |
getSOAPBuilder(InputStream inStream)
Deprecated.
Please use
createSOAPModelBuilder(InputStream, String) to enable usage
of non standard Axiom implementations. |
static org.apache.axiom.om.impl.builder.StAXBuilder |
getSOAPBuilder(InputStream inStream,
String charSetEnc)
Deprecated.
Please use
createSOAPModelBuilder(InputStream, String) to enable usage
of non standard Axiom implementations. |
static boolean |
isAttachmentsCacheEnabled(MessageContext msgContext) |
static void |
validateCharSetEncoding(String charsetEncodingFromTransport,
String charsetEncodingFromXML,
String soapNamespaceURI) |
static void |
validateSOAPVersion(String soapNamespaceURIFromTransport,
org.apache.axiom.soap.SOAPEnvelope envelope) |
public static final int BOM_SIZE
public static org.apache.axiom.soap.SOAPEnvelope buildsoapMessage(MessageContext messageContext, MultipleEntryHashMap requestParameterMap, org.apache.axiom.soap.SOAPFactory soapFactory) throws AxisFault
AxisFault
public static void createSOAPMessageWithoutSchema(org.apache.axiom.soap.SOAPFactory soapFactory, org.apache.axiom.om.OMElement bodyFirstChild, MultipleEntryHashMap requestParameterMap)
public static org.apache.axiom.om.impl.builder.StAXBuilder getPOXBuilder(InputStream inStream, String charSetEnc) throws XMLStreamException
createPOXBuilder(InputStream, String)
to enable usage of non
standard Axiom implementations.XMLStreamException
public static org.apache.axiom.om.OMXMLParserWrapper createPOXBuilder(InputStream in, String encoding)
StAXParserConfiguration.SOAP
to disallow document type declarations (that potentially
reference external entities).in
- the input stream containing the plain XML messageencoding
- the charset encoding of the message or null
if the parser should
determine the charset encodingpublic static Reader getReader(InputStream is, String charSetEncoding) throws IOException
InputStream
directly to the XML parser. If the stream is not XML, you shouldn't be using this
method anyway.IOException
public static PushbackInputStream getPushbackInputStream(InputStream is)
PushbackInputStream
just construct one (with the
appropriate size).public static String getCharSetEncoding(PushbackInputStream is2, String defaultEncoding) throws IOException
Reader
where you should use an
InputStream
.IOException
public static String getCharSetEncoding(String contentType)
contentType
- a content-type (from HTTP or MIME, for instance)public static org.apache.axiom.om.impl.builder.StAXBuilder getAttachmentsBuilder(MessageContext msgContext, InputStream inStream, String contentTypeString, boolean isSOAP) throws org.apache.axiom.om.OMException, XMLStreamException, FactoryConfigurationError
org.apache.axiom.om.OMException
XMLStreamException
FactoryConfigurationError
protected static org.apache.axiom.attachments.Attachments createAttachmentsMap(MessageContext msgContext, InputStream inStream, String contentTypeString)
public static boolean isAttachmentsCacheEnabled(MessageContext msgContext)
public static org.apache.axiom.attachments.Attachments createAttachments(MessageContext msgContext, InputStream inStream, String contentTypeString, boolean fileCacheForAttachments, String attachmentRepoDir, String attachmentSizeThreshold, int contentLength)
public static org.apache.axiom.om.impl.builder.StAXBuilder getBuilder(Reader in) throws XMLStreamException
in
- an InputStreamXMLStreamException
public static org.apache.axiom.om.impl.builder.StAXBuilder getBuilder(InputStream inStream) throws XMLStreamException
OMXMLBuilderFactory.createOMBuilder(InputStream)
instead.XMLStreamException
public static org.apache.axiom.soap.SOAPModelBuilder createSOAPModelBuilder(InputStream in, String encoding)
OMXMLBuilderFactory.createSOAPModelBuilder(InputStream, String)
but generates
additional logging if an error occurs.in
- the input stream containing the SOAP messageencoding
- the charset encoding of the SOAP message or null
if the parser should
determine the charset encodingpublic static org.apache.axiom.om.impl.builder.StAXBuilder getBuilder(InputStream inStream, String charSetEnc) throws XMLStreamException
createSOAPModelBuilder(InputStream, String)
to enable usage
of non standard Axiom implementations.XMLStreamException
public static org.apache.axiom.om.impl.builder.StAXBuilder getSOAPBuilder(InputStream inStream) throws XMLStreamException
createSOAPModelBuilder(InputStream, String)
to enable usage
of non standard Axiom implementations.XMLStreamException
public static org.apache.axiom.om.impl.builder.StAXBuilder getSOAPBuilder(InputStream inStream, String charSetEnc) throws XMLStreamException
createSOAPModelBuilder(InputStream, String)
to enable usage
of non standard Axiom implementations.XMLStreamException
public static org.apache.axiom.om.impl.builder.StAXBuilder getBuilder(org.apache.axiom.soap.SOAPFactory soapFactory, InputStream in, String charSetEnc) throws XMLStreamException
XMLStreamException
public static Builder getBuilderFromSelector(String type, MessageContext msgContext) throws AxisFault
type
- content-typemsgContext
- the active MessageContextAxisFault
public static void validateSOAPVersion(String soapNamespaceURIFromTransport, org.apache.axiom.soap.SOAPEnvelope envelope)
Copyright © 2004–2018 The Apache Software Foundation. All rights reserved.