Link to home
Start Free TrialLog in
Avatar of jkavx
jkavx

asked on

Java Equivalent of C# HttpAgent

We need to convert a C# application to Java.  What would the Java equivalent of this C# code  be:

String sXmlRequest = "...";
String sUrl = "...";
String sCertificate = "...";
Fmr.Commons.Web.Http.HttpAgent obj = new HttpAgent();
Fmr.Commons.Web.Http.HttpAgentRequest objRequest = new HttpAgentRequest();
Fmr.Commons.Web.Http.HttpConnectionOverride objConnectionOverride = new HttpConnectionOverride();
Fmr.Commons.Web.Http.HttpAgentResponse objResponse = new HttpAgentResponse();
objRequest.SendData = sXmlRequest;
objRequest.ContentType = "text/xml";
objRequest.KeepAlive = KeepAliveType.Persisted;
objConnectionOverride.Host = sUrl;
objConnectionOverride.SslStore = sCertificate;
String xmlResponse = obj.Request(objRequest, objConnectionOverride).Text.TrimStart();
SOLUTION
Avatar of plusone3055
plusone3055
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial