OSCI2-StarterKit


eu.osci.messagetypes
Class OSCIRequest

java.lang.Object
  extended by eu.osci.messagetypes.OSCIMessage
      extended by eu.osci.messagetypes.OSCIRequestParent
          extended by eu.osci.messagetypes.OSCIRequest
Direct Known Subclasses:
ReceptionReceipt

public class OSCIRequest
extends OSCIRequestParent

This class represents the OSCIRequest message. It will send the correct OSCI SOAP message, parses the incoming SOAP message and creates the object structure.
Copyright © 2010 Freie Hansestadt Bremen.
Created by bremen online services Entwicklungs- und Betriebsgesellschaft mbH & Co. KG.
This library (Starter Kit) can be used by anybody according to the Bremer Lizenz für freie Softwarebibliotheken. The license terms can be viewed at www.osci.de or can be ordered at the OSCI-Leitstelle (Die Senatorin für Finanzen, Freie Hansestadt Bremen, Postfach 10 15 40, 28015 Bremen).


Field Summary
 
Fields inherited from class eu.osci.messagetypes.OSCIMessage
text
 
Constructor Summary
OSCIRequest(EndpointLocator endpointLocator, javax.xml.ws.WebServiceFeature... _features)
          Constructor for endpointLocator parameter with all necessary information.
OSCIRequest(OSCIRequestParent parent)
          The constructor should be used in case of multiple OSCI messages.
OSCIRequest(java.net.URL _wsdlURL, javax.xml.namespace.QName _serviceQName, javax.xml.namespace.QName _portQName, javax.xml.ws.WebServiceFeature... _features)
          Constructor with the necessary parameters.
 
Method Summary
 void addCompoundResult(org.w3._2002._03.xkms.CompoundResultType compoundResultType)
          Adds a certificate check result.
 void addRelatesTo(org.w3._2005._08.addressing.RelatesToType _relatesTo)
          Sets the addressing 'RelatesTo' attribute on the OSCI message.
 java.util.List<org.w3._2002._03.xkms.CompoundResultType> getCompoundResult()
          Returns a List of the check results of the certificate checks.
 eu.osci.ws._2008._05.transport.DeliveryReceiptDemandType getDeliveryReceiptDemand()
          Returns the OSCI DeliveryReceiptDemand header.
 eu.osci.ws._2008._05.transport.FetchedNotificationDemandType getFetchedNotificationDemand()
          Returns the FetchedNotificationDemand if existing.
 org.w3._2005._08.addressing.MetadataType getMetaData()
          Returns the set MetaDataType of the incoming message.
 eu.osci.ws._2008._05.transport.MsgTimeStampsType getMsgTimeStamps()
          Returns the set MsgTimeStampsType or the MsgTimeStampsType of the incoming message in case of synchronous messages.
 java.util.Date getObsoleteAfter()
          Returns the date of the configured expire time of the OSCI message.
 eu.osci.ws._2008._05.transport.ReceptionReceiptDemandType getReceptionReceiptDemand()
          Returns the set ReceptionReceiptDemand header element.
 java.util.List<org.w3._2005._08.addressing.RelatesToType> getRelatesTo()
          Returns the set addressing 'RelatesTo' attribute.
 org.oasis_open.docs.ws_sx.ws_trust._200512.RequestSecurityTokenResponseCollectionType getRequestSecurityTokenResponseCollectionType()
          Returns the OneTimeTokens for the receipts.
 eu.osci.ws._2008._05.transport.X509TokenContainerType getX509TokenContainer()
          Returns the OSCI 'X509TokenContainer' including the certificates to check on the transfer way.
 OSCIResponse sendMessage(java.io.InputStream content)
          Sends the configured OSCI message with the given stream.
 void setCompoundResult(java.util.List<org.w3._2002._03.xkms.CompoundResultType> _compoundResult)
          Sets a List of XKMS check results on the OSCI message.
 void setDeliveryReceiptDemand()
          Adds a DeliveryReceiptDemand OSCI header with default parameter to the OSCI message.
 void setDeliveryReceiptDemand(boolean echoRequest, boolean qualifiedTSP, java.lang.String eprURI)
          Adds a DeliveryReceiptDemand OSCI header with the given parameter to the OSCI message.
 void setDeliveryReceiptDemand(eu.osci.ws._2008._05.transport.DeliveryReceiptDemandType _deliveryReceiptDemand)
          Sets the given OSCI DeliveryReceiptDemand to make a request for a DeliveryReceipt.
 void setFetchedNotificationDemand(eu.osci.ws._2008._05.transport.FetchedNotificationDemandType _fetchedNotiDemand)
          Sets the given OSCI FetchedNotificationDemand element as SOAP header.
 void setFetchedNotificationDemand(java.lang.String eprURI)
          Adds a FetchedNotificationDemand OSCI header with the given parameter to the OSCI message.
 void setFetchedNotificationDemand(java.lang.String eprURI, OSCIRequestAction businessScenario)
          Adds a FetchedNotificationDemand OSCI header with the given parameter to the OSCI message.
 void setMsgTimeStamps(eu.osci.ws._2008._05.transport.MsgTimeStampsType _msgTime)
          Sets the given MsgTimeStampsType object as part of the outgoing OSCI message.
 void setObsoleteAfter(java.util.Date expireDate)
          Sets the date of the expire time of the OSCI message that will be send.
 void setReceptionReceiptDemand(boolean echoRequest, boolean qualifiedTSP, java.lang.String eprURI)
          Adds a ReceptionReceiptDemand OSCI header with the given parameter to the OSCI message.
 void setReceptionReceiptDemand(eu.osci.ws._2008._05.transport.ReceptionReceiptDemandType _receptionReceiptDemand)
          Better use the method setReceptionReceiptDemand(boolean, boolean, String) to set a ReceptionReceiptDemand header.
 void setReplyTo(org.w3._2005._08.addressing.EndpointReferenceType _replyTo)
          Sets the addressing 'ReplyTo' attribute on the OSCI message.
 void setRequestSecurityTokenResponseCollectionType(org.oasis_open.docs.ws_sx.ws_trust._200512.RequestSecurityTokenResponseCollectionType _rstrCol)
          Sets the OneTimeTokens for the receipts.
 void setX509TokenContainer(eu.osci.ws._2008._05.transport.X509TokenContainerType _tokenContainer)
          Sets the certificates that will be checked on the transfer way.
 
Methods inherited from class eu.osci.messagetypes.OSCIRequestParent
getFaultTo, getFetchIteratorID, getFrom, getReplyTo, getTypeOfBusinessScenario, setFaultTo, setFrom, setTypeOfBusinessScenario
 
Methods inherited from class eu.osci.messagetypes.OSCIMessage
getAction, getAdditionalHeaderList, getBindingProvider, getMessageId, getTo, setAction, setAdditionalHeaderList, setMessageId, setTo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSCIRequest

public OSCIRequest(OSCIRequestParent parent)
The constructor should be used in case of multiple OSCI messages. If a OSCIMsgBoxFetchRequest , OSCIMsgBoxGetNextRequest and then a OSCIMsgBoxCloseRequest will be sent, then the previous OSCI message could be given to this constructor because the configuration is the same.

Parameters:
parent - Previous OSCI message in the same sequence.

OSCIRequest

public OSCIRequest(EndpointLocator endpointLocator,
                   javax.xml.ws.WebServiceFeature... _features)
Constructor for endpointLocator parameter with all necessary information.

Parameters:
endpointLocator - The configured endpointLocator object.
_features - To add other features for the endpoint (see Metro Api-Doc).

OSCIRequest

public OSCIRequest(java.net.URL _wsdlURL,
                   javax.xml.namespace.QName _serviceQName,
                   javax.xml.namespace.QName _portQName,
                   javax.xml.ws.WebServiceFeature... _features)
Constructor with the necessary parameters. The URL to WSDL is given and the service and port out of it.

Parameters:
_wsdlURL - The URL to the WSDL.
_serviceQName - The service that will be used.
_portQName - The port name that will be used
_features - To add other features for the endpoint (see Metro Api-Doc).
Method Detail

getRequestSecurityTokenResponseCollectionType

