public class SoapUtil extends Object
Constructor and Description |
---|
SoapUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addNewWsaMessageId(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc) |
static void |
addNewWsaMessageId(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc,
String messageIdPrefix) |
static void |
addRelatedWsaMessageId(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc,
String relatedMessageId) |
static void |
addWsaAction(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc,
String action) |
static void |
addWsaFrom(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc,
String from) |
static void |
addWsaMessageId(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc,
String messageId) |
static void |
addWsaRecipientTo(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc,
String recipient) |
static void |
addWsaReplyTo(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc,
String replyTo) |
static org.apache.xmlbeans.XmlObject |
createXmlExceptionResponse(Throwable t)
Creates an exception report from the
Throwable 's stacktrace. |
static QName |
getElementType(org.apache.xmlbeans.XmlObject xml) |
static org.apache.xmlbeans.SchemaType |
getSchemaTypeOfXmlPayload(org.apache.xmlbeans.XmlObject xml) |
static String |
getTextContentFromAnyNode(org.apache.xmlbeans.XmlObject xmlAnyElement) |
static String |
getTextContentFromXml(org.apache.xmlbeans.XmlObject xmlElement) |
static String |
getWsaActionFromSoapHeader(org.apache.xmlbeans.XmlObject xml) |
static String |
getWsaMessageIdFromSoapHeader(org.apache.xmlbeans.XmlObject xml) |
static String |
getWsaRecipientUrlFromSoapHeader(org.apache.xmlbeans.XmlObject xml)
Seeks for a
<wsa:To> header element win SOAP Envelope header. |
static String |
getWsaRelatesToFromSoapHeader(org.apache.xmlbeans.XmlObject xml) |
static String |
getWsaReplyToUrlFromSoapHeader(org.apache.xmlbeans.XmlObject xml) |
static org.apache.xmlbeans.XmlObject |
getXmlFromDomNode(org.apache.xmlbeans.XmlObject xml,
String nodeName) |
static boolean |
isSoapEnvelope(org.apache.xmlbeans.XmlObject xml) |
static boolean |
isSoapFault(org.apache.xmlbeans.XmlObject response) |
static org.apache.xmlbeans.XmlObject |
readBodyNodeFrom(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelope,
String nodeName) |
static org.apache.xmlbeans.XmlObject |
readPayload(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelope,
String nodeName) |
static org.apache.xmlbeans.XmlObject |
setTextContent(org.apache.xmlbeans.XmlObject xmlObject,
String content) |
static org.apache.xmlbeans.XmlObject |
stripSoapEnvelope(org.apache.xmlbeans.XmlObject xmlToStrip)
Strips SOAP envelope from passed argument and returns SOAP body's XML payload.
|
static org.apache.xmlbeans.XmlObject |
stripSoapEnvelope(org.apache.xmlbeans.XmlObject xmlToStrip,
String nodeName)
Strips SOAP envelope from passed argument and returns SOAP body's XML payload.
|
static boolean |
validateXml(org.apache.xmlbeans.XmlObject xml) |
static org.w3.x2003.x05.soapEnvelope.EnvelopeDocument |
wrapToSoapEnvelope(org.apache.xmlbeans.XmlObject bodyContent) |
public static org.apache.xmlbeans.XmlObject createXmlExceptionResponse(Throwable t)
Throwable
's stacktrace.
<Exception>
<message>exMessage</message>
<stackTrace>
[EXC] "Stacktrace element 1"
[EXC] "Stacktrace element 2"
[EXC] "Stacktrace element 3"
<!-- ... -->
</stackTrace>
</Exception>
public static String getWsaRecipientUrlFromSoapHeader(org.apache.xmlbeans.XmlObject xml) throws org.apache.xmlbeans.XmlException
<wsa:To>
header element win SOAP Envelope header.xml
- the SOAP envelopeorg.apache.xmlbeans.XmlException
- if no recipient header could not be parsed from the SOAP headerpublic static String getWsaReplyToUrlFromSoapHeader(org.apache.xmlbeans.XmlObject xml) throws org.apache.xmlbeans.XmlException
org.apache.xmlbeans.XmlException
public static String getWsaMessageIdFromSoapHeader(org.apache.xmlbeans.XmlObject xml) throws org.apache.xmlbeans.XmlException
org.apache.xmlbeans.XmlException
public static String getWsaRelatesToFromSoapHeader(org.apache.xmlbeans.XmlObject xml) throws org.apache.xmlbeans.XmlException
org.apache.xmlbeans.XmlException
public static String getWsaActionFromSoapHeader(org.apache.xmlbeans.XmlObject xml) throws org.apache.xmlbeans.XmlException
org.apache.xmlbeans.XmlException
public static org.apache.xmlbeans.SchemaType getSchemaTypeOfXmlPayload(org.apache.xmlbeans.XmlObject xml)
public static org.apache.xmlbeans.XmlObject stripSoapEnvelope(org.apache.xmlbeans.XmlObject xmlToStrip)
xmlToStrip
- the XML to strip SOAP envelope from.public static org.apache.xmlbeans.XmlObject stripSoapEnvelope(org.apache.xmlbeans.XmlObject xmlToStrip, String nodeName)
xmlToStrip
- the XML to strip SOAP envelope from.nodeName
- the body payload's node name.public static boolean isSoapEnvelope(org.apache.xmlbeans.XmlObject xml)
public static boolean isSoapFault(org.apache.xmlbeans.XmlObject response)
public static org.apache.xmlbeans.XmlObject readPayload(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelope, String nodeName)
public static org.apache.xmlbeans.XmlObject readBodyNodeFrom(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelope, String nodeName) throws org.apache.xmlbeans.XmlException
envelope
- the SOAP envelope to read body fromnodeName
- the node's name of the expected body payloadXmlObject
representation of the body, or null
if node could
not be found.org.apache.xmlbeans.XmlException
- if parsing to XML failspublic static org.apache.xmlbeans.XmlObject getXmlFromDomNode(org.apache.xmlbeans.XmlObject xml, String nodeName) throws org.apache.xmlbeans.XmlException
xml
- the node containing xmlnodeName
- the node's name of the DOM nodeXmlObject
representation of the body, or null
if node could
not be found.org.apache.xmlbeans.XmlException
- if parsing to XML failspublic static QName getElementType(org.apache.xmlbeans.XmlObject xml)
public static String getTextContentFromXml(org.apache.xmlbeans.XmlObject xmlElement)
public static String getTextContentFromAnyNode(org.apache.xmlbeans.XmlObject xmlAnyElement)
public static org.apache.xmlbeans.XmlObject setTextContent(org.apache.xmlbeans.XmlObject xmlObject, String content)
public static org.w3.x2003.x05.soapEnvelope.EnvelopeDocument wrapToSoapEnvelope(org.apache.xmlbeans.XmlObject bodyContent)
public static void addWsaRecipientTo(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc, String recipient)
public static void addWsaReplyTo(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc, String replyTo)
public static void addWsaFrom(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc, String from)
public static void addWsaAction(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc, String action)
public static void addRelatedWsaMessageId(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc, String relatedMessageId)
public static void addNewWsaMessageId(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc)
public static void addNewWsaMessageId(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc, String messageIdPrefix)
public static void addWsaMessageId(org.w3.x2003.x05.soapEnvelope.EnvelopeDocument envelopeDoc, String messageId)
public static boolean validateXml(org.apache.xmlbeans.XmlObject xml) throws XMLHandlingException
XMLHandlingException
Copyright © 2012–2017 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.