i manage to consume the soap services, would like to check how about the JSON ? i have add in the JSON message type in to server channel. Below is my test in client program:
protected void btnSoap_Click(object sender, EventArgs e)
{
System.ServiceModel.Channels.Binding b = (System.ServiceModel.BasicHttpBinding)Activator.CreateInstance(typeof(System.ServiceModel.BasicHttpBinding));
System.ServiceModel.EndpointAddress eAddress = new System.ServiceModel.EndpointAddress(“http://localhost:8099/soap”);
soapServices.ROServer1ServiceClient iTest = new soapServices.ROServer1ServiceClient(b, eAddress);
var msgHeader = new soapServices.ROClientIDHeader();
msgHeader.ID = String.Concat("{", Guid.NewGuid().ToString(), "}");
var result = iTest.GetServerTime(ref msgHeader);
txtResultSOAP.Text = result.ToString();
}
You’d need to compose a requiest JSON string, send it to the server at http://[servername]:[serverport]/json (using .NET WebClient or similar class), then get back a response JSON string and parse it.
http://json2csharp.com/ can help you to generate .NET classes that match the provided JSON string.
Requested JSON string formats can be viewed using Fiddler: create RO SDK client and server and inspect the traffic between them using this awesome tool.
at RemObjects.SDK.Server.IpHttpServerChannel.HandleHttpRequest(Object sender, HttpRequestEventArgs e)
Framework Version v4.0.30319.34209
RemObjects SDK for .NET v8.3.91.1167
Internet Pack for .NET v8.3.91.1167
Hi, i have done some research and most of the way is using URL. Anywhere, i have try to code as below to get the JSON data back, but the server return error. Or might be can you give some code to show how it work ?