public org.oasis_open.docs.ws_sx.ws_trust._200512.RequestSecurityTokenResponseCollectionType getRequestSecurityTokenResponseCollectionType()
Returns the OneTimeTokens for the receipts.

Returns:
A collection of RSTRs.

setRequestSecurityTokenResponseCollectionType

public void setRequestSecurityTokenResponseCollectionType(org.oasis_open.docs.ws_sx.ws_trust._200512.RequestSecurityTokenResponseCollectionType _rstrCol)
Sets the OneTimeTokens for the receipts.

Parameters:
_rstrCol - The RSTRs for the OneTimeToken.

sendMessage

public OSCIResponse sendMessage(java.io.InputStream content)
                         throws javax.xml.bind.JAXBException,
                                OSCIException
Sends the configured OSCI message with the given stream. All the header will be added to the SOAP message and the given stream will set as given (without transformation) into the body element of the SOAP message.

Parameters:
content - The body stream to put into the SOAP message.
Returns:
The OSCI response of the related request.
Throws:
javax.xml.bind.JAXBException - In the case of parsing or serialisation errors.
OSCIException - In the case of OSCI SOAP faults.

setReplyTo

public void setReplyTo(org.w3._2005._08.addressing.EndpointReferenceType _replyTo)
Sets the addressing 'ReplyTo' attribute on the OSCI message. Including the URL for reply messages.
Be careful with this setter because if the framework will put a 'ReplyTo' header into the SOAP message there will be two headers available.

Parameters:
_replyTo - The 'ReplyTo' attribute.

getRelatesTo

public java.util.List<org.w3._2005._08.addressing.RelatesToType> getRelatesTo()
Returns the set addressing 'RelatesTo' attribute.


addRelatesTo

public void addRelatesTo(org.w3._2005._08.addressing.RelatesToType _relatesTo)
Sets the addressing 'RelatesTo' attribute on the OSCI message. Including a previous messageId.

Parameters:
_relatesTo - The relatesTo attribute.

getX509TokenContainer

public eu.osci.ws._2008._05.transport.X509TokenContainerType getX509TokenContainer()
Returns the OSCI 'X509TokenContainer' including the certificates to check on the transfer way.

Returns:
The list of certificates that will be checked.

setX509TokenContainer

public void setX509TokenContainer(eu.osci.ws._2008._05.transport.X509TokenContainerType _tokenContainer)
Sets the certificates that will be checked on the transfer way.

Parameters:
_tokenContainer - The list of certificates that will be checked.

getReceptionReceiptDemand

public eu.osci.ws._2008._05.transport.ReceptionReceiptDemandType getReceptionReceiptDemand()
Returns the set ReceptionReceiptDemand header element.


setReceptionReceiptDemand

public void setReceptionReceiptDemand(eu.osci.ws._2008._05.transport.ReceptionReceiptDemandType _receptionReceiptDemand)
Better use the method setReceptionReceiptDemand(boolean, boolean, String) to set a ReceptionReceiptDemand header.

Parameters:
_receptionReceiptDemand - The preconfigured ReceptionReceiptDemand header.

getFetchedNotificationDemand

public eu.osci.ws._2008._05.transport.FetchedNotificationDemandType getFetchedNotificationDemand()
Returns the FetchedNotificationDemand if existing.

Returns:
The OSCI FetchedNotificationDemand header.

addCompoundResult

public void addCompoundResult(org.w3._2002._03.xkms.CompoundResultType compoundResultType)
Adds a certificate check result.

Parameters:
compoundResultType - The XKMS result of a certificate check.

getCompoundResult

public java.util.List<org.w3._2002._03.xkms.CompoundResultType> getCompoundResult()
Returns a List of the check results of the certificate checks.


setCompoundResult

public void setCompoundResult(java.util.List<org.w3._2002._03.xkms.CompoundResultType> _compoundResult)
Sets a List of XKMS check results on the OSCI message.

Parameters:
_compoundResult - A List of XKMS results.

setFetchedNotificationDemand

public void setFetchedNotificationDemand(eu.osci.ws._2008._05.transport.FetchedNotificationDemandType _fetchedNotiDemand)
Sets the given OSCI FetchedNotificationDemand element as SOAP header. Better use the method setFetchedNotificationDemand(String) or setFetchedNotificationDemand(String eprURI, OSCIRequestAction businessScenario)to set a FetchedNotificationDemand header.

