public TrustSignMessage send(TrustSignMessage request)
throw new ESignException("Input Request cannot be null");
text = ObjectConversion.GetXMLFromObject(request);
throw new ESignException("Failed to get XML from input. " + ex.Message);
string text2 = verifyXML(text);
if (!string.IsNullOrEmpty(text2))
throw new ESignException("Failed to verify Request xml representation. " + text2);
XMLSigner xMLSigner = new XMLSigner(context.getKeystore());
text = ObjectConversion.RemoveNamespace(text);
text4 = xMLSigner.signXML(ObjectConversion.CreateXMLDocumentFromString(text));
throw new ESignException("Failed to sign Request XML. " + ex2.Message);
HTTPResponse hTTPResponse = new HTTPClient().post(context.getDhcConfig(), Encoding.UTF8.GetBytes(text4));
if (hTTPResponse.getStatus() > 200)
throw new ESignException("Failed to communicate to [" + context.getEnv().getUrl() + "] Error returned: " + hTTPResponse.getContent() + " - " + hTTPResponse.getStatus() + " - " + hTTPResponse.getStatusText());
text3 = hTTPResponse.getContent();
throw new ESignException("An unexpected error occured communicating with the ESign infrastructure: " + ex3.Message);
string text5 = verifyXML(text3);
if (!string.IsNullOrEmpty(text5))
throw new ESignException("Failed to verify response xml. " + text5);
ObjectConversion.CreateXMLDocumentFromString(text3);
throw new ESignException("Failed to verify response xml. " + ex4.Message);
return ObjectConversion.DeserializeFromXml<TrustSignMessage>(text3);