Example #1
0
 private TISWebServiceSoapClient GetClient()
 {
     TISWebService.TISWebServiceSoapClient client = new TISWebService.TISWebServiceSoapClient();
     // Increase Message Size Quota
     (client.Endpoint.Binding as BasicHttpBinding).MaxReceivedMessageSize = 2147483647;
     (client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize          = 2147483647;
     return(client);
 }
Example #2
0
        private async Task <StateDataViewModel> GetStateDataAsync(TISWebServiceGetStateSupportIN stateIn)
        {
            GetStateResponse result = new GetStateResponse();

            using (TISWebService.TISWebServiceSoapClient client = GetClient())
                using (var scope = new FlowingOperationContextScope(client.InnerChannel))
                {
                    OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = CreateRequestMessageProperty();
                    string strIn = DCSerializer.SerializeWithDCS(stateIn);
                    try
                    {
                        var webResponse = await client.GetStateAsync(strIn).ContinueOnScope(scope);

                        return(GetStateData(webResponse.Body));
                    }
                    catch (Exception ex)
                    {
                        return(new StateDataViewModel {
                            Error = ex.Message
                        });
                    }
                }
        }
Example #3
0
 private TISWebServiceSoapClient GetClient()
 {
     TISWebService.TISWebServiceSoapClient client = new TISWebService.TISWebServiceSoapClient();
     // Increase Message Size Quota
     (client.Endpoint.Binding as BasicHttpBinding).MaxReceivedMessageSize = 2147483647;
     (client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = 2147483647;
    return client;
 }