|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SourceUtil
Contains utilities for the Source management.
| Method Summary | |
|---|---|
Document |
createDocument(Source source)
Create a Document from a Source. |
Document |
createDocument(Source source,
boolean forkSource)
Create a Document from a Source. |
DOMSource |
createDOMSource(Document document)
Create a DOM Source from the DOM document. |
Document |
createSoapFaultDocument(Throwable e,
QName errorCode)
Creates an SOAP fault, as a DOM document, according to provided exception and code: <s:Fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> |
Source |
createSource(String message)
Create a Source from the String. |
Source |
createSource(String message,
String charFormat)
Create a Source from the String with a specified encoding format. |
StreamSource |
createStreamSource(Document document)
Create a Stream Source from the DOM document. |
String |
createString(Source source)
Create a String from a Source. |
String |
createString(Source source,
boolean forkSource)
Create a String from a Source. |
boolean |
isDOM3(Document document)
Test if the document is a DOM3 document |
| Method Detail |
|---|
Document createSoapFaultDocument(Throwable e,
QName errorCode)
Creates an SOAP fault, as a DOM document, according to provided exception
and code:
<s:Fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>{org.objectweb.petals}ERROR</faultcode>
<faultstring>mesage</faultstring>
<faultactor>component</faultactor>
<detail>
...
</detail>
<s:Fault>
If the provided exception is an instance of DocumentException:
FaultException.getFaultCode(),Throwable.getMessage(),FaultException.getFaultActor(),DocumentException.getDocument().
If the provided exception is an instance of FaultException:
FaultException.getFaultCode(),Throwable.getMessage(),FaultException.getFaultActor(),<stackTrace>.otherwise:
errorCode,Throwable.getMessage(),null,<stackTrace>.
e - An exception used to provide faultstring and detailerrorCode - The QName of the fault code. It is not used if the exception
is an instance of FaultException or
DocumentException.
Source createSource(String message)
throws PEtALSCDKException
message - a valid XML String
PEtALSCDKException - if an error occurs during Source creation
Source createSource(String message,
String charFormat)
throws PEtALSCDKException
message - a valid XML StringcharFormat - the encoding format, must be non null
PEtALSCDKException - if an error occurs during Source creationDOMSource createDOMSource(Document document)
document - A DOM document
StreamSource createStreamSource(Document document)
throws PEtALSCDKException
document - A DOM document
PEtALSCDKException
Document createDocument(Source source)
throws PEtALSCDKException
Document from a Source. StreamSource, the source would be still
available.DomSource and contains a Document,
the returned document is a clone of this document.
source - the Source
PEtALSCDKException
Document createDocument(Source source,
boolean forkSource)
throws PEtALSCDKException
Document from a Source. StreamSource and forkSource is set to
true, the source would be still available. Otherwise the source
is no more available.DomSource and contains a Document and
forkSource is set to true, the returned document is a
clone of this document. Otherwise the original Document is
returned.
source - the SourceforkSource - true to fork the content of the source if necessary
PEtALSCDKException
String createString(Source source)
throws PEtALSCDKException
String from a Source.StreamSource, the source would be still
available.
source - the Source
PEtALSCDKException
String createString(Source source,
boolean forkSource)
throws PEtALSCDKException
String from a Source.StreamSource and forkSource is set to
true, the source would be still available. Otherwise the source
is no more available.
source - the Source
PEtALSCDKExceptionboolean isDOM3(Document document)
document - the document to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||