/// <summary>
        /// Retrieve a list of Sealed Messages.
        /// </summary>
        /// <param name="retrieveRequest">The parameters for the retrieve operation.</param>
        /// <param name="endpointUrl">The endpoint URL for the SMR service.</param>
        /// <returns>A list of Sealed Messages.</returns>
        public SealedMessageType[] Retrieve(retrieve retrieveRequest, Uri endpointUrl)
        {
            Validation.ValidateArgumentRequired("retrieveRequest", retrieveRequest);
            Validation.ValidateArgumentRequired("endpointUrl", endpointUrl);

            Validation.ValidateArgumentRequired("retrieveRequest.receiverOrganisation", retrieveRequest.receiverOrganisation);
            Validation.ValidateArgumentRequired("retrieveRequest.invocationId", retrieveRequest.invocationId);

            if (smrClient is Nehta.SMD2010.SMR.SealedMessageRetrievalClient)
            {
                Nehta.SMD2010.SMR.SealedMessageRetrievalClient client = (Nehta.SMD2010.SMR.SealedMessageRetrievalClient)smrClient;
                client.Endpoint.Address = new EndpointAddress(endpointUrl);
            }

            retrieveRequest request = new retrieveRequest();

            request.retrieve = retrieveRequest;

            retrieveResponse response = smrClient.retrieve(request);

            if (response != null)
            {
                return(response.retrieveResponse1);
            }
            else
            {
                throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse);
            }
        }
        /// <summary>
        /// Retrieve a list of Transport Responses.
        /// </summary>
        /// <param name="retrieveRequest">The parameters for the retrieve operation.</param>
        /// <param name="endpointUrl">The endpoint URL for the TRR service.</param>
        /// <returns>A list of available responses.</returns>
        public TransportResponseListType Retrieve(retrieve retrieveRequest, Uri endpointUrl)
        {
            Validation.ValidateArgumentRequired("retrieveRequest", retrieveRequest);
            Validation.ValidateArgumentRequired("endpointUrl", endpointUrl);

            Validation.ValidateArgumentRequired("retrieveRequest.organisation", retrieveRequest.organisation);

            if (trrClient is Nehta.SMD2010.TRR.TransportResponseRetrievalClient)
            {
                Nehta.SMD2010.TRR.TransportResponseRetrievalClient client = (Nehta.SMD2010.TRR.TransportResponseRetrievalClient)trrClient;
                client.Endpoint.Address = new EndpointAddress(endpointUrl);
            }

            retrieveRequest request = new retrieveRequest();

            request.retrieve = retrieveRequest;

            retrieveResponse1 response = trrClient.retrieve(request);

            if (response != null && response.retrieveResponse != null)
            {
                return(response.retrieveResponse.list);
            }
            else
            {
                throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse);
            }
        }