Parameters:
_fetchedNotiDemand - The FetchedNotificationDemand object.

getDeliveryReceiptDemand

public eu.osci.ws._2008._05.transport.DeliveryReceiptDemandType getDeliveryReceiptDemand()
Returns the OSCI DeliveryReceiptDemand header.


setDeliveryReceiptDemand

public void setDeliveryReceiptDemand(eu.osci.ws._2008._05.transport.DeliveryReceiptDemandType _deliveryReceiptDemand)
Sets the given OSCI DeliveryReceiptDemand to make a request for a DeliveryReceipt. The DeliveryReceiptDemandType object must be created from the user on its own. Better use the method setDeliveryReceiptDemand(boolean, boolean, String) or setDeliveryReceiptDemand() to set a DeliveryReceiptDemand header.

Parameters:
_deliveryReceiptDemand - The DeliveryReceiptDemand.

setReceptionReceiptDemand

public void setReceptionReceiptDemand(boolean echoRequest,
                                      boolean qualifiedTSP,
                                      java.lang.String eprURI)
Adds a ReceptionReceiptDemand OSCI header with the given parameter to the OSCI message.

Parameters:
echoRequest - If this value is true the whole OSCI message will be returned in the receipt.
qualifiedTSP - If this value is true the time stamp or the receipt will be qualified.
eprURI - The URI where the receipt will be received.

setDeliveryReceiptDemand

public void setDeliveryReceiptDemand(boolean echoRequest,
                                     boolean qualifiedTSP,
                                     java.lang.String eprURI)
Adds a DeliveryReceiptDemand OSCI header with the given parameter to the OSCI message.

Parameters:
echoRequest - If this value is true the whole OSCI message will be returned in the receipt.
qualifiedTSP - If this value is true the time stamp or the receipt will be qualified.
eprURI - The URI where the receipt will be received.

setDeliveryReceiptDemand

public void setDeliveryReceiptDemand()
Adds a DeliveryReceiptDemand OSCI header with default parameter to the OSCI message. As URI 'anonymous' will be used and the receipt will be sent in the back channel


setFetchedNotificationDemand

public void setFetchedNotificationDemand(java.lang.String eprURI)
Adds a FetchedNotificationDemand OSCI header with the given parameter to the OSCI message.

Parameters:
eprURI - URI for the FetchNotification to send to.

setFetchedNotificationDemand

public void setFetchedNotificationDemand(java.lang.String eprURI,
                                         OSCIRequestAction businessScenario)
Adds a FetchedNotificationDemand OSCI header with the given parameter to the OSCI message.

Parameters:
eprURI - URI for the FetchNotification to send to.
businessScenario - Type of businessScenario to use for the receipt.

getObsoleteAfter

public java.util.Date getObsoleteAfter()
Returns the date of the configured expire time of the OSCI message.


setObsoleteAfter

public void setObsoleteAfter(java.util.Date expireDate)
                      throws javax.xml.datatype.DatatypeConfigurationException
Sets the date of the expire time of the OSCI message that will be send.

Parameters:
expireDate - The date to set the time when the message will expire.
Throws:
javax.xml.datatype.DatatypeConfigurationException - In the case of format exceptions.

getMsgTimeStamps

public eu.osci.ws._2008._05.transport.MsgTimeStampsType getMsgTimeStamps()
Returns the set MsgTimeStampsType or the MsgTimeStampsType of the incoming message in case of synchronous messages.


setMsgTimeStamps

public void setMsgTimeStamps(eu.osci.ws._2008._05.transport.MsgTimeStampsType _msgTime)
Sets the given MsgTimeStampsType object as part of the outgoing OSCI message. If an obsolateAfter value will be set this value has higher priority.

Parameters:
_msgTime - The configured object that will be set.

getMetaData

public org.w3._2005._08.addressing.MetadataType getMetaData()
Returns the set MetaDataType of the incoming message.


OSCI2-StarterKit


Copyright © 2010 Freie Hansestadt Bremen.