|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activesoap.handler.SoapRequestHandler
A processor of a single SOAP request which is discarded after it has completed the request.
This object parsers the SOAP envelope using StAX
then delegates the processing of each header element and body element to a separate Handler
,
which will typically be XMLBeans but could be anything such as SAX, TrAX, XStream, JAXB,
a JAX-RPC handler, Axis, XFire etc.
Field Summary |
Fields inherited from interface javax.xml.stream.XMLStreamConstants |
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Constructor Summary | |
SoapRequestHandler(SoapService service,
SoapVersion soap)
|
Method Summary | |
protected void |
checkHeaderElementWritten(XMLStreamWriter out)
|
protected XMLStreamWriter |
close(XMLStreamWriter out)
|
protected void |
ensureClosed(XMLStreamWriter out)
|
protected void |
fireOnComplete()
lets notify the lifecycles of interested handlers |
Set |
getHandlersUsed()
|
protected String |
getNameText(QName name)
Returns the Qname as a name, typically as 'prefix:localPart' unless there is no prefix in which case just the 'localPart' is returned. |
protected void |
handleException(XMLStreamWriter out,
Exception e)
|
protected boolean |
hasRole(String role)
|
void |
invoke(MessageExchange exchange)
Handles the processing of an XML message which is typically a SOAP body element or header element but could be an entire REST XML service. |
protected boolean |
isNextRole(String role)
|
boolean |
isStrict()
|
protected boolean |
isTrue(String prefix,
String value)
Return true if the attribute is not null and contains 'true' |
protected boolean |
isUltimateReceiver(String role)
|
protected void |
processBody(XMLStreamWriter out)
|
protected void |
processHeaders(XMLStreamWriter out)
|
void |
setStrict(boolean strict)
|
protected void |
skipToElementStart(String expected)
|
protected void |
skipToEndOfTag(QName name)
|
protected boolean |
skipToHeader()
|
protected void |
skipToStartBodyElement()
|
protected void |
skipToStartElement(String expected)
|
protected void |
validateEncodingStyle(String encodingStyle)
Throws a SoapFault if the encoding style is not supported |
protected SoapFault |
validateEnvelope(String namespace)
|
protected void |
writeFault(XMLStreamWriter out,
SoapFault fault)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SoapRequestHandler(SoapService service, SoapVersion soap)
Method Detail |
public void invoke(MessageExchange exchange) throws Exception
Handler
invoke
in interface Handler
exchange
- is the message exchange which can be used to accesss message-specific attributes
to communicate between different handlers in a loose coupled way or to access service specific details
such as the SOAP roles and encodings etc.
Exception
public boolean isStrict()
public void setStrict(boolean strict)
public Set getHandlersUsed()
protected void processHeaders(XMLStreamWriter out) throws Exception
Exception
protected boolean hasRole(String role)
protected boolean isNextRole(String role)
protected boolean isUltimateReceiver(String role)
protected SoapFault validateEnvelope(String namespace)
protected void checkHeaderElementWritten(XMLStreamWriter out) throws XMLStreamException
XMLStreamException
protected void processBody(XMLStreamWriter out) throws Exception
Exception
protected void fireOnComplete() throws Exception
Exception
protected void validateEncodingStyle(String encodingStyle) throws SoapFault
SoapFault
if the encoding style is not supported
SoapFault
protected void writeFault(XMLStreamWriter out, SoapFault fault) throws XMLStreamException
XMLStreamException
protected void handleException(XMLStreamWriter out, Exception e) throws XMLStreamException
XMLStreamException
protected String getNameText(QName name)
protected void ensureClosed(XMLStreamWriter out)
protected XMLStreamWriter close(XMLStreamWriter out) throws XMLStreamException
XMLStreamException
protected boolean isTrue(String prefix, String value) throws SoapFault
SoapFault
protected boolean skipToHeader() throws XMLStreamException
XMLStreamException
protected void skipToStartBodyElement() throws XMLStreamException, SoapFault
XMLStreamException
SoapFault
protected void skipToElementStart(String expected) throws XMLStreamException
XMLStreamException
protected void skipToStartElement(String expected) throws XMLStreamException
XMLStreamException
protected void skipToEndOfTag(QName name) throws XMLStreamException
XMLStreamException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |