public class RequestUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) javax.xml.parsers.DocumentBuilder |
builder |
(package private) javax.xml.parsers.DocumentBuilderFactory |
factory |
Constructor and Description |
---|
RequestUtils() |
Modifier and Type | Method and Description |
---|---|
private org.w3c.dom.Element |
convertToXml(com.fasterxml.jackson.databind.JsonNode node,
java.lang.String rootName)
Converts a JsonNode into Xml element.
|
java.util.List<org.w3c.dom.Element> |
processBody(com.fasterxml.jackson.databind.JsonNode params,
java.lang.String method)
Creates the SOAP body.
|
java.util.List<org.apache.cxf.binding.soap.SoapHeader> |
processHeader(com.fasterxml.jackson.databind.JsonNode input)
Converts each element in "SOAP-HEADER" JsonNode into a SoapHeader,
and adds each SoapHeader to a list.
!
|
private void |
setDefaultNamespace(org.w3c.dom.Element element)
If client did not provide a namespace for the element,
set to default namespace of Web Service.
|
byte[] |
validateRequest(com.fasterxml.jackson.databind.JsonNode inputJson)
Checks the incoming request for syntax errors according to JSON-RPC 2.0 Specification.
|
javax.xml.parsers.DocumentBuilderFactory factory
javax.xml.parsers.DocumentBuilder builder
public byte[] validateRequest(com.fasterxml.jackson.databind.JsonNode inputJson) throws java.io.IOException
inputJson
- incoming JSON-RPC requestjava.io.IOException
public java.util.List<org.apache.cxf.binding.soap.SoapHeader> processHeader(com.fasterxml.jackson.databind.JsonNode input) throws javax.xml.stream.XMLStreamException, org.xml.sax.SAXException, java.io.IOException
input
- the "SOAP-HEADER" member under the params memberjavax.xml.stream.XMLStreamException
java.io.IOException
org.xml.sax.SAXException
public java.util.List<org.w3c.dom.Element> processBody(com.fasterxml.jackson.databind.JsonNode params, java.lang.String method) throws javax.xml.stream.XMLStreamException, org.xml.sax.SAXException, java.io.IOException
params
- params member of the JSON-RPC requestmethod
- The method that the JSON-RPC request callsjavax.xml.stream.XMLStreamException
java.io.IOException
org.xml.sax.SAXException
private void setDefaultNamespace(org.w3c.dom.Element element)
element
- An XML elementprivate org.w3c.dom.Element convertToXml(com.fasterxml.jackson.databind.JsonNode node, java.lang.String rootName) throws javax.xml.stream.XMLStreamException, java.io.IOException, org.xml.sax.SAXException
node
- JsonNode to be convertedrootName
- String to be written as the root for Xmljavax.xml.stream.XMLStreamException
java.io.IOException
org.xml.sax.SAXException