Hi,
I have developed a webservice client using c#. Using client I am going to call 3rd party web service developed using java.
But when I run the application I am getting exception as "
Quote:
Error in deserializing body of reply message for operation 'QueryUserProfile'.
and the Inner exception is
Quote:
String was not recognized as a valid DateTime.
Can anyone have the solution for this. I have no control in the web service server side.
sample XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:QueryUserProfileBOResponse xmlns:ns="http://com.ztesoft.zsmart/xsd">
<MSISDN>94722009580</MSISDN>
<AcntStopDate/>
<CompletedDate>2016-08-22</CompletedDate>
<CertType>1</CertType>
<CertNbr>E52342566</CertNbr>
<CustType>A</CustType>
<CustName>LJH</CustName>
<Address/>
What I have tried:
Here is the c# code that I used.
DateTime dt;
System.DateTime dt1;
DateTime dt2;
DateTime dt3;
DateTime dt4;
DateTime dt5;
try
{
ServiceReference1.QueryPortTypeClient client = new ServiceReference1.QueryPortTypeClient();
ServiceReference1.tAuthHeader auth = new ServiceReference1.tAuthHeader();
auth.Password = "?";
auth.Username = "?";
ServiceReference1.tPricePlanDtoListType planList = new ServiceReference1.tPricePlanDtoListType();
ServiceReference1.tServiceDto serviceList = new ServiceReference1.tServiceDto();
ServiceReference1.tFellowISDNDto fellowList = new ServiceReference1.tFellowISDNDto();
ServiceReference1.tQueryUserProfileRequestBO requestBO = new ServiceReference1.tQueryUserProfileRequestBO();
requestBO.MSISDN = "94722009580";
ServiceReference1.QueryUserProfileResponse responce = new ServiceReference1.QueryUserProfileResponse();
ServiceReference1.QueryUserProfileRequest ProfileRequest = new ServiceReference1.QueryUserProfileRequest();
ProfileRequest.AuthHeader = auth;
ProfileRequest.QueryUserProfileRequestBO = requestBO;
client.QueryUserProfile(auth, requestBO, out dt, out dt1, out strOutParam1, out strOutParam2, out strOutParam3,
out strOutParam4, out strOutParam5, out strOutParam6, out strOutParam7, out strOutParam8, out strOutParam9,
out strOutParam10, out serviceList, out planList, out fellowList, out strOutParam11, out strOutParam12, out strOutParam13,
out strOutParam14, out dt2, out dt3, out dt4, out dt5, out amount1, out strOutParam15, out strOutParam16,
out strOutParam17, out strOutParam18, out strOutParam19, out amount2);
ServiceReference1.QueryAvaiableAddOnListResponse AddonResp = new ServiceReference1.QueryAvaiableAddOnListResponse();
AddonResp.AddOnDtoList = client.QueryAvaiableAddOnList(auth, AddonBO);
MessageBox.Show("wow");
}
catch (Exception x)
{
string error = x.Message;
MessageBox.Show(error);
}