PSEK-Fitnesse-Fixtures  2.3.x (JDK11)
nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture Class Reference

A very basic fixture that can send a SOAP message, no validation of the sent message, can be used to test the response of your testobject to invalid input. More...

Public Member Functions

 SimpleSoapFixture ()
 Instantiates a new Simple soap fixture. More...
 
void disablelogMessagesToSystemOut ()
 Disablelog messages to system out. More...
 
void enablelogMessagesToSystemOut ()
 Enablelog messages to system out. More...
 
String getResponseXmlString ()
 Returns the xml response. More...
 
String getResponseXmlStringCleaned ()
 Cleans - unescapes - the xml reponse and returns it. More...
 
boolean loadSoapMessageFromFile (String fileName, String encoding) throws IOException, SOAPException
 Load soap message from file boolean. More...
 
boolean loadSoapMessageFromString (String xml) throws IOException
 Load soap message from string boolean. More...
 
boolean loadSoapMessageFromString (String xml, String encoding) throws IOException
 Load soap message from string boolean. More...
 
void sendSoapMessage (String url) throws SOAPException, IOException
 Send soap message. More...
 

Static Public Member Functions

static String tidyXml (String xml)
 Tidy xml string. More...
 

Static Public Attributes

static final boolean TIDY_XML = true
 The constant TIDY_XML. More...
 

Private Member Functions

void closeSoapConnection () throws SOAPException
 
void logErrorToSystemOut (Exception e)
 
void logRequestToSystemOut () throws IOException, SOAPException
 
void logResponseToSystemOut () throws IOException, SOAPException
 
String readFromInputStream (InputStream inputStream) throws IOException
 
void storeResponseAsString ()
 

Private Attributes

boolean enableSystemOutLog = false
 
SOAPMessage request
 
String responseXmlString
 
SOAPConnection soapConnection
 
SOAPMessage soapResponse
 

Static Private Attributes

static final Logger LOG = LoggerFactory.getLogger(SimpleSoapFixture.class)
 

Detailed Description

A very basic fixture that can send a SOAP message, no validation of the sent message, can be used to test the response of your testobject to invalid input.

Created by pascal on 22/06/16.

Definition at line 27 of file SimpleSoapFixture.java.

Constructor & Destructor Documentation

◆ SimpleSoapFixture()

nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.SimpleSoapFixture ( )

Instantiates a new Simple soap fixture.

Definition at line 44 of file SimpleSoapFixture.java.

Member Function Documentation

◆ closeSoapConnection()

void nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.closeSoapConnection ( ) throws SOAPException
private

Definition at line 169 of file SimpleSoapFixture.java.

◆ disablelogMessagesToSystemOut()

void nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.disablelogMessagesToSystemOut ( )

Disablelog messages to system out.

Definition at line 185 of file SimpleSoapFixture.java.

◆ enablelogMessagesToSystemOut()

void nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.enablelogMessagesToSystemOut ( )

Enablelog messages to system out.

Definition at line 177 of file SimpleSoapFixture.java.

◆ getResponseXmlString()

String nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.getResponseXmlString ( )

Returns the xml response.

Returns
string xml

Definition at line 154 of file SimpleSoapFixture.java.

◆ getResponseXmlStringCleaned()

String nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.getResponseXmlStringCleaned ( )

Cleans - unescapes - the xml reponse and returns it.

Returns
string xml

Definition at line 165 of file SimpleSoapFixture.java.

◆ loadSoapMessageFromFile()

boolean nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.loadSoapMessageFromFile ( String  fileName,
String  encoding 
) throws IOException, SOAPException

Load soap message from file boolean.

Parameters
fileNamethe file name
encodingthe encoding
Returns
the boolean
Exceptions
IOExceptionthe io exception
SOAPExceptionthe soap exception

Definition at line 105 of file SimpleSoapFixture.java.

◆ loadSoapMessageFromString() [1/2]

boolean nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.loadSoapMessageFromString ( String  xml) throws IOException

Load soap message from string boolean.

Parameters
xmlthe xml
Returns
the boolean
Exceptions
IOExceptionthe io exception

Definition at line 70 of file SimpleSoapFixture.java.

◆ loadSoapMessageFromString() [2/2]

boolean nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.loadSoapMessageFromString ( String  xml,
String  encoding 
) throws IOException

Load soap message from string boolean.

Parameters
xmlthe xml
encodingthe encoding
Returns
the boolean
Exceptions
IOExceptionthe io exception

Definition at line 83 of file SimpleSoapFixture.java.

◆ logErrorToSystemOut()

void nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.logErrorToSystemOut ( Exception  e)
private

Definition at line 205 of file SimpleSoapFixture.java.

◆ logRequestToSystemOut()

void nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.logRequestToSystemOut ( ) throws IOException, SOAPException
private

Definition at line 189 of file SimpleSoapFixture.java.

◆ logResponseToSystemOut()

void nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.logResponseToSystemOut ( ) throws IOException, SOAPException
private

Definition at line 197 of file SimpleSoapFixture.java.

◆ readFromInputStream()

String nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.readFromInputStream ( InputStream  inputStream) throws IOException
private

Definition at line 211 of file SimpleSoapFixture.java.

◆ sendSoapMessage()

void nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.sendSoapMessage ( String  url) throws SOAPException, IOException

Send soap message.

Parameters
urlthe url
Exceptions
SOAPExceptionthe soap exception
IOExceptionthe io exception

Definition at line 121 of file SimpleSoapFixture.java.

◆ storeResponseAsString()

void nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.storeResponseAsString ( )
private

Definition at line 135 of file SimpleSoapFixture.java.

◆ tidyXml()

static String nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.tidyXml ( String  xml)
static

Tidy xml string.

Parameters
xmlthe xml
Returns
the string

Definition at line 54 of file SimpleSoapFixture.java.

Member Data Documentation

◆ enableSystemOutLog

boolean nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.enableSystemOutLog = false
private

Definition at line 38 of file SimpleSoapFixture.java.

◆ LOG

final Logger nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.LOG = LoggerFactory.getLogger(SimpleSoapFixture.class)
staticprivate

Definition at line 33 of file SimpleSoapFixture.java.

◆ request

SOAPMessage nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.request
private

Definition at line 35 of file SimpleSoapFixture.java.

◆ responseXmlString

String nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.responseXmlString
private

Definition at line 37 of file SimpleSoapFixture.java.

◆ soapConnection

SOAPConnection nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.soapConnection
private

Definition at line 34 of file SimpleSoapFixture.java.

◆ soapResponse

SOAPMessage nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.soapResponse
private

Definition at line 36 of file SimpleSoapFixture.java.

◆ TIDY_XML

final boolean nl.psek.fitnesse.fixtures.webservice.SimpleSoapFixture.TIDY_XML = true
static

The constant TIDY_XML.

Definition at line 32 of file SimpleSoapFixture.java.


The documentation for this class was generated from the following file: