string endpointURL = "xxxx";
var remoteAddress = new ServiceReference.Endpoint(endpointURL);
var bind = new System.ServiceModel.BasicHTTPSBinding();
ServiceReference.ServiceReferenceClient client= new ServiceReference.ServiceReferenceClient(bind, remoteAddress);AddData request = new AddData();
request.authentication = authentication;
request.transaction_id = transaction_id;
request.subjects = Subjects;
request.students = Students;
addDataResponse = await client.addData(request);
In Refernce.cs I have below classes
public class students
{
public string name{get;set;}
public string class{get;set}
public bool IsGraduate{get;set;}
public int Marks{get;set}
}
public class subjects
{
public string name{get;set;}
public string description{get;set}
public bool IsRequired{get;set;}
public int Count{get;set}
public int Test{get;set}
}
##
*I am consuming SOAP client as above where
Subjects is the Object that holds database values for different Subjects Properties
Student is the Object that holds database values for different Student Properties.
When I debug the code, many fields from Claim and Policy are missing in SOAP REQUEST BODY.
I notice that only String data is getting binded in SOAP BODY but bool, INT, decimal, enum data is not there in the REQUEST BODY.
* ##
Why I am missing the non - string parameters in my request body when I pass it over as addData.Request(request);
I can see complete data in request body in debug mode.
Expected XML from Request Body
<?xml version="1.0" encoding="UTF-8"?>
<student>
<name>Tom Hnaks</name>
<class>High</class>
<IsGraduate>No</IsGraduate>
<Marks>100</Marks>
</student>
<subjects>
<name>Botany</name>
<description>High</description>
<IsRequired>No</IsRequired>
<Test>100</Test>
<Count>100</Count>
</subjects>
XML I am getting from Request Body
<?xml version="1.0" encoding="UTF-8"?>
<student>
<name>Tom Hnaks</name>
<class>High</class>
</student>
<subjects>
<name>Botany</name>
<description>High</description>
</subjects>