public string SendBill(string invoiceId) { var invoice = _repository.GetInvoice(invoiceId); var fileName = "20100066603-01-F001-1"; var envelope = _repository.GetEnvelope(GetEnvelopeOptions(fileName)); var request = _requestManager.CreateWebRequest(GetRequestOptions()); string soapStr = _serializer.Serialize(envelope, null, NameSpaces.GetEnvelopeNamespaces(), true); string invoiceStr = _serializer.Serialize(invoice, NameSpaces.DEFAULT, NameSpaces.GetInvoiceNamespaces()); var zippedBytes = _zipper.Zip(fileName, invoiceStr); var soapBuilderRequest = GetSoapBuilderRequest(request, soapStr, zippedBytes, fileName); //updates the web request with encoding, soap header, file content. _soapBuilder.Build(soapBuilderRequest); return(_client.SendBill(request)